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.
Joined: 06 Jun 2008 Posts: 8212 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.