Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

COBOL program units (Unix and Linux systems)

You can create COBOL programs with the Micro Focus compilers or with the Fujitsu NetCOBOL compiler.

Please note the COBOL-specific programming notes in the openUTM manual „Programming Applications with KDCS” (chapter "Additional Information for Cobol", section "Platform-specific features on Unix and Linux systems").

Environment variables for COBOL programs

If you use COBOL programs then you must set compiler-specific environment variables.

Micro Focus COBOL

Perform the following steps if you use COBOL program units with Micro Focus COBOL:

>

Call the script <coboldir>/bin/cobsetenv.
This script sets the required environment variables for the compiler.

>

>

Extend the COBCPY environment variable by adding $UTMPATH/copy-cobol85.

If you create programs based on CPIC, TX or XATMI under openUTM, extend the
COBCPY environment variable as follows:
$UTMPATH/<interface>/copy-cobol85, where <interface> stands for cpic, tx or xatmi.

>

If you create client programs based on UPIC-L, extend the COBCPY environment
variable by adding $UTMPATH/upicl/copy-cobol85.

>

Set the COBMODE environment variable to 64, to generate 64-bit objects.

NetCOBOL

Perform the following steps if you use NetCOBOL program units:

>

Call the script <COBOLDIR>/config/cobol.sh.
This script sets the required environment variables.

>

>

>

Extend the COBCOPY environment variable by adding $UTMPATH/netcobol.

Set the COB_LIBSUFFIX environment variable to None,CPY,cpy.

If you create programs based on CPIC, TX or XATMI under openUTM, extend the
COBCOPY environment variable as follows:
$UTMPATH/<interface>/netcobol, where <interface> stands for cpic, tx or xatmi.

>

If you create client programs based on UPIC-L, extend the COBCOPY environment
variable by adding $UTMPATH/upicl/netcobol.

Note

If you use COBOL program units, you should note the following:

  • There are certain compiler-specific characteristics relating to the keywords. You will find details in openUTM manual ”Programming Applications with KDCS” (chapter "Additional Information for COBOL", references to "keywords").

  • If you want to generate shared objects, please read section "Shared objects (Unix and Linux systems)".