Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
FD clauses and DCB parameter

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: FD clauses and DCB parameter
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: 9
Location: New Jersey

PostPosted: Thu Mar 10, 2011 1:21 pm    Post subject:
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    Post subject:
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: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Thu Mar 10, 2011 3:53 pm    Post subject:
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: 2504
Location: Atlanta, Georgia, USA

PostPosted: Thu Mar 10, 2011 4:21 pm    Post subject: Reply to: FD clauses and DCB parameter
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.

http://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    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 Regarding time parameter shanthi gude JCL & VSAM 7 Mon Sep 04, 2017 2:31 pm
No new posts Paasing symbolic parameter to instrea... Robert Sample JCL & VSAM 2 Thu Jul 27, 2017 1:22 pm
No new posts JTS parameter Shashank Chaubey JCL & VSAM 2 Thu Jul 13, 2017 4:15 pm
No new posts Include/omit with "ALL" pa... mgl DFSORT/ICETOOL 6 Wed Jun 14, 2017 2:31 pm
No new posts Can DFSPARM override SORTKEYS paramet... ashek15 DB2 2 Tue Jan 31, 2017 11:36 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us