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
 

 

multiple '01' levels in FD entry in file section.....

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

New User


Joined: 22 Sep 2006
Posts: 4

PostPosted: Sat Dec 16, 2006 11:44 am    Post subject: multiple '01' levels in FD entry in file section.....
Reply with quote

hi all...
what actually does multiple 01 levels in a FD entry of a file section signifies
...
i just learnt that the latter 01 level implicitly redefines the former 01 level....
in that case if the layout of both 01 levels are different but the total sum of fields is same...
then if we are trying to read the file ,in which 01 level it would be read....

i hope i made my question clear!!
Back to top
View user's profile Send private message

priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Sat Dec 16, 2006 11:52 am    Post subject: Re: multiple '01' levels in FD entry in file section.....
Reply with quote

When more than one level-01 entry is written subordinate to an FD entry, a condition known as implicit redefinition occurs. That is, the second level-01 entry implicitly redefines the storage allotted for the first entry. In such level-01 entries, the REDEFINES clause must not be specified.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Sat Dec 16, 2006 5:06 pm    Post subject:
Reply with quote

Multiple 01 levels on input all get the data.
They can be of different lengths, that's one way to define variable length files.
On output, the 01 written defines the length of the output record.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2284
Location: @my desk

PostPosted: Mon Dec 18, 2006 10:48 am    Post subject:
Reply with quote

Hi Mohnish

You can have any of the 01 levels for reading as per your requirement.Each one would fetch you data in different formats as defined in the FD section

Thanks
Arun
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Dec 19, 2006 3:38 am    Post subject:
Reply with quote

Hello,

If an existing file has multiple level 01s, each most likely has some kind of record identifier (i.e. REC-CODE or REC-TYPE). Once a record is read from the file the record identifier is checked so the program can execute the proper logic for "that" record.

Reading a record occurs on each read of the file - knowing how to process each format is up to the program.

If you create a file with different record layouts (01s in the FD), be sure to include a record type in the same position in each record. The field(s) the file is sequenced by are commonly the first field(s) in each record and the next byte or 2 the record type.
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
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Changeman get multiple "Browse C... elixir1986 Compuware & Other Tools 4 Fri Jul 14, 2017 1:48 am
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am


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