to read from flat file from particular record



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

to read from flat file from particular record

Postby mainframe1 » Wed Jun 03, 2009 4:41 pm

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
mainframe1
 
Posts: 35
Joined: Wed Oct 08, 2008 11:39 am
Has thanked: 0 time
Been thanked: 0 time

Re: to read from flat file from particular record

Postby swd » Wed Jun 03, 2009 5:59 pm

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
User avatar
swd
 
Posts: 109
Joined: Wed Feb 18, 2009 9:18 pm
Location: UK
Has thanked: 0 time
Been thanked: 0 time

Re: to read from flat file from particular record

Postby dick scherrer » Thu Jun 04, 2009 1:21 am

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?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post