Author: Robert Sample
Posted: Sat May 06, 2017 12:09 am (GMT 5.5)
Also, you should be able to check your compiler output to see what the file is listed as -- depending upon how you code your program, it is not uncommon for COBOL to consider a variable length file to be fixed length, which would cause a non-zero file status code when you open the file (most likely a 39 but if the data set is VSAM it could be 92).
This Enterprise COBOL output extract shows a fixed length VSAM data set. For a variable length VSAM data set, the F under Data Def Attributes would be a V.
_________________
TANSTAAFL
The first rule of code reuse is that the code needs to be worth re-using.
"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." -- Donald Knuth
Posted: Sat May 06, 2017 12:09 am (GMT 5.5)
Also, you should be able to check your compiler output to see what the file is listed as -- depending upon how you code your program, it is not uncommon for COBOL to consider a variable length file to be fixed length, which would cause a non-zero file status code when you open the file (most likely a 39 but if the data set is VSAM it could be 92).
Code: |
Source Hierarchy and Base Displacement Asmblr Data Data Def LineID Data Name Locator Structure Definition Data Type Attributes 2 PROGRAM-ID MF0022------------------------------------------------------------------------------------------------------* 31 FD VSAM-FILE . . . . . . . . . . . . . . . . . . BLF=00001 VSAM F 32 1 VSAM-RECORD . . . . . . . . . . . . . . . . . BLF=00001 DS 0CL1000 Group |
_________________
TANSTAAFL
The first rule of code reuse is that the code needs to be worth re-using.
"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." -- Donald Knuth