Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

few doubts in cobol read clause

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
aklima

New User


Joined: 25 Nov 2005
Posts: 18
Location: uae

PostPosted: Thu May 25, 2006 4:54 pm    Post subject: few doubts in cobol read clause
Reply with quote

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
View user's profile Send private message

gskulkarni

New User


Joined: 01 Mar 2006
Posts: 70

PostPosted: Thu May 25, 2006 5:01 pm    Post subject:
Reply with quote

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
View user's profile Send private message
umeshkmrsh

New User


Joined: 21 Sep 2005
Posts: 79
Location: India

PostPosted: Fri May 26, 2006 11:17 am    Post subject:
Reply with quote

Could you please explain your query in detail?
Back to top
View user's profile Send private message
prasadvrk

Active User


Joined: 31 May 2006
Posts: 200
Location: Netherlands

PostPosted: Thu Jun 01, 2006 5:28 pm    Post subject:
Reply with quote

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
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Jun 03, 2006 4:26 am    Post subject: Re: few doubts in cobol read clause
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm
No new posts COBOL DB2 program - zIIP eligible vasanthz COBOL Programming 7 Wed May 31, 2017 5:12 am
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us