View previous topic :: View next topic
|
Author |
Message |
arindambanerjee
New User
Joined: 30 Jun 2007 Posts: 39 Location: India
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
Back to top |
|
|
|