Distributed Name Service (DNS) Management Programming Manual
DNS Programming Example, COBOL85
46958 Tandem Computers Incorporated E–9
 ENTER TAL "SSMOVE"
 USING ZSPI-TKN-CONTEXT
 DNS-RESPONSE-BUF
 1
 DNS-PROMPT-BUF
 1
 GIVING SPI-STATUS.
 IF SPI-STATUS NOT = 0
 PERFORM 900-SET-STATUS-ERROR.
 200-SEND-TO-NAME-MANAGER.
*
* Send the contents of DNS-PROMPT-BUF to the name manager; return
* the response in caller's response buffer
*
 READ DNS-MANAGER-FILE
 WITH PROMPT DNS-PROMPT-BUF.
 IF DNS-NO-ERROR
 MOVE DNS-IO-BUF TO DNS-RESPONSE-BUF.
 300-RESET-BUFFER-POSITION.
*
* SSPUT with ZSPI-TKN-INITIAL-POSITION requires a <value> parameter
* containing zero; we'll use SPI-STATUS as this parameter
*
 MOVE 0 TO SPI-STATUS.
 ENTER TAL "SSPUT"
 USING DNS-RESPONSE-BUF
 ZSPI-TKN-INITIAL-POSITION
 SPI-STATUS
 GIVING SPI-STATUS.
 IF SPI-STATUS NOT = 0
 PERFORM 900-SET-STATUS-ERROR.
 400-RESET-BUFFER-ERROR.
*
* Clear last buffer error
*










