By default openUTM assigns a SPAB to each program unit, the maximum length of which is defined when the application is generated (see the openUTM manual “Generating Applications”). It is available to the program unit from the program start until the PEND call.
No data can be stored or transferred using this area beyond the end of the program unit run. Since the SPAB serves only as a program unit-specific working area, it is not included in the transaction and is not rolled back by a RSET call.
The SPAB may contain the following:
the KDCS parameter area for call execution.
In the parameter area the program transfer the data which is necessary for a KDCS call. The entries in the fields of the KDCS parameter depend on the call in question (see chapter "KDCS calls"). Language-specific data structures are available to structure the parameter area: for COBOL in the KCPAC COPY element and for C/C++ in the kcmac.h include file.
the message area (NB) for provision of the input/output data.
Messages read using MGET, DGET, FGET, SGET or GTDA are entered in the message area. Here, openUTM also presents information which you can request with any of the INIT, DADM, INFO and PADM call variants. When performing output, you also use the message area to make available the data transferred with MPUT, FPUT, DPUT, SPUT, PTDA or LPUT.
For each call you have to specify the address of the message area.
further areas with variable data specific for the program run.
Freely selectable fill characters
When you generate a UTM application you can specify a fill character of your choice (in the CLRCH operand of the KDCDEF statement MAX). openUTM then overwrites the SPAB with this character at the end of each processing step. After the start of the application program the area is filled with the specified character in the generated length.
This function is important for program testing because it facilitates the discovery of certain errors in single-process mode. Additionally, you can use this function for data protection.
Figure: Use of primary storage areas (SPAB, KB)