File Utility Program (FUP) Management Programming Manual

ORSERV Programmatic Interface
File Utility Program (FUP) Management Programming Manual523322-001
4-12
SPI Programming Considerations for ORSERV
SPI Programming Considerations for ORSERV
The SPI Programming Manual provides programming considerations for management
applications that use SPI command and response buffers to communicate with
subsystems such as ORSERV. This subsection describes considerations specific to
ORSERV.
Building the Command Buffer
Your application must allocate a command and response buffer to communicate with
ORSERV. This buffer must be large enough to hold each ORSERV command and
response. The recommended buffer length in bytes is ZORS-VAL-BUFLEN.
Your application uses SPI procedures to initialize and add tokens to the command
buffer. To initialize the buffer and to specify the ORSERV command, use the SSINIT
procedure. (Multiple ORSERV commands per buffer are not supported.) SSINIT also
adds the header tokens to the buffer.
When the buffer is initialized with SSINIT, any previous contents of the buffer are
overwritten. Therefore, to save the contents of the buffer before you call SSINIT, use
the SSMOVE procedure to save the contents in a separate variable.
To initialize the fields of extensible structured tokens to null values, use SSNULL. Your
application should always call SSNULL, even if it explicitly sets all currently defined
fields of the token. This ensures that your application continues to run correctly if future
versions of ORSERV add fields to these structured tokens.
Specifying an Object Name
Each ORSERV programmatic command (except GETVERSION) requires an object
type of ZORS-OBJ-FILE. GETVERSION requires the ZORS-OBJ-NULL object type.
ZSPI-TYP-INT2 32-bit signed integer
ZSPI-TYP-INT2-PAIR Pair of 32-bit signed integers
ZSPI-TYP-INT4 64-bit fixed-point number
ZSPI-TYP-LIST Token starting a list
ZSPI-TYP-POSITION 64-bit SPI position descriptor
ZSPI-TYP-SSCTL Special SPI control operation
ZSPI-TYP-SSID Subsystem ID
ZSPI-TYP-STRING Variable-length ASCII string
ZSPI-TYP-SUBVOL 16-byte internal subvolume name
ZSPI-TYP-UINT 16-bit unsigned integer
Table 4-2. Standard SPI Token Types Used by ORSERV (page 2 of 2)
Token Type Description