COBOL for AIX

RSD filesystem change when migrating an exe and data file from COBOL for AIX, V3.1 to V5.1

By Archive User posted Thu July 25, 2019 04:30 PM

  

Originally posted by: BasilTK


Scenario:
A data file contains dates listed repeatedly many times in a horizontal line entry with the YYYYMMDD format.
An exe reads from that data file when compiled with V3.1. But however, after compiling with V5.1. the exe produces the trace below.

 

However, if the dates in the data file are re-arranged one by one vertically (ie one date per line), the exe runs 
successfully when compiled with V5.1. 

 

Why is this the case?

 

Traceback:
<Thread 1>
<Thread 1>  Traceback:
<Thread 1>    Offset 0x00000694 in procedure writeERRmsg
<Thread 1>    Offset 0x00000044 in procedure iwzWriteERRmsg
<Thread 1>    Offset 0x00000318 in procedure _iwzCallUseProc
<Thread 1>    Offset 0x000004cc in procedure _iwzGenericOpen
<Thread 1>    Location 0x090000001803aa7c
<Thread 1>    Location 0x0000000100001528
<Thread 1>    --- End of call chain ---

IWZ200S  Error detected during OPEN for file 'I-FILE1'. File status is: 39.
IWZ901S  Program exits due to severe or critical error.

 

Answer:

The reason for this is because of a design change in COBOL for AIX, V5.1 for the RSD file-system.
The design change was that we started supporting fixed and variable length records at OPEN time.

 

Prior to V5.1, RSD was defined to require fixed length records.
 
In V5.1, we now check the length of the first line to validate the record max length.
Without the \n, we wouldd scan the entire file and say it is variable length and cause a FS=39.
 
To resolve this issue you would need to change 
export COBRTOPT="FILESYS(RSD)"
to
export COBRTOPT="FILESYS(QSAM)"
 
or
 
Add the \n as a delimiter in the data file.

0 comments
9 views

Permalink