SPI Programming Manual (H06.24+, J06.13+)

SPI Programming Manual427506-007
7-1
7 SPI Programming in COBOL
This section provides language-specific information for the programmer who is using
COBOL to write an SPI requester or server. (COBOL74 does not support SPI.)
Definition Names in COBOL
Symbolic names in this section are in the COBOL form using hyphens. For example,
the DDL token code ZSPI-TKN-RETCODE is expressed the same way in COBOL.
COBOL Definition Files
COBOL applications include COPY statements to copy in each section of the COBOL
definition files (copy libraries) that they use, including the ZSPI definition file and the
definition files for all subsystems with which the programs communicate.
The COBOL version of the SPI standard definitions is in a file named
ZSPIDEF.ZSPICOB on the disk volume chosen by your site. For NonStop Kernel
subsystems, the COBOL versions of the subsystem definitions have file names of the
form ZSPIDEF.
subsysCOB, where subsys is the 4-character subsystem
abbreviation. For the individual section names, see the listings of these files. You can
include these COPY statements in any order.
For example, if your application sends the CONTROL PM command to Pathway, it
should include COPY statements similar to:
EXTENDED-STORAGE SECTION.
copy CONSTANTS of $SYSTEM.ZSPIDEF.ZSPICOB.
copy ZPWY-DDL-PAR-CONTROL-PM of $SYSTEM.ZSPIDEF.ZPWYCOB.
copy CONSTANTS of $SYSTEM.ZSPIDEF.ZPWYCOB.
Topic Page
Definition Names in COBOL
7-1
COBOL Definition Files 7-1
Declarations Needed in COBOL Programs 7-2
Interpreting Boolean Values 7-2
Interprocess Communication 7-3
Writing a Server in COBOL 7-4
SPI Procedure Syntax in COBOL 7-4
Examples 7-6