Guardian Application Conversion Guide

Converting a COBOL85 Program to Run at a High PIN
Converting COBOL85 Applications
096047 Tandem Computers Incorporated 4–11
Declaring CPU and PIN
Data Items
As already stated under “Declaring and Using Guardian Data Items,” earlier in this
section, 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 three-digit data item for just 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) COMPUTATIOSAL clause if you
will never need a PIN higher than 9,999.
Calling COBOL85
Utility Routines
If your existing program calls utility routines in the COBOLLIB or CBL85UTL library
files, you might need to convert these calls to the appropriate D-series routines. The
routines that you must convert are shown in Table 4-1. For a description of all
COBOL85 utility routines, refer to the COBOL85 Reference Manual.
Table 4-1. COBOL85 Utility Routines
C-Series Routine
(ENV is OLD or omitted)
D-Series Routine
(ENV is COMMON or LIBRARY) Reason for Conversion
COBOL85^COMPLETION COBOL_COMPLETION_ The COBOL85^COMPLETION
routine text-length parameter
has been removed.
COBOLSPOOLOPEN COBOL_SPECIAL_OPEN_ The COBOLSPOOLOPEN
routine has been deleted.
Removing ARMTRAP
Procedure Calls
If your existing program calls the ARMTRAP Guardian procedure using the ENTER
statement, remove all calls to this procedure. If you specify the CRE, CRE routines
perform all trap handling. (You are not required to remove calls to the
COBOL85^ARMTRAP routine; however, it is no longer needed because the CRE
selects a trap automatically.)