View previous topic :: View next topic
|
Author |
Message |
lee_issc
New User
Joined: 11 Dec 2008 Posts: 33 Location: China
|
|
|
|
Dears,
These day I encountered a program code as this:
Code: |
FD IMRSTM
LABEL RECORDS ARE STANDARD
RECORDING MODE IS V
BLOCK CONTAINS 0 RECORDS
RECORD 1045 CHARACTERS.
01 IMRSTM-REC PIC X(1045).
|
And it is a output file and in the JCL coded:
DCB=(RECFM=VB,LRECL=1045,BLKSIZE=0)
The COBOl compiler is IBM COBOL FOR MVS & VM 1.2.2
Now I found the dateset created has length 1049 and VB format.How the actual length/format was determined?
Can i understand as below:
RECORDING MODE IS V -----------> RECFM
BLOCK CONTAINS 0 RECORDS -----------> BLKSIZE
RECORD 1045 CHARACTERS. -----------> LRECL
these 3 attributes will determined by value in the COBOL source if it is not 0,and if it is 0,then the DCB in the JCL is valid.
But in the cobol ,the recording mode is V,and record 1045 characters and even only one 01 layer,how it was determined to VB?should not FB??
Appreciated if you can give the evidence from IBM's read book.
[/code] |
|
Back to top |
|
|
Tushar Sood
New User
Joined: 26 Oct 2008 Posts: 14 Location: New Jersey
|
|
|
|
Hi,
The extra 4 bytes are for the control fields of Variable Length Files. It includes the length of the record. |
|
Back to top |
|
|
lee_issc
New User
Joined: 11 Dec 2008 Posts: 33 Location: China
|
|
|
|
Tushar Sood wrote: |
Hi,
The extra 4 bytes are for the control fields of Variable Length Files. It includes the length of the record. |
Of course I know that.But in the DCB, there has 'LRECL=1045'.Was it ingored? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
This is not a COBOL issue. Click on the manuals link at the top of the page, find the JCL Language Reference manual, and you will find:
Quote: |
12.16.3 Completing the Data Control Block
The system obtains data control block information from the following sources, in override order:
The processing program, that is, the DCB macro instruction in assembler language programs or file definition statements or language-defined defaults in programs in other languages.
The DCB subparameter of the DD statement.
The data set label.
Therefore, if you supply information for the same DCB field in your processing program and on a DD statement, the system ignores the DD DCB subparameter. If a DD statement and the data set label supply information for the same DCB field, the system ignores the data set label information.
|
The program overrides the JCL, so the JCL parameter is not used. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
If these records are truly variable in length, then review the link contents below.
This was introduced with VS/COBOL II Version/Release 3, so your Version/Release is supported.
Otherwise, there doesn't seem to be any purpose having RECORDING MODE V in the FD if all the records are going to be a fixed-length of 1045.
www.ibmmainframes.com/viewtopic.php?p=262915&highlight=#262915
Bill |
|
Back to top |
|
|
|