Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

Parameters of a C/C++ program unit

A C/C++ program unit contains at least one (but usually several) parameters that are passed in the form of addresses as follows.

[extern "C"] void cprog (kb [,spab] [,param_1] ....[,param_n])

extern "C"

is only necessary for C++ program units: You must identify C++ program units as external "C" links in your source code for openUTM, otherwise errors will occur during linking.

void

A C/C++ program unit is defined as a function of type void.

cprog

The name of the program unit. The name must be specified during the generation in the PROGRAM statement; see the openUTM manual “Generating Applications”.

kb

The name of the communication area (KB). You may choose any name, but the communication area must then be declared under this name. The header file kcca.h is provided for use with the communication area.

spab

The name of the standard primary working area. You may choose any name, but the standard primary working area must then be declared under this name. The header file kcpa.h is provided for use with the KDCS parameter area.

param_1
...
param_n

These are the names of additional objects (AREAs) that must also be declared. In particular, these objects could be storage areas that serve to expand the standard primary working area.

If these objects are not used, then this data does not have to be specified.

The kcca.h, kcpa.h, kcapro.h and kcdf.h header files are included implicitly when the kcmac.h header file is used. This means that you no longer have to explicitly specify these files as header files in the actual program. The definitions contained in these files are available at all times to the programmer.

The value KDCS_SPACES is defined in the include file kcmac.h for the transfer of blanks to Char arrays. The value KDCS_NULL is available for the transfer of the value “binary zero” to Char parameters.