Guardian Application Conversion Guide
Converting Basic Elements of a COBOL85 Program
Converting COBOL85 Applications
096047 Tandem Computers Incorporated 4–3
The ZSYSCOB file is divided into sections, which allows you to copy only the sections
your program actually needs. For example, these statements copy only the process
creation and system-message constant declarations:
COPY PROCESS-CONSTANT OF "$SYSTEM.ZSYSDEFS.ZSYSCOB".
COPY SYSTEM-MESSAGES-CONSTANT OF "$SYSTEM.ZSYSDEFS.ZSYSCOB".
To print a listing of the ZSYSCOB file to check the declarations that are available for
your program, use the FUP COPY command:
10> FUP COPY $SYSTEM.ZSYSDEFS.ZSYSCOB, $s.#lineptr
Declaring and Using
Programming Variables
For your existing program to run at a high PIN, you might need to add or modify
declarations for the following variables:
CPU and PIN data items
File-system error numbers
Guardian file names, including disk file names, device names,
and process file names
Process identifiers including process IDs, process handles,
and process descriptors
These declarations are described in the following paragraphs.
Declaring CPU and PIN Data Items
When using Guardian procedures that return values for CPU number and PIN, your
existing program might declare either a two-digit data item for the CPU value and a
three-digit data item for the PIN value, or a just a three-digit data item for a PIN value:
WORKING-STORAGE SECTION.
01 CPU-PIN-DEFINITIONS.
05 CPU PIC S9(2) COMPUTATIONAL.
05 PIN PIC S9(3) COMPUTATIONAL.
Use a USAGE IS NATIVE-2 clause in the declaration of all PIN values, including PINs
for backup processes, to allow up to 32,767 PINs. Declare a CPU number as a separate
two-digit unsigned data item:
WORKING-STORAGE SECTION.
01 CPU-PIN-DEFINITIONS.
05 CPU PIC S9(2) COMPUTATIONAL.
05 PIN NATIVE-2.
Note that you can declare each PIN using a PIC 9(4) COMPUTATIONAL clause if you
will never need a PIN higher than 9,999.