|
The following compiler options are recommended as a starting point when migrating from IBM or other legacy COBOL dialects to isCOBOL:
-apost -b -cax -cp -cudc -cv -cva -dcmi -di -dv=0 -dz -pt2
Use -ce=cpy to specify .cpy as the default file extension for copybooks.
Use -rw=word1,word2,word3 to remove reserved words. For example, -rw=PRINTER,HIGHLIGHT will remove PRINTER and HIGHLIGHT as reserved words.
Use -sp=path1:path2:path3 on Linux/UNIX or -sp=path1;path2;path3 on Windows to specify paths to your copybooks.
For example, if you have .FD files in a subdirectory named FD and .SL files in a subdirectory named SL then use -sp=FD:SL or -sp=FD;SL.
If you have an environment variable such as COBCPY that contains a list of directories containing copybooks, you can add -sp=$COBCPY or -sp=%COBCPY%
The following runtime property is recommended:
iscobol.checkdiv=1
Consider the following options if they are necessary:
-coe
-cpanv
-sa
-smat
Consider the following runtime property if necessary:
iscobol.file.strip_trailing_spaces=true
The following is a mapping of some commonly used Micro Focus directives to isCOBOL options:
ANIM -d
APOST -apost
ARITHMETIC(OSVS) -cva
ASSIGN(EXTERNAL) -cax
NOBOUND -cp
COPYEXT(cpy) -ce=cpy
DEFAULTBYTE(00) -dv=0
HOSTARITHMETIC -cva
HOST-NUMCOMPARE -cudc
HOST-NUMMOVE -cudc
IBMCOMP -dcmi
PERFORM-TYPE(OSVS) -pt2
REMOVE(NULL) -rw=NULL
NOTRUNC -dz
CHECKDIV(VSC2) iscobol.checkdiv=1
In addition to the above list we recommend -b -cp -cv -di -m1 for the following reasons:
-b improves performance in applications that do not require Unicode
-cp allows full support of USAGE POINTER, ADDRESS OF and pointer arithmetic, also allows negative subscripting
-cv allows IBM COBOL syntax and intrinsic functions
-di initializes working-storage items (that do not have a VALUE clause) according to their type, alphanumeric items to the value specified with -dv, numeric items to ZEROES, and table indexes to 1
-m1 puts all WORKING-STORAGE into a contiguous block of memory
Contact Veryant Support for help determining the correct compile options and properties to use for your project.
|