The core of your mission-critical workloads: AIX, IBM i, and Enterprise Linux
Stay up to date with key capabilities running on POWER such as SAP
Learn how to keep critical processes running and adapt quickly with PowerHA
Protect your most sensitive data anywhere in your hybrid cloud
Check here for virtualization and management needs: HMC & CMC, PowerVC, and PowerVM
Join our open source efforts within the IBM Power Systems portfolio
Achieve business growth with agility and flexibility with our enterprise IaaS in Power Virtual Server
The hub for Programming Languages
Summary:Clients who have COBOL for AIX programs that make use of varying length record format in RSD, but have coded it as "Fixed (ie F)" might encounter a FS=39 issue when moving to COBOL for AIX, V5.1.eg:1. FILE-CONTROL.SELCT FILE1 ASSIGN TO FILE1ORGANIZATION IS SEQUENTIALACCESS MODE IS SEQUENTIALFILE STATUS IS FS.FD FILE1 RECORDING MODE F.01 SRC-REC PIC X(90).2. FILE1 DATAThe file record length is 89 bytes.Problem Description:The above example, would succeed to run pre-COBOL for AIX, V5.1.
However, starting from V5.1, for RSD files, we start checking the the minimum and maximum record lengths when opening a file.This change was introduced to be more consistent with other filesystems such as STL, SdU, SFS.Problem Resolution:In the above example, since the actual record length is varying (eg 89 instead of the expected 90), starting from V5.1 you need to explicitly state that the records are varying in length when you define the FD in the source code:ie Change:FD FILE1 RECORDING MODE F.toFD FILE1RECORDING MODE IS VRECORD IS VARYING FROM 1 TO 90 CHARACTERS.If the "RECORDING MODE IS V" is not specified, the compiler assumes "RECORDING MODE IS F" ie fixed.F => That means all the records have to be the same lengthV => That means the records can vary in length.More info can be found here:https://www.ibm.com/support/knowledgecenter/SS6SGM_5.1.0/com.ibm.cobol51.aix.doc/PGandLR/ref/rlfdermc.html