Run time and configuration
• By default, isCOBOL uses 2002 ANSI standard file status codes. These codes differ from those usually used by RM/COBOL. If RM/COBOL programs were written to the 1974 RM/COBOL standard, you should add the following line to the configuration:
iscobol.file.status=com.iscobol.io.FileStatus74 |
If RM/COBOL programs were written in RM/COBOL-85, instead, set:
iscobol.file.status=com.iscobol.io.FileStatus85 |
• RM/COBOL (but not RM/COBOL-85) automatically closes all non-print files in a subprogram when that program exits. This is not default behavior with isCOBOL, but you can obtain it by adding the following entry to the configuration:
iscobol.file.close_on_exit=1 |
or by compiling programs with the following compiler option:
• Under RM/COBOL, if the main program has a Linkage Section, it is initialized by the parameter passed on the command line. Under isCOBOL, it is illegal to reference Linkage Section items in the main program. You can get rid of this difference by using a stub main program that takes care of intercepting the command-line and pass it to the original main program through a CALL statement.
A basic implementation of this stub main program is installed with isCOBOL in the sample/custom-startup/rm-run folder. The program is intended to be used as replacement of RM/COBOL runcobol command and supports the following command-line flags: A for arguments, S for switches and T for memory allocation.
If you used a command like this in RM/COBOL:
runcobol test1 a = "a b c" S = 10101111 -T = 512000 |
You can replace it with:
ISCRUN RUNCOBOL test1 a = "a b c" S = 10101111 -T = 512000 |