The COBOL runtime library uses the following runtime-only environment variables.
SELECT CARPOOL ASSIGN TO OUTPUTFILE
At run time, you set the environment variable to the name of the system file that you want to associate with the COBOL file. For example:
export OUTPUTFILE=january.car_results
After you issue the command above, input/output statements for COBOL file CARPOOL operate on system file january.car_results in the current directory.
If you do not set the environment variable, or set it to the empty string, COBOL uses the literal name of the environment variable as the system file-name (OUTPUTFILE in the current directory for the ASSIGN example above).
The ASSIGN clause can specify a file stored in a file system other than the default, such as the standard language file system (STL) or the record sequential delimited file system (RSD). For example:
SELECT CARPOOL ASSIGN TO STL-OUTPUTFILE
In this case, you still set environment variable OUTPUTFILE (not STL-OUTPUTFILE).
export CICS_TK_SFS_SERVER=/.:/cics/sfs/sfsServer
To capture runtime error messages in a file, use the export command to set COBMSGS to a file-name. If your program has a runtime error that terminates the application, the file that COBMSGS is set to will contain an error message that indicates the reason for termination.
If COBMSGS is not set, error messages are written to the terminal.
When this environment variable is set to 1, the digit and sign validation done prior to conversion and arithmetic operations is skipped.
Using this environment variable does not affect the numeric class test that tests whether a data item IS NUMERIC or IS NOT NUMERIC.
Separate runtime options by a comma or a colon. Use parentheses or equal signs (=) as the delimiter for suboptions. Options are not case sensitive. For example, the following two commands are equivalent:
export COBRTOPT="CHECK(ON):UPSI(00000000)"
export COBRTOPT=check=on,upsi=00000000
If you specify more than one setting for a given runtime option, the rightmost such setting prevails.
The defaults for individual runtime options apply. For details, see the related reference about runtime options.
To set the EBCDIC code page, issue the following command, where codepage is the name of the code page to be used:
export EBCDIC_CODEPAGE=codepage
If EBCDIC_CODEPAGE is not set, the default EBCDIC code page is selected based on the current locale, as described in the related reference about the locales and code pages supported. When the CHAR(EBCDIC) compiler option is in effect and multiple EBCDIC code pages are applicable to the locale in effect, you must set the EBCDIC_CODEPAGE environment variable unless the default EBCDIC code page for the locale is acceptable.
export ENCINA_CDS_ROOT=/.:/cics/sfs
export ENCINA_SFS_DATA_VOLUME=sfs_SFS_SERV
This data volume must have been defined to the SFS server that your application accesses.
If this variable is not set, the default name encinaSfsVol is used.
export ENCINA_SFS_INDEX_VOLUME=sfs_SFS_SERV
This data volume must have been defined to the SFS server that your application accesses.
If this variable is not set, alternate index files are created on the same data volume as the corresponding base index files.
export ENCINA_VSAM_AUTO_FLUSH=OFF
When this environment variable is set to OFF, SFS uses a lazy-write strategy; that is, changes to SFS files might not be committed to disk until the files are closed.
If SFS client-side caching is in effect (that is, environment variable ENCINA_VSAM_CACHE is set to a valid nonzero value), the setting of ENCINA_VSAM_AUTO_FLUSH is ignored. Operational force is disabled.
If SFS client-side caching is not in effect, the value of ENCINA_VSAM_AUTO_FLUSH defaults to ON.
ENCINA_VSAM_CACHE syntax >>-+-read-and-insert-cache-size---------------------------------+->< '-read-cache-size:insert-cache-size--+---------------------+-' | .-----------. | | V | | '-:flag---+-------+-+-' '-,flag-'
Size units are in numbers of pages. A size of zero indicates that caching is disabled. The possible flags are:
For example, the following command sets the read-cache size to 16 pages and the insert-cache size to 64 pages. It also enables dirty reads and enables inserts despite unique indices:
export ENCINA_VSAM_CACHE=16:64:ALLOW_DIRTY_READS, \
INSERTS_DESPITE_UNIQUE_INDICES
By default, client-side caching is not enabled.
If the environment variable is not set, by default SYSIN and SYSIPT are directed to the logical input device (keyboard). SYSOUT, SYSLIST, SYSLST, and CONSOLE are directed to the system logical output device (screen). SYSPUNCH and SYSPCH are not assigned a default value and are not valid unless you explicitly define them.
For example, the following command defines CONSOLE:
export CONSOLE=/users/mypath/myfile
CONSOLE could then be used in conjunction with the following source code:
SPECIAL-NAMES.
CONSOLE IS terminal
. . .
DISPLAY 'Hello World' UPON terminal
related tasks
Identifying files
Using SFS files
Improving SFS performance
related references
CHAR
Runtime options