SEPOBJ
SEPOBJ
specifies whether each of the
outermost COBOL programs in a batch compilation is to be generated
as a separate object file rather than as a single object file.
Batch compilation
When
multiple
outermost programs (nonnested programs) are compiled with a single
batch invocation of the compiler, the number of files produced for
the object program output of the batch compilation depends on the
compiler option SEPOBJ
.
Assume that the COBOL
source file pgm.cbl contains three outermost COBOL programs named pgm1
, pgm2
,
and pgm3
. The following figures illustrate whether
the object program output is generated as one file (with NOSEPOBJ
)
or three
files (with SEPOBJ
).
Batch
compilation with NOSEPOBJ
Batch compilation with SEPOBJ
Usage notes
- The
SEPOBJ
option is required to conform to 85 COBOL Standard wherepgm2
orpgm3
in the above example is called usingCALL
identifier from another program. - If
NOSEPOBJ
is in effect, the object files are given the name of the source file but with suffix .o. IfSEPOBJ
is in effect, the names of the object files are based on thePROGRAM-ID
name with suffix .o. - The programs called using
CALL
identifier must be referred to by the names of the object files (rather than thePROGRAM-ID
names) wherePROGRAM-ID
and the object file name do not match.
You must give the object file a valid file-name for the platform and the file system.