This article explains how to identify a problem statement in a program.
Problem:
When running a production program the following error occurs:
execution error : file '/home/prd/bin/appgm.int'
error code: 163, pc=328c, call=1, seg=0
163 Illegal character in numeric field
Is there a way to identify the problem statement in the program?
Resolution:
To find the area in the program where the error is occurring make sure that the program has a corresponding .idy file. The .idy is produced at compile time when the -a flag is used for .int's or -g for all other formats (for example, .gnt, .o, -so, executable).
To create a listing with a cross-reference showing the offsets run the cobfflst command for the COBOL program involved. To get this output go to the directory containing the .idy file for the program and run the cobfflst command.
Syntax:
cobfflst <infile>[.int] [<listfile>]
For example if the program getting the error is test163.cbl.
Compile:
cob -iav test163.cbl
Create the cross-reference file:
cobfflst test163.int mylist
Run the program:
cobrun test163
Execution error : file 'test163.int'
error code: 163, pc=37, call=1, seg=0
163
Illegal character in numeric field
Check the mylist file to find the procedure division statement with an offset close closest to but not greater than 37.