IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

FD clauses and DCB parameter


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
lee_issc

New User


Joined: 11 Dec 2008
Posts: 33
Location: China

PostPosted: Thu Mar 10, 2011 1:14 pm
Reply with quote

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

New User


Joined: 26 Oct 2008
Posts: 14
Location: New Jersey

PostPosted: Thu Mar 10, 2011 1:21 pm
Reply with quote

Hi,

The extra 4 bytes are for the control fields of Variable Length Files. It includes the length of the record.
Back to top
View user's profile Send private message
lee_issc

New User


Joined: 11 Dec 2008
Posts: 33
Location: China

PostPosted: Thu Mar 10, 2011 1:38 pm
Reply with quote

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

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Mar 10, 2011 3:53 pm
Reply with quote

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

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Thu Mar 10, 2011 4:21 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Using the Jobname parameter in a Qual... ABENDS & Debugging 1
No new posts Demand with DEADLINE TIME parameter CA Products 4
No new posts Option DYNALLOC second parameter. DFSORT/ICETOOL 11
No new posts Writing the output file name from a p... JCL & VSAM 7
No new posts Reference for COND parameter. JCL & VSAM 1
Search our Forums:

Back to Top