Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

PROGRAM - define a program unit

The PROGRAM control statement allows you to define the name and properties of a program unit.
If a ROOT table source is to be generated in the KDCDEF run (OPTION statement with GEN=ROOTSRC or GEN=ALL), then you must issue at least one PROGRAM statement.

Generating UTM program units on BS2000 systems

PROGRAM

objectname
, COMP={ ASSEMB    | 
         C         | 
         COB1      | 
         FOR1      |
         PASCAL-XT |
         PLI1      |
         SPL4      |
         ILCS }
[ ,LOAD-MODULE=lmodname ]

objectname

Access point for a program unit (CSECT or ENTRY name). objectname may be up to 32 characters in length.

For details on the characters allowed refer to the section "Format of names".

COMP=

Designates the runtime system that the program unit will be used for.

This is a mandatory operand.

You must specify COMP=ILCS for all program units that support ILCS (Inter Language Communication Services), e.g. program units under COBOL85, FORTRAN90, C, etc.
Whether or not ILCS is supported depends on the compiler version used and on the runtime system version under which the program unit runs.

The value that you must specify for COMP can be found in the appendix of the openUTM manual “Using UTM Applications on BS2000 Systems”.
Please consider these notes especially if the programs were compiled with an older compiler version.

COMP=C is a synonym for COMP=ILCS.
The KDCADM administration program must be generated with COMP=ILCS and the KDCSHUT transaction code must be assigned at least with a TAC statement.

LOAD-MODULE=

lmodname

LOAD-MODULE identifies the name of the load module in which the program unit was linked. This load module must be defined using the LOAD-MODULE statement. lmodname can be up to 32 characters in length.This name is subject to the same rules as the element names of a program library (see also section "Format of names").

Please note the following when using the LOAD-MODULE operand:

  • The KDCADM administration program must not be assigned to a load module generated with LOAD-MODE=ONCALL in the LOAD-MODULE statement.

 

Generating UTM program units on Unix, Linux or Windows systems

PROGRAM

 objectname 
  ,COMP={ C | COB2 | CPP | MFCOBOL | NETCOBOL } 
 [ ,SHARED-OBJECT=shared_object_name ]

objectname

Name of the access point of the program unit. The name must be alphanumeric and may be up to 32 characters in length. For details on the characters allowed refer to the section "Format of names".

COMP=

Designates the compiler used to compile the program unit.

    C

C compiler

Default: C

    CPP 

C++ compiler

    COB2

COBOL compiler (Server Express / NetExpress / Visual COBOL)
This generates a COBOL program that was compiled using a COBOL
complier from Micro Focus.
Only numbers and uppercase letters can be used for the PROGRAM-ID and the access points. This not only complies with IBM conventions, but also guarantees the portability of the programs.

    MFCOBOL

COBOL compiler (Server Express / NetExpress / Visual COBOL), has the same effect as COB2. I.e. a COBOL program that was compiled using a Micro Focus Cobol compiler is generated.

    NETCOBOL

 

NetCOBOL compiler from Fujitsu.

This parameter value is supported only on Unix and Linux systems.

A COBOL program that was compiled using the Fujitsu NetCOBOL compiler is generated.

CAUTION!
In a UTM application, programs must not be simultaneously generated with MFCOBOL/COB2 and NETCOBOL!

SHARED-OBJECT=

shared_object_name

(Program exchange using the dynamic linker)
This operand need only be specified if the program unit is to be loaded dynamically. shared_object_name is the name of the shared object (Unix and Linux system) or DLL (Windows system) into which the program unit was incorporated. This shared object/DLL must be defined using the SHARED-OBJECT statement.