Compiling and binding AMODE 64 programs under z/OS UNIX
The setup and preparations for compiling COBOL AMODE 64 programs with z/OS® UNIX are the same as the corresponding setup and preparations under AMODE 31. See Compiling under z/OS UNIX for more information.
The compilation is done using the
-q64
option
of the cob2 command. For example, the following command compiles and
binds the COBOL source file hello.cbl in the
current directory. The binder output is written to the default executable
file a.out.cob2 -q64 hello.cbl
You
can explicitly specify the binder output file by using the
-o
option.
The following cob2 command generates the executable file hello.exe.cob2 -q64 hello.cbl -o hello.exe
Other
compiler options can be specified by using the
-q
option
in the same way as using cob2 command with AMODE 31. For example,
the following command invokes the COBOL compiler by using SOURCE
and LIST
options:cob2 -q64 -q"SOURCE,LIST" hello.cbl
Note
that
-q64
is the short form of the compiler option LP(64)
in
the cob2 command line. It must be specified on its own in the cob2
command line, separate from other compiler option specifications.
Instead of -q64
, you can use LP(64)
directly
with other compiler options:cob2 -q"LP(64),SOURCE,LIST" hello.cbl
Correspondingly,
the -q32
is the short form of the compiler option LP(32)
.
If cob2 is invoked without explicitly specifying -q64
or -q32
,
the default is -q32
.
Environment variables
In
addition to the environment variables supported with AMODE 31, the
following two additional environment variables are supported for AMODE
64:
- _C89_L6SYSLIB
- Specifies the library dataset concatenations of
SYSLIB DD
to be used by the bind step. Dataset names are separated by colons. For example, the following environment variable settingexport _C89_L6SYSLIB=MYSAMPLE.SCEEBND2:CEE.SCEEBND2
- _C89_L6SYSIX
- Specifies the side-deck dataset concatenations of
SYSLIN
to be used by the bind step. Dataset names are separated by colons. For example, the following environment variable settingexport _C89_L6SYSIX="MYSAMPLE.SCEELIB(CELQV004):CEE.SCEELIB(CELQV004)"