View previous topic :: View next topic
|
Author |
Message |
aklima
New User
Joined: 25 Nov 2005 Posts: 18 Location: uae
|
|
|
|
hi i have few queries in cobol read.
1. my file is variable length record and i have 4 01 levels. and i want to read that seq. and within these 4 recs there are sort keys could u tell me how to read this and check the sort key and and read the next record.
hope to get a reply soon.
thanks in advance
aklima |
|
Back to top |
|
|
gskulkarni
New User
Joined: 01 Mar 2006 Posts: 70
|
|
|
|
You have a variable length file and you have four 01 level record formats.
I am guessin gthat the file can contain records of one of those 4 record layouts given by four 01 levels.
See the syntax for your reference.
Code: |
FD AUTO-OUTPUT-FILE
RECORDING MODE IS V
RECORD IS VARYING IN SIZE FROM 1056 TO 3900 CHARACTERS
DEPENDING ON WORK-LENGTH
BLOCK CONTAINS 0 RECORDS
DATA RECORD IS AUTO-RECORD.
01 AUTO-RECORD1.
05 FILLER PIC X(3900).
01 AUTO-RECORD2.
05 FILLER PIC X(1700).
01 AUTO-RECORD.
05 FILLER PIC X(1056). |
and while reading you can use READ auto file into 'any one of those 4 record types' |
|
Back to top |
|
|
umeshkmrsh
New User
Joined: 21 Sep 2005 Posts: 79 Location: India
|
|
|
|
Could you please explain your query in detail? |
|
Back to top |
|
|
prasadvrk
Active User
Joined: 31 May 2006 Posts: 200 Location: Netherlands
|
|
|
|
I think you have variable length records in four layouts. In such case generally the first byte will have a record identifier based on which you can process the records. It would be easier to answer your question if you supply the copybook of your file |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Well Umesh, you went and did it - asked Aklima to answer a ques about his problem. Now we'll never hear from him again! |
|
Back to top |
|
|
|