When the name/token lookup service returns control to your exit
routine, register 15 contains one of the following return codes:
- Code
- Meaning
- 00
- Processing completed successfully
- 16
- An error occurred in the lookup
If processing is successful, the following fields of NTKP are filled
in:
- Field
- Description
- NTKPPFL2
- Contains the following output flags:
- Flag
- Description
- NTKPNOTF
- A flag that indicates that the name/token pair was not found.
- NTKPAUTH
- A flag that indicates that the name/token pair was created by
an authorized program.
- NTKPPRST
- A flag that indicates that the name/token pair is persistent.
- NTKPMSTG
- A flag that indicates that dump storage needed for processing
was missing.
- NTKPFLERR
- A flag that indicates that the service found an error in the dump
data.
- NTKPTOKN
- The output token.
- NTKPCASID
- The ASID of the address space that created the name/token pair.
This field is filled in for system-level name/token pairs only.
If field NTKPFNOT was set to 0, the name/token lookup service also
lists the results (see Figure 1) of the
lookup.
Figure 1. Name/Token Lookup Service
OutputSystem level
TOKEN.... SYSTLEV_TOKN_003
NAME..... SYSTLEV_NAME_003
ASID..... 000F
Persistent
Created by authorized program
If an error occurs in the lookup, IPCS issues a message.
Figure 2 shows how a dump exit routine
would invoke the name/token lookup service to retrieve a token:
Figure 2. Example - Invoking the Name/Token
Lookup ServiceTSTSNTK TITLE 'TSTSNTK--Name/Token Service Usage Example'
TSTSNTK START 0 Sample dump processing exit
SPACE 2 Begin standard module prolog
*======] Standard module prolog
SPACE 1 Begin standard module prolog
SAVE (14,12),T,* Save registers
LR R12,R15 Base register for TSTSNTK
USING TSTSNTK,R12 Base register for TSTSNTK
LA R15,SAVEAREA Address of local save area
ST R13,SAVEAREA+4 Chain input save area to local
ST R15,8(,R13) Chain local save area to input
LR R13,R15 Establish use of local save area
LR ABDPLPTR,R01 Base register for ABDPL
USING ABDPL,ABDPLPTR Base register for ABDPL
SPACE 2 Begin dump formatting
*======] Use the name/token exit service to get the system-level
*======] token associated with name "NAMETESTVALUE"
SPACE 1 Begin dump formatting
MVC NTKPMODN,=CL8'TSTSNTK' Module requesting service
MVC NTKPNAME,=CL13'NAMETESTVALUE' NAME
L R15,ADPLSERV -]Services router
CALL (15),((ABDPLPTR),NTK#SERVICE,NTKP) Get the TOKEN
*======] Results will be displayed to user
SPACE 2 Begin standard module epilog
*======] Standard module epilog
SPACE 1 Begin standard module epilog
L R13,SAVEAREA+4 Resume use of input save area
RETURN (14,12),T,RC=(15) Restore registers and return
SPACE 2 Begin data definitions
*======] Define data
SPACE 1 Begin data definitions
R00 EQU 0 Register 0
R01 EQU 1 Register 1
ABDPLPTR EQU 11 ABDPL base register
R12 EQU 12 Register 12
R13 EQU 13 Register 13
R14 EQU 14 Register 14
R15 EQU 15 Register 15
NTKP BLSQNTKP DSECT=NO Name service parameter list
SAVEAREA DC 18F'0' Register save area
NTK#SERVICE DC A(ADPLSNTK) Name service request code
LTORG , Literal pool
BLSABDPL , Common parameter list
END TSTSNTK Test dump formatting exit