
MainframeSupports tip week 52/2009:
Merry Christmas and a happy new year to you. The next tip will be
published on the 4th of january.
Du ønskes en rigtig glædelig jul og et godt nytår. Det
næste tip udkommer den 4. januar.
Traditionally I have seen compiler options as specifications given to the compiler through
PARM. The compilation procedures on many installations is created in a way where the compiler
options ends up as input through PARM. In fact it is possible to specify compiler options
in the source code for at least COBOL and PL/I.
COBOL and PL/I are two programming languages that has almost nothing in common, but in the
field of specifying compiler options both programming languages use the keyword PROCESS (though
you may use CBL instead in COBOL). This is also the only common thing.
In COBOL the PROCESS statement must be present before IDENTIFICATION DIVISION. I will recommend
you to write PROCESS starting in position 8 although it is not a requirement.
In PL/I you can specify PROCESS anywhere in the source code according to the manual. I will
recommend you to specify PROCESS before the very first PROC statement. PROCESS is specified by
writing a * in position 1 (yes, you read it correctly: position one!) and writing PROCESS
starting in position 2. After the last option you must key in a semicolon (;).
After the keyword PROCESS you specify the compiler options you want to use. It is enough
to specify the options that you want to be different from the usual options or the default.
If you become crazy about using PROCESS and you want to use more options than there is room for
on one line, you just add one more PROCESS statement and put more options on this statement.
The really smart thing about using PROCESS is that the
options specified in the source code overrides the options specified through PARM and normal
default compiler options. However, the systems programmer is able to switch off the normal
processing of PROCESS. Please verify that PROCESS has an effect on your installation, before
you start using it more widely. If your installation compiles the source several times before
reaching the production environment, the PROCESS statement is an excellent way to ensure that
a certain compiler option remains in force, even in production.
Previous tip in english
Sidste danske tip
Tip list
|