SPI Reference Summary Abstract This manual summarizes the common SPI data definitions, SPI procedures, and TACL built-in functions. It provides experienced users with a quick reference to information used in developing SPI-based management applications and subsystems. For detailed information, see the SPI Programming Manual. Product Version SPI G05 and H01 Supported Release Version Updates (RVUs) This publication supports G05.00 and all subsequent G-series RVUs and H06.
Document History Part Number Product Version Published 427507-002 SPI D40 and G05 May 2002 427507-003 SPI D40 and G05 September 2003 427507-004 SPI D40 and G05 December 2003 427507-005 SPI G05 August 2004 427507-006 SPI G05 and H01 February 2006
SPI Reference Summary Index What’s New in This Manual iii Manual Information iii New and Changed Information iii About This Summary v Who Should Read This Summary v How This Summary Is Organized v Notation Conventions v 1.
2. SPI Procedures and Functions Contents 2.
What’s New in This Manual Manual Information SPI Reference Summary Abstract This manual summarizes the common SPI data definitions, SPI procedures, and TACL built-in functions. It provides experienced users with a quick reference to information used in developing SPI-based management applications and subsystems. For detailed information, see the SPI Programming Manual. Product Version SPI G05 and H01 Supported Release Version Updates (RVUs) This publication supports G05.
Changes in the G06.24 Manual What’s New in This Manual • 267, Deadlock Detector Subsystem (DLD) Changes in the G06.24 Manual Added details of subsystems, 260, and 261 under Subsystem Numbers on page 1-23.
About This Summary This summary provides a quick reference to common SPI data definitions, SPI procedures, and TACL built-in functions. For detailed information, see the SPI Programming Manual. Who Should Read This Summary This summary is intended for individuals responsible for developing SPI-based management applications and subsystems. This summary assumes that the reader is familiar with SPI applications.
General Syntax Notation About This Summary italic computer type. Italic computer type letters within text indicate C and Open System Services (OSS) variable items that you supply. Items not enclosed in brackets are required. For example: pathname [ ] Brackets. Brackets enclose optional syntax items. For example: TERM [\system-name.]$terminal-name INT[ERRUPTS] A group of items enclosed in brackets is a list from which you can choose one item or none.
Notation for Messages About This Summary Quotation marks around a symbol such as a bracket or brace indicate the symbol is a required character that you must enter as shown. For example: "[" repetition-constant-list "]" Item Spacing. Spaces shown between items are required unless one of the items is a punctuation symbol such as a parenthesis or a comma. For example: CALL STEPMOM ( process-id ) ; If there is no space between two items, spaces are not permitted.
Notation for Management Programming Interfaces About This Summary Nonitalic text. Nonitalic letters, numbers, and punctuation indicate text that is displayed or returned exactly as shown. For example: Backup Up. lowercase italic letters. Lowercase italic letters indicate variable items whose values are displayed or returned. For example: p-register process-name [ ] Brackets. Brackets enclose items that are sometimes, but not always, displayed.
Change Bar Notation About This Summary lowercase letters. Words in lowercase letters are words that are part of the notation, including Data Definition Language (DDL) keywords. For example: token-type !r. The !r notation following a token or field name indicates that the token or field is required. For example: ZCOM-TKN-OBJNAME !o. token-type ZSPI-TYP-STRING. !r The !o notation following a token or field name indicates that the token or field is optional.
Change Bar Notation About This Summary SPI Reference Summary—427507-006 x
1 SPI Standard Definitions Topic Page SPI Definition Files 1-1 Naming Conventions 1-2 Data Items and Structures 1-3 Standard Definitions 1-6 SPI Definition Files The subvolume and file names of SPI standard definition files are: Name (subvolume.file) Description ZSPIDEF.ZSPITAL TAL definitions ZSPIDEF.ZSPICOB COBOL definitions ZSPIDEF.ZSPIC C definitions ZSPIDEF.ZSPITACL TACL definitions ZSPIDEF.
Naming Conventions SPI Standard Definitions Naming Conventions SPI data object names have these forms, depending on the language: SPI Subsystem Declaration Language subsys-type-description DDL and COBOL subsys^type^description TAL and TACL subsys_type_description C subsys 4-character abbreviation (starting with Z for NonStop Kernel subsystems) that identifies the subsystem that defined the item. type 3-character abbreviation for the type of data object. (See the following subsection.
Data Items and Structures SPI Standard Definitions Data Items and Structures SPI provides these data items and structures: SPI Buffer on page 1-3 Subsystem ID on page 1-4 Command Number on page 1-4 Object-Type Number on page 1-4 Token on page 1-4 Error Number on page 1-5 SPI Buffer SPI messages are composed in a specially allocated block of memory called an SPI buffer.
Subsystem ID SPI Standard Definitions Header Token Contents (page 2 of 2) ZSPI-TKN-SERVER-VERSION Server version ZSPI-TKN-SSID Subsystem ID specified in SSINIT call ZSPI-TKN-USEDLEN Number of bytes used in the buffer Subsystem ID A 6-word (12-byte) structure that uniquely identifies a subsystem: Z-OWNER 8-character string to identify the company or organization providing the subsystem; for NonStop Kernel subsystems provided by HP, “TANDEMbb” where b represents an ASCII blank.
Error Number SPI Standard Definitions A token type (subsys-TYP-desc) describes the structure of the token value. It has two parts: • • Token data type (ZSPI-TDT-desc) is a SPI-defined data type of the token value; no other token data types can be defined. Token length (subsys-TLN-desc) indicates the length of the token value. A token number (subsys-TNM-name) is a signed integer value that identifies the token. Token numbers 1 through 9998 can be used by subsystems.
Standard Definitions SPI Standard Definitions Standard Definitions SPI provides these standard definitions: Fundamental Data Structures on page 1-6 Token Data Types on page 1-8 Token Types and Related Structures on page 1-9 Predefined Values for Parameters and Tokens on page 1-18 Token Numbers on page 1-19 Token Codes on page 1-20 Error Numbers on page 1-22 Subsystem Numbers on page 1-23 Fundamental Data Structures Data Structure Description (page 1 of 3) ZSPI-DDL-BOOLEAN Defines a Boolean value ZSPI
Fundamental Data Structures SPI Standard Definitions Data Structure Description (page 2 of 3) ZSPI-DDL-CHAR64 Defines a string of 64 ASCII characters, also addressable as 32 integers or 64 individual characters Data Structure Description ZSPI-DDL-CHAR128 Defines a string of 128 ASCII characters, also addressable as 64 integers or 128 individual characters ZSPI-DDL-CRTPID Defines an 8-byte HP C-series internal-format process ID; for structure, see ZSPI-DDL-CRTPID ZSPI-DDL-DEVICE Defines an 8-byt
Token Data Types SPI Standard Definitions Data Structure Description (page 3 of 3) ZSPI-DDL-USERID Defines the 2-byte HP user ID ZSPI-DDL-USERNAME Defines a 16-byte HP internal-format user name ZSPI-DDL-VERSION Used with a labeled dump version formatting procedure; equivalent to ZSPI-DDL-UINT Token Data Types Token Data Type Description ZSPI-TDT-BOOLEAN Boolean value ZSPI-TDT-BYTE 8-bit unsigned binary integer, range 0 to 255 (except COBOL) ZSPI-TDT-CHAR 8-bit ASCII character ZSPI-TDT-CRTP
Token Types and Related Structures SPI Standard Definitions Token Data Type Description ZSPI-TDT-SSID 6-word SPI subsystem identifier ZSPI-TDT-STRUCT Subsystem-defined data structure ZSPI-TDT-SUBVOL First two parts (16 bytes) of internal-format file name ZSPI-TDT-TIMESTAMP 64-bit microsecond-resolution Julian timestamp or elapsed time (except C) ZSPI-TDT-TOKENCODE 32-bit value used for SSGET, SSPUT, and EMSGET operations where the token-value parameter is itself a token code ZSPI-TDT-TRANSID
Token Types and Related Structures SPI Standard Definitions Token Type (ZSPI-TYP-) Token Data Type (ZSPI-TDT-) CHAR4 CHAR def ZSPI-DDL-CHAR4. 02 Z-C pic x(4) spi-null " ". 02 Z-S redefines Z-C. 03 Z-I type binary 16 occurs 2 times. 02 Z-B redefines Z-C pic x occurs 4 times. end CHAR5 CHAR def ZSPI-DDL-CHAR5. 02 Z-C pic x(5) spi-null " ". 02 Z-S redefines Z-C. 03 Z-I type binary 16 occurs 2 times. 03 FILLER pic x. 02 Z-B redefines Z-C pic x occurs 5 times. end CHAR6 CHAR def ZSPI-DDL-CHAR6.
Token Types and Related Structures SPI Standard Definitions Token Type (ZSPI-TYP-) Token Data Type (ZSPI-TDT-) CHAR40 CHAR def ZSPI-DDL-CHAR40. 02 Z-C pic x(40) spi-null " ". 02 Z-S redefines Z-C. 03 Z-I type binary 16 occurs 20 times. 02 Z-B redefines Z-C pic x occurs 40 times. end CHAR50 CHAR def ZSPI-DDL-CHAR50. 02 Z-C pic x(50) spi-null " ". 02 Z-S redefines Z-C. 03 Z-I type binary 16 occurs 25 times. 02 Z-B redefines Z-C pic x occurs 50 times. end CHAR64 CHAR def ZSPI-DDL-CHAR64.
Token Types and Related Structures SPI Standard Definitions Token Type (ZSPI-TYP-) Token Data Type (ZSPI-TDT-) FLT FLT def ZSPI-DDL-FLT type float 32 spi-null 0. FLT2 FLT2 def ZSPI-DDL-FLT2 type float 64 spi-null 0. FNAME FNAME def ZSPI-DDL-FNAME tacl fname. 02 Z-DISC type ZSPI-DDL-DISCNAME. 02 Z-PROCESS type ZSPI-DDL-PROCNAME redefines Z-DISC. 02 Z-DEVICE type ZSPI-DDL-DEVNAME redefines Z-DISC. end Related DDL Declaration (page 4 of 6) def ZSPI-DDL-DISCNAME tacl fname.
Token Types and Related Structures SPI Standard Definitions Token Type (ZSPI-TYP-) Token Data Type (ZSPI-TDT-) INT2-PAIR INT2 def ZSPI-DDL-INT2-PAIR. 02 Z-INT2 type ZSPI-DDL-INT2 occurs 2 times. end INT4 INT4 def ZSPI-DDL-INT4 type binary 64 spi-null 0. LASTERR ENUM def ZSPI-DDL-ERR-ENM. (see ENUM definitions below) LIST LIST occurs 0 times. MAP MAP occurs varying. MARK MARK occurs 0 times. PARM-ERR STRUCT def ZSPI-DDL-PARM-ERR. 02 Z-TOKENCODE type ZSPI-DDL-TOKENCODE.
Additional Structure Definitions SPI Standard Definitions Token Type (ZSPI-TYP-) Token Data Type (ZSPI-TDT-) TIMESTAMP TIMESTAMP def ZSPI-DDL-TIMESTAMP type ZSPI-DDL-INT4 spi-null 255 tacl tstamp. TOKENCODE TOKENCODE def ZSPI-DDL-TOKENCODE. 02 Z-TKN. 03 Z-DATATYPE type ZSPI-DDL-BYTE. 03 Z-BYTELEN type ZSPI-DDL-BYTE. 03 Z-NUMBER type ZSPI-DDL-INT. 02 Z-TKNTYPE redefines Z-TKN type ZSPI-DDL-INT occurs 2 times. 02 Z-TKNCODE redefines Z-TKN type ZSPI-DDL-INT2.
ENUM Definitions SPI Standard Definitions EXIOADDR def ZSPI-DDL-EXIOADDR. 02 Z-PATYPE type ZSPI-DDL-ENUM 02 Z-CHNL type ZSPI-DDL-UINT 02 Z-CTLR type ZSPI-DDL-UINT 02 Z-UNIT type ZSPI-DDL-UINT 02 Z-CPU type ZSPI-DDL-UINT 02 Z-FILLER type ZSPI-DDL-INT2 end spi-null spi-null spi-null spi-null spi-null spi-null 255. 255. 255. 255. 255. 255. ENUM Definitions ALLOW-TYPE-ENM def ZSPI-DDL-ALLOW-TYPE-ENM type ENUM as "undefined allow type" begin.
ENUM Definitions SPI Standard Definitions value ZSPI-ERR-NOSPACE as "buffer full". 89 ZSPI-ENM-XSUMERR value ZSPI-ERR-XSUMERR as "invalid checksum". 89 ZSPI-ENM-INTERR value ZSPI-ERR-INTERR as "internal error". 89 ZSPI-ENM-MISTKN value ZSPI-ERR-MISTKN as "token not found". 89 ZSPI-ENM-ILLTKN value ZSPI-ERR-ILLTKN as "illegal token code or map". 89 ZSPI-ENM-BADSSID value ZSPI-ERR-BADSSID as "illegal subsystem ID". 89 ZSPI-ENM-NOTIMP value ZSPI-ERR-NOTIMP as "operation not supported".
ENUM Definitions SPI Standard Definitions value ZSPI-err-objCLASS as "invalid object class specifier". 89 zspi-enm-BADNAME value ZSPI-err-BADNAME as "invalid encoded name". 89 zspi-enm-TEMPLATE value ZSPI-err-TEMPLATE as "encoded name contains template". 89 zspi-enm-ILL-CHAR value ZSPI-err-ILL-CHAR as "illegal character in objname". 89 zspi-enm-no-tkndefid value ZSPI-err-no-tkndefid as "no token definition ID". 89 zspi-enm-INCOMP-resp value ZSPI-err-INCOMP-resp as "incomplete response".
Predefined Values for Parameters and Tokens SPI Standard Definitions value ZSPI-VAL-OBJNAME-MATCH as "SPI_OBJNAME_MATCH_".
Token Numbers SPI Standard Definitions Value Name Value Description ZSPI-VAL-STAT1-SEG-ALLOC 1 Allocate segment error ZSPI-VAL-STAT1-TMPL-OPEN -2 Template file open error ZSPI-VAL-STAT1-TMPL-FILE 2 Invalid template file ZSPI-VAL-STAT1-TMPL-READ 3 Template file read error ZSPI-VAL-STAT1-SEG-MOVE 4 Extended move error ZSPI-VAL-TANDEM “TANDEM ” String value for SSID ZOWNER ZSPI-VAL-TRUE -1 Boolean TRUE (except COBOL) ZSPI-VAL-VERSION version “D20” This version of SPI definitions ZS
Token Codes SPI Standard Definitions Token Number Value Token Number (page 2 of 2) Value ZSPI-TNM-DEFAULT-SSID –437 ZSPI-TNM-PROG-FNAME –241 ZSPI-TNM-DELETE –440 ZSPI-TNM-RESET-BUFFER –436 ZSPI-TNM-ENDLIST –254 ZSPI-TNM-RESPONSE-TYPE –248 ZSPI-TNM-ERRLIST –252 ZSPI-TNM-RETCODE ZSPI-TNM-ERROR –251 ZSPI-TNM-SEGLIST –240 ZSPI-TNM-HDRTYPE –511 ZSPI-TNM-SEGMENTATION –237 ZSPI-TNM-INITIAL-POSITION –438 ZSPI-TNM-SERVER-BANNER –246 ZSPI-TNM-IPM-ID –242 ZSPI-TNM-SERVER-VERSION –50
Token Codes SPI Standard Definitions Token Code (ZSPI-TKN-) Token Type (ZSPI-TYP-) Token Value (ZSPI-TNM-) Description (page 2 of 3) COMMAND ENUM COMMAND Command number COMMENT STRING COMMENT Comment CONTEXT BYTESTRING CONTEXT Context COUNT TOKENCODE COUNT Gets token count (SSGET) DATA-FLUSH SSCTL DATA-FLUSH Flushes data (SSPUT) DATALIST LIST DATALIST Start of data list DEFAULT-SSID SSID DEFAULT-SSID Gets default SSID (SSGET) DELETE TOKENCODE DELETE Deletes token (SSPUT)
Error Numbers SPI Standard Definitions Token Code (ZSPI-TKN-) Token Type (ZSPI-TYP-) Token Value (ZSPI-TNM-) Description (page 3 of 3) PROC-ERR ENUM PROC-ERR Procedure in error PROG-FNAME STRING PROG-FNAME Program file name RESET-BUFFER UINT RESET-BUFFER Resets buffer (SSPUT) RESPONSE-TYPE RESPONSE-TYPE RESPONSE-TYPE Response type RETCODE ENUM RETCODE Return code SEGLIST LIST SEGLIST Marks beginning of segment list SEGMENTATION BOOLEAN SEGMENTATION Segmented response support
Subsystem Numbers SPI Standard Definitions Error Number Symbolic Name Meaning (page 2 of 2) ZSPI-ERR-MISS-LABEL -29 No labeled dump information ZSPI-ERR-MISS-NAME -19 Name not found ZSPI-ERR-MISS-OFFSET -23 Offset not found ZSPI-ERR-MISS-STRUCT -22 Structure not found ZSPI-ERR-MISTKN -8 Token not found ZSPI-ERR-NEW-LINE -17 More text on new line ZSPI-ERR-NO-FORMATID -27 No format ID available ZSPI-ERR-NO-MORE -18 No more fields ZSPI-ERR-NO-SCANID -26 No scan ID available ZSPI
Subsystem Numbers SPI Standard Definitions Subsystem (ZSPI-SSN-) Subsystem Number ZAPS 93 ZART 28 ARCHTAPE Archived Tape ZASM 213 ASM Automated Storage Manager ZASP 226 ASAP Availability, Statistics, and Performance ZASY 249 ASY HP NonStop AutoSYNC software ZATM 172 ATM ATM ZATP 24 ATP ATP6100 terminal and printer processes ZAUD 162 SQLAUDIT HP NonStop SQL/MP Audit ZBAT 9 BAT NetBatch batch processing system ZBKC 76 BACKCOPY Backcopy ZBKU 74 BACKUP Backup ZBRT
Subsystem Numbers SPI Standard Definitions Subsystem (ZSPI-SSN-) Subsystem Number ZCP6 26 ZCPS 266 CPS Matrix SMLC CBB 4.
Subsystem Numbers SPI Standard Definitions Subsystem (ZSPI-SSN-) Subsystem Number Mnemonic Description (page 4 of 10) ZENV 107 ENVOY Envoy ZESA 217 ETHSA SNMP Ethernet/Token-Ring Subagent ZESC 242 ZESM 212 ESM Enterprise Storage Manager ZETN 221 ETN32SRV Nonstop Operating System Enhanced TN3270 Server ZEXF 88 ZEXP 30 EXPAND Expand networking tool ZFIL 68 FILESYS File system ZFIR 92 ZFOX 13 ZFSP 240 ZFSM 262 FSM Fibre Channel Storage Monitor ZFTM 98 FTAM Open Sy
Subsystem Numbers SPI Standard Definitions Subsystem (ZSPI-SSN-) Subsystem Number Mnemonic Description (page 5 of 10) ZIPX 164 IPXSPX Interprocessor Extended/Subsystem Processor Extended ZISA 196 IPXSA IPX-SPV Subsystem (NetWare on NonStop operating system) ZKRF 227 ZKRN 199 KRN Kernel Subsystem ZL4J 265 L4J Java Logging Subsystem1 ZLAM 19 TLAM HP Tandem LAN Access Method/Multilan connectivity tool ZLAN 193 LAN Local area network ZLBL 159 Tapestry Label ZLDS 132 T1002 Te
Subsystem Numbers SPI Standard Definitions Subsystem (ZSPI-SSN-) Subsystem Number Mnemonic Description (page 6 of 10) ZNBX 178 NBX NETBIOS over IPX/SPX ZNDC 235 ZNDS 153 ZNFS 77 ZNIM 219 ZNMA 101 NMA OSI Network Management Agent ZNNM 117 NNM NonStop NET/MASTER ZNNS 232 NNSERVER Network Node Server ZNOS 234 ZNSC 204 NSC NonStop C Multitasking Engine ZNSK 183 NSK NonStop operating system/Kernel-Managed Swap Events ZNST 120 TEXTBASE TEXTBASE ZNSX 163 NSX Network S
Subsystem Numbers SPI Standard Definitions Subsystem (ZSPI-SSN-) Subsystem Number Mnemonic Description (page 7 of 10) ZPHI 135 DSM/SCM DSM/Software Configuration Manager ZPMT 81 DSMPM Problem Management and Tracking ZPNA 113 PNA Programmatic Network Administrator ZPRT 214 PRT TCP/IP Utilities ZPUP 7 PUP Peripheral Utility Program ZPWR 89 ZPWY 8 ZQAT 152 ZQIO 166 QIO Shared I/O for Transmission Control Protocol/Internet Protocol (TCP/IP) ZRAL 175 RAL Resource access lay
Subsystem Numbers SPI Standard Definitions Subsystem (ZSPI-SSN-) Subsystem Number Mnemonic Description (page 8 of 10) ZSMF 168 SMF HP NonStop Storage Management Foundation ZSMN 237 SANMAN External system area network manager process ZSMP 155 SMP Simple Network Management Protocol (SNMP) ZSNM 121 ZSNT 201 ZSO4 42 ZSPI 1 ZSPL 57 ZSPR 206 ZSQA 192 ZSQL 161 SQL NonStop SQL/MP (SQL/MP) ZSRL 184 SRL Shared run-time library ZSRT 56 Sort and FastSort utilities ZSRV 67 Su
Subsystem Numbers SPI Standard Definitions Subsystem (ZSPI-SSN-) Subsystem Number ZTBL 158 ZTCI 80 ZTCI Transmission Control Protocol/Internet Protocol (TCP/IP) ZTC6 246 TCP/IPv6 NonStop TCP/IPv6 ZTCP 220 TCPMAN TCP/IP Manager ZTHL 39 THL HP Tandem HyperLink (THL) ZTIF 169 TIF Tandem Instrumentation Facility ZTIL 38 ZTLK 112 TTALK TandemTalk ZTLN 65 TLN Talon ZTMD 20 TMDS Tandem Maintenance and Diagnostic System ZTMF 10 TMF NonStop Transaction Management Facility
Subsystem Numbers SPI Standard Definitions Subsystem (ZSPI-SSN-) Subsystem Number Mnemonic Description (page 10 of 10) ZWVP 257 WVPT Web ViewPoint ZX25 41 X25AM X.
2 SPI Procedures and Functions Topic Page SPI Procedure Calls 2-1 TACL Built-In Functions 2-9 Language-Specific Considerations 2-15 SPI Procedure Calls Both SPI requesters and servers use SPI procedures to initialize messages and extensible structured tokens, place tokens in messages, retrieve token values from messages, and move tokens from one message buffer to another. The general syntax follows the description of each procedure.
SSNULL Procedure SPI Procedures and Functions Parameter Value/Ref Description (page 2 of 2) serverversion value Version of subsystem or server program checksum value Checksum flag (enables or disables checksum protection) max-fieldversion value Unsigned integer value that initializes maximum field version of buffer header (default = 0) SSNULL Procedure SSNULL initializes extensible structured token structure with null values.
SSPUT and SSPUTTKN Procedures SPI Procedures and Functions Special Operations Tokens for SSPUT and SSPUTTKN Token Type Operation ZSPI-TKN-BUFLEN UINT Modifies buffer length ZSPI-TKN-CHECKSUM BOOLEAN Enables or disables buffer checksum ZSPI-TKN-CLEARERR SSCTL Clears last-error information to zero ZSPI-TKN-DATA-FLUSH SSCTL Flushes tokens starting at current position ZSPI-TKN-DELETE TOKENCODE Deletes a token from the buffer ZSPI-TKN-INITIAL-POSITION BOOLEAN Resets position to start of buf
SSGET and SSGETKN Procedures SPI Procedures and Functions ZSPI-TKN-RESET-BUFFER Use this token code before extracting tokens from an SPI buffer received (in either a request or a reply) from another process. SSPUT SSPUTTKN ( buffer , ZSPI-TKN-RESET-BUFFER , maxlen ) ! i SSGET and SSGETKN Procedures These procedures extract tokens and related information from the SPI buffer. (Do not use SSGETTKN in COBOL programs.
SSGET and SSGETKN Procedures SPI Procedures and Functions Special Operations Tokens for SSGET and SSGETTKN Token Type Operation ZSPI-TKN-ADDR TOKENCODE Retrieves address of token ZSPI-TKN-BUFLEN UINT Retrieves buffer length ZSPI-TKN-CHECKSUM BOOLEAN Retrieves checksum flag ZSPI-TKN-COMMAND ENUM Retrieves command number ZSPI-TKN-COUNT TOKENCODE Counts occurrences of token ZSPI-TKN-DEFAULT-SSID SSID Retrieves SSID at current position ZSPI-TKN-HDRTYPE UINT Retrieves message header type
SSGET and SSGETKN Procedures SPI Procedures and Functions ZSPI-TKN-COUNT Use this token code to get the total number of occurrences of a specific token (starting from a specified index). SSGET SSGETTKN ( , , , , , [ [ [ [ buffer ZSPI-TKN-COUNT token-id ] index ] count ] ssid ] ! ! ! ! ) i i o i This operation returns in count, INT .EXT:ref:1, the total number of occurrences of token-id. If index is zero or not supplied, counting starts from the current position.
SSGET and SSGETKN Procedures SPI Procedures and Functions ZSPI-TKN-NEXTCODE Use this token code to get the next token code in the buffer that is different from the current token code. SSGET SSGETTKN ( buffer , ZSPI-TKN-NEXTCODE , [ next-token-code ] , , [ occurs ] , [ ssid ] ! o ! o ! o ) next-token-code contains the next different token code in the buffer. ssid contains the number of contiguous occurrences of next-token-code. The index parameter has no effect on this operation.
SSMOVE and SSMOVETKN Procedures SPI Procedures and Functions This operation returns in byte-offset, INT .EXT:ref:1, the byte offset from the start of the buffer to the value associated with the specified token code and index. SSMOVE and SSMOVETKN Procedures These procedures copy tokens from one SPI buffer to another. (Do not use SSMOVETKN in COBOL programs.
TACL Built-In Functions SPI Procedures and Functions TACL Built-In Functions SPI built-in functions can be used in TACL macros and routines. These built-in functions are #SSGET, #SSGETV, #SSINIT, #SSMOVE, #SSPUT, and #SSPUTV. #SSINIT Built-In Function #SSINIT initializes a STRUCT as an SPI message buffer. #SSINIT [ / TYPE 0 / ] buffer-var ssid command [ / type-0-option [ , type-0-option ] ...
#SSNULL Built-In Function SPI Procedures and Functions #SSNULL Built-In Function The #SSNULL built-in function initializes a structure with null values. Use this procedure before setting values within a structure for an extensible structured token. Note. Your macro or routine must always use #SSNULL before placing values in the fields of a structure, even when all currently defined fields will be set explicitly. This practice lets the program continue to work with future RVUs.
#SSPUT and #SSPUTV Built-In Functions SPI Procedures and Functions Expansion Status code (SPI error) = 0, -1 through -12 Parameter Description COUNT count Token count; >1 = space-separated list of count elements, each described by a token-code (count = 1 through 65535) (default = 1) SSID ssid Subsystem ID that qualifies token-code (default or 0.0.
#SSGET and #SSGETV Built-In Functions SPI Procedures and Functions #SSGET and #SSGETV Built-In Functions #SSGET and #SSGETV retrieve binary token values from a SPI buffer and convert them to external representation (#SSGET) or put them in a STRUCT (#SSGETV). #SSGET [ / option [ , option ] ... / ] buffer-var get-op #SSGETV [ / option [ , option ] ...
#SSGET and #SSGETV Built-In Functions SPI Procedures and Functions Parameter Description (page 2 of 2) ZSPI^TKN^NEXTCODE Returns next token code that differs from current token code, followed by subsystem ID ZSPI^TKN^NEXTTOKEN Returns next token code, followed by subsystem ID ZSPI^TKN^OFFSET Returns byte offset of o-token-id (token code or token map) Header Tokens Retrieved by #SSGET and #SSSGETV Token Type Operation ZSPI^TKN^BUFLEN UINT Buffer length ZSPI^TKN^CHECKSUM INT Checksum flag Z
#SSMOVE Built-In Function SPI Procedures and Functions #SSMOVE Built-In Function #SSMOVE copies tokens from one SPI message buffer to another. #SSMOVE [ / option [ , option ]...
Language-Specific Considerations SPI Procedures and Functions Language-Specific Considerations Language considerations for using the SPI procedures or built-in functions involve: Buffer Declarations on page 2-15 SSID Initialization on page 2-15 Token Map Definition on page 2-16 Passing token-id by Value or Reference on page 2-16 Calling SPI Procedures on page 2-16 Data Types of SPI Parameters on page 2-17 Data Types for SPI Token Data Types on page 2-18 Buffer Declarations Syntax for buffer declarations
Token Map Definition SPI Procedures and Functions COBOL (Not applicable; the SSID record in the COPY file is already initialized.) C subsys_val_ssid_def { ZSPI_VAL_TANDEM, subsys_val_ssid= ZSPI_SSN_subsys, subsys_VAL_VERSION }; TACL #SET subsys^VAL^SSID & [ZSPI^VAL^TANDEM].[ZSPI^SSN^subsys]. [subsys^VAL^VERSION] Token Map Definition TAL programs require an additional step to initialize token maps (unlike the other supported languages).
Data Types of SPI Parameters SPI Procedures and Functions COBOL ENTER TAL "spiproc" USING param-1 param-2 ... param-n GIVING status. C status = SPIPROC (param_1 , param_2 ..., param_n ) TACL #SET status [ #spifunc / option / param^1 param^2 ... param^n ] or #SET status [ #spifunc / option / [ val^1 ] [ val^2 ] ...[ val^n ]] Note. A TACL built-in function in a macro or routine calls the corresponding SPI procedure.
Data Types for SPI Token Data Types SPI Procedures and Functions Parameter TAL COBOL C TACL (page 2 of 2) sourcebuffer STRUCT .
Data Types for SPI Token Data Types SPI Procedures and Functions Token Data Type (DDL) Corresponding TAL Data Type (page 2 of 2) ZSPI-TDT-FLT REAL ZSPI-TDT-FLT2 REAL64 ZSPI-TDT-FNAME STRUCT .variable(ZSPI^DDL^FNAME^DEF) ZSPI-TDT-FNAME32 STRUCT .variable(ZSPI^DDL^FNAME32^DEF) ZSPI-TDT-INT INT ZSPI-TDT-INT2 INT(32) ZSPI-TDT-INT4 FIXED ZSPI-TDT-MAP STRUCT .variable(subsys^DDL^name) ZSPI-TDT-PHANDLE STRUCT .variable(ZSPI^DDL^PHANDLE^DEF) ZSPI-TDT-SSID STRUCT .
Data Types for SPI Token Data Types SPI Procedures and Functions Token Data Type (DDL) Corresponding COBOL Data Type (page 2 of 2) ZSPI-TDT-MAP subsys-DDL-name ZSPI-TDT-PHANDLE PIC X(1) ZSPI-TDT-SSID (ZSPI-DDL-SSID in ZSPIDEF.ZSPICOB) ZSPI-TDT-STRUCT subsys-DDL-name ZSPI-TDT-SUBVOL (ZSPI-DDL-SUBVOL in ZSPIDEF.ZSPICOB) ZSPI-TDT-TIMESTAMP NATIVE-8 ZSPI-TDT-TOKENCODE (ZSPI-DDL-TOKENCODE in ZSPIDEF.
Data Types for SPI Token Data Types SPI Procedures and Functions Token Data Type (DDL) Corresponding C Data Type (page 2 of 2) ZSPI-TDT-TOKENCODE struct (zspi_ddl_tokencode_def in zspidef.zspic) ZSPI-TDT-TRANSID struct (zspi_ddl_transid_def in zspidef.zspic) ZSPI-TDT-UINT unsigned short ZSPI-TDT-USERID zspi_ddl_userid_def ZSPI-TDT-USERNAME struct (zspi_ddl_username_def in zspidef.
SPI Procedures and Functions Data Types for SPI Token Data Types SPI Reference Summary—427507-006 2- 22
Index C Counting token occurrences 2-6 D Deleting tokens, special SSPUT operation 2-3 P ZSPI-TKN-LEN, SSGET special operation 2-6 ZSPI-TKN-NEXTCODE, SSGET special operation 2-7 ZSPI-TKN-NEXTTOKEN, SSGET special operation 2-7 ZSPI-TKN-OFFSET, SSGET special operation 2-7 ZSPI-TKN-RESET-BUFFER, SSPUT special operation 2-4 Pointers, resetting 2-4 S SSGET procedure, syntax 2-4 SSGETTKN procedure, syntax 2-4 SSID, retrieving current 2-6 SSINIT procedure, syntax 2-1 SSMOVE procedure, syntax 2-8 SSMOVETKN proc
Z Index SPI Reference Summary—427507-006 Index -2