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
 

 

FD entry and the 01 level following it

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

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Tue Sep 18, 2007 11:44 am    Post subject: FD entry and the 01 level following it
Reply with quote

FD entry is usually coded in the data division for every file that is used in the program. Also a record structure is defined which acts as a buffer to hold the read data.

In one of modules i found 2 01 levels (record structures) following the FD entry. What is the use of coding 2 similar (In my case both the 01 levels are same expect the record name)record structures.

Will both the record buffers get populated when a record is read from the file? Please throw some light on this.
Back to top
View user's profile Send private message

kgumraj2

New User


Joined: 01 Aug 2007
Posts: 42
Location: Hyderabad

PostPosted: Tue Sep 18, 2007 11:46 am    Post subject:
Reply with quote

Hi,

Check the files are FB or VB, I feel it is VB (Varing block)
Let us know what you have found, thanks
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Tue Sep 18, 2007 11:47 am    Post subject:
Reply with quote

Aaru,

Quote:
In one of modules i found 2 01 levels (record structures) following the FD entry. What is the use of coding 2 similar (In my case both the 01 levels are same expect the record name)record structures.


Generally for VB file we code like this. The second 01 group is nothing but the redefine of first 01 variable. It is an implicit redef.
Back to top
View user's profile Send private message
snehalpatel

New User


Joined: 13 Sep 2007
Posts: 37
Location: India

PostPosted: Tue Sep 18, 2007 11:56 am    Post subject: Re: FD entry and the 01 level following it
Reply with quote

Aaru wrote:
FD entry is usually coded in the data division for every file that is used in the program. Also a record structure is defined which acts as a buffer to hold the read data.

In one of modules i found 2 01 levels (record structures) following the FD entry. What is the use of coding 2 similar (In my case both the 01 levels are same expect the record name)record structures.

Will both the record buffers get populated when a record is read from the file? Please throw some light on this.



Hi

Let me give one Example of VB file used as O/P file

FD OUT-PUT-FEED-FILE
RECORDING MODE IS V
RECORD CONTAINS 42 TO 205 CHARACTERS
BLOCK CONTAINS 0 RECORDS
LABEL RECORD ARE STANDARD
DATA RECORDS ARE REC-A
REC-B
REC-C
01 REC-A PIC X(42)
01 REC-B PIC X(125)
01 REC-C PIC X(205).


Here OUT-PUT-FEED-FILE file is Variable file.
In JCl it would be decalred as


//OUTFEED DD DSN=FILE NAME
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(100,50),RLSE),UNIT=SYSDA,
// DCB=(LRECL=209,RECFM=VB,BLKSIZE=0)

NOTE LRECL IS 209 it is max rec length +4 bytes ..
205+4 = 209

The same file can be seen with different layouts ..
Correct me if i am wrong ..

About reading a VB file i have no Idea ..
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Tue Sep 18, 2007 1:40 pm    Post subject: Re: FD entry and the 01 level following it
Reply with quote

Aaru wrote:
FD entry is usually coded in the data division for every file that is used in the program. Also a record structure is defined which acts as a buffer to hold the read data.
Actually the 01s are not buffers, but dsects, like 01s in linkage section, whose addressability is set into the actual I/O buffer and for each read moved to the next record in the actual block.
If the 01 lengths are different, the file must be defined variable but if they are the same length, the file could be either variable or fixed.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Tue Sep 18, 2007 1:47 pm    Post subject: Reply to: FD entry and the 01 level following it
Reply with quote

Quote:

Check the files are FB or VB, I feel it is VB (Varing block)
Let us know what you have found, thanks


Yep, It is a variable block file.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Tue Sep 18, 2007 1:56 pm    Post subject: Reply to: FD entry and the 01 level following it
Reply with quote

Thanks a lot for the details.
Back to top
View user's profile Send private message
ksk

Active User


Joined: 08 Jun 2006
Posts: 356
Location: New York

PostPosted: Tue Sep 18, 2007 2:46 pm    Post subject:
Reply with quote

FD section can have Multiple 01 levels with the same length (FB) or different length(VB). As Murali said, it is an implicit redefine.
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 Automation of data entry using Rexx i... zingy.rajeev CLIST & REXX 4 Mon Aug 22, 2016 4:13 pm
This topic is locked: you cannot edit posts or make replies. Automation of data entry using Rexx i... zingy.rajeev CICS 0 Mon Aug 22, 2016 4:11 pm
No new posts Syncsort TPF Level Majid Hussain SYNCSORT 2 Wed Apr 13, 2016 2:22 am
No new posts Need a logic to validate the data in ... sandeep kumar302 COBOL Programming 17 Mon Feb 01, 2016 3:30 pm
No new posts DB2 10.1 Share level locking and Sele... Mary Lewis DB2 1 Wed Apr 15, 2015 9:51 pm


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