z/OS TSO/E Programming Services
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Example Using the STAX macro instruction

z/OS TSO/E Programming Services
SA32-0973-00

The coding example shown in Figure 1 uses the list and the execute forms of the STAX macro instruction to set up an attention handling exit. The OBUF operand provides a message to be written to the terminal when the attention interruption is received, and the IBUF operand provides space for an input buffer. Because the REPLACE operand is not coded on the macro instruction, the default value of YES is used. The attention handling exit established by this execution of the STAX macro instruction replaces the previous attention handling exit established for this task.

Figure 1. Example Using the STAX macro instruction
* THIS CODING EXAMPLE ISSUES A STAX MACRO INSTRUCTION TO SET UP AN
* ATTENTION EXIT.
*
*   PROCESSING
*      .
*      .
*      .
*
         LA    3,STAXLIST
* ISSUE THE EXECUTE FORM OF THE STAX MACRO INSTRUCTION
*
         STAX  ATTNEXIT,OBUF=(OUTBUF,31),IBUF=(INBUF,140),MF=(E,(3))
*
* CHECK THE RETURN CODE FROM THE STAX SERVICE ROUTINE. A ZERO RETURN
* CODE INDICATES SUCCESSFUL COMPLETION.
*
         LTR   15,15
         BNZ   ERRTN
*
*   PROCESSING
*
ERRTN      ERROR HANDLING ROUTINE
*            .
*            .
*            .
ATTNEXIT   ATTENTION EXIT ROUTINE
*            .
*            .
*            .
*
*
*   STORAGE DECLARATIONS
*
STAXLIST STAX  ATTNEXIT,MF=L             THIS LIST FORM OF THE STAX
*                                        MACRO INSTRUCTION EXPANDS AND
*                                        PROVIDES SPACE FOR THE STAX
*                                        PARAMETER LIST
*
OUTBUF   DC    C'THIS IS A SAMPLE ATTENTION EXIT'
         DS    0F
INBUF    DC    CL140'0'                  INITIALIZE 140 BYTES TO ZERO
*                                        AS THE INPUT BUFFER
*
         END

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014