When compiling the following program within the IDE, a 163 error differing from that generated from the command line results: $SET CHECKNUM IDENTIFICATION DIVISION. DATA DIVISION. WORKING-STORAGE SECTION. 01 N PIC 9(8) VALUE 0. 01 M PIC X(8) VALUE " ". PROCEDURE DIVISION. MOVE SPACE TO M. MOVE M to N. DISPLAY M. DISPLAY N. GOBACK. its error message is displayed as Object Code error : file 'a' error code: 163, pc=0, call=1, seg=0 163 Illegal character in numeric field (in D:\\anken2\\7800\\7848\\demo\\a.cbl, line 9) When the same program is built from the command line and run the message is: Object Code error : file 'a' error code: 163, pc=87, call=1, seg=0 163 Illegal character in numeric field Why is there a difference?
Problem:
When compiling the following program within the IDE, a 163 error differing from that generated from the command line results:
$SET CHECKNUM
IDENTIFICATION DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 N PIC 9(8) VALUE 0.
01 M PIC X(8) VALUE " ".
PROCEDURE DIVISION.
MOVE SPACE TO M.
MOVE M to N.
DISPLAY M.
DISPLAY N.
GOBACK.
its error message is displayed as
Object Code error : file 'a'
error code: 163, pc=0, call=1, seg=0
163 Illegal character in numeric field (in D:\\anken2\\7800\\7848\\demo\\a.cbl, line 9)
When the same program is built from the command line and run the message is:
Object Code error : file 'a'
error code: 163, pc=87, call=1, seg=0
163 Illegal character in numeric field
Why is there a difference?
Resolution:
The difference between the IDE and command line generated EXEs is support for animation. By default, the IDE compiles the code with the ANIM directive whereas the COBOL command does not.
The same behaviour is exhibited from the command line EXE when compiling and linking, as follows:
cobol prog01 obj anim;
cbllink prog01
The downside is that this will likely create slightly larger and slower EXEs.