[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Reading from a flat file



Kimberly,

Try it.  I think you'll find that the field will work fine;
trailing spaces for the field will be trucated.

Ray

> Question:
>
> If I do the following, will this work okay if the $sal_plan_code field can be
> either two or three characters? I know that you should
> read this way only if you know the exact length of every field. But since it is
> the last field in the flat file would this be okay
> or not?
>
>
> while 1=1
>    !**************************************
>    !Read the flat file and load data.
>    !**************************************
>    read 10 into $emplid:9 $effdt:8 $action_cd:3 $reason_cd:3 $job_code:6
> $sal_plan_code:3
>    if #end-file
>       break
>    end-if
>
> etc...
>

----------------------------------------------------------------------
Ray Ontko   rayo@ontko.com   Phone 1.765.935.4283   Fax 1.765.962.9788
Ray Ontko & Co.   Software Consulting Services   http://www.ontko.com/