View previous topic :: View next topic
|
Author |
Message |
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
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 |
|
|
kgumraj2
New User
Joined: 01 Aug 2007 Posts: 42 Location: Hyderabad
|
|
|
|
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 |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
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 |
|
|
snehalpatel
New User
Joined: 13 Sep 2007 Posts: 37 Location: India
|
|
|
|
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 |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
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 |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
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 |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Thanks a lot for the details. |
|
Back to top |
|
|
ksk
Active User
Joined: 08 Jun 2006 Posts: 355 Location: New York
|
|
|
|
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 |
|
|
|