Page 1 of 1

to read from flat file from particular record

PostPosted: Wed Jun 03, 2009 4:41 pm
by mainframe1
hi,
i want to read flat file ( 100 records) from 50 th record. it should not read the first 50 records, no arrays also please
pls give a solution

regards

Re: to read from flat file from particular record

PostPosted: Wed Jun 03, 2009 5:59 pm
by swd
It would be interesting to know why you don't want to read the first 50 records. If you have a flat file you don't really have any choice. There are things you could do, you could do an IDCAMS REPRO and SKIP the first 50 records and create a new dataset containing the rest of the file, then OPEN this file in your program. The easiest way is to read the first 50 records in your program, then carry on processing from record 51. But perhaps you could enlighten us as to why you don't want to do this.

Cheers
Steve

Re: to read from flat file from particular record

PostPosted: Thu Jun 04, 2009 1:21 am
by dick scherrer
Hello,

it should not read the first 50 records, no arrays also please

Where did this "requirement" originate?

How would using an array (even if you wanted to use one) get around reading the first 50?