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
 

 

length of records in a variable file.

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

New User


Joined: 30 Jun 2007
Posts: 39
Location: India

PostPosted: Sat Oct 31, 2009 2:56 pm    Post subject: length of records in a variable file.
Reply with quote

Hi,

I have a file of Variable block attribute. It is having an average record length of 80 and maximum record length of 120. Now I need to find out the length of each record of the file. It can be wither with COBOL programing or JCL. Can some one let me know the what will be the logic for COBOL programming and if the solution can be obtained from jcl then how to proceed.
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6967
Location: porcelain throne

PostPosted: Sat Oct 31, 2009 4:13 pm    Post subject:
Reply with quote

expat says it more succinctly and politely than i would:
/RANT ON
Once more let us clarify exactly what JCL is.

it is Job Control Language.

By itself it does nothing. It is used to invoke the chosen program and to define which datasets are to be used by the DD names associated with the chosen program.

JCL does not have magical powers that solve all problems, JCL is merely the vehicule for telling the processor which program you want it to execute.
/RANT OFF

Look in the COBOL Application Programmers guide and the COBOL Language Reference for the syntax to obtain the record length during a READ operation.

Search the DFSORT forum (unless of course you have syncsort),
many discussions on how to determine the RDW of a record.

Also, one of the first sticky's in the DFSORT forum is a reference to manuals. Look at the getting started or quickstart manual. I believe the necessary control cards are explained.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8057
Location: East Dubuque, Illinois, USA

PostPosted: Sat Oct 31, 2009 5:57 pm    Post subject:
Reply with quote

COBOL has a RECORD VARYING clause in the FD that allows you to specify a variable; this variable is set to the length of each record when it is read. If the file is an output file, you must set the length of the data to be written in this variable before doing the WRITE.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon Nov 02, 2009 3:31 pm    Post subject:
Reply with quote

As Dick has said, have a look on this thread: http://www.ibmmainframes.com/viewtopic.php?t=41779&highlight=rdw
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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am


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