z/OS MVS Programming: Authorized Assembler Services Reference SET-WTO
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


SET/RESET option

z/OS MVS Programming: Authorized Assembler Services Reference SET-WTO
SA23-1375-00

Syntax

The SET/RESET option of the STATUS macro is written as follows:

Syntax Description
   
   name name: Symbol. Begin name in column 1.
   
One or more blanks must precede STATUS.
   
STATUS  
   
One or more blanks must follow STATUS.
   
SET,MC,PROCESS  
RESET,MC,PROCESS  
   

Parameters

The parameters are explained as follows:

SET,MC,PROCESS
RESET,MC,PROCESS
SET,MC,PROCESS places the program that invokes the macro in process-must-complete mode.

RESET,MC,PROCESS ends process-must-complete mode.

Return codes

When control returns to the caller, register 15 contains one of the following hexadecimal return codes:

Table 1. Return Codes for the SET/RESET Option
Return Code Meaning and Action
00 Meaning: Processing completed successfully.

Action: None required.

04 Meaning: Program error. You issued STATUS SET,MC,PROCESS but it had already been issued.

Action: Do not issue STATUS SET,MC,PROCESS again until you have issued STATUS RESET,MC,PROCESS.

08 Meaning: Program error. You issued STATUS RESET,MC,PROCESS but had never issued STATUS SET,MC,PROCESS.

Action: Issue STATUS SET,MC,PROCESS before issuing STATUS RESET,MC,PROCESS.

0C Meaning: Program error. You issued STATUS SET,MC,PROCESS while running under a non-preemptable SRB.

Action: Avoid issuing STATUS SET,MC,PROCESS from a non-preemptable SRB.

10 Meaning: Program error. You issued STATUS RESET,MC,PROCESS while running under a non-preemptable SRB.

Action: Avoid issuing STATUS SET,MC,PROCESS from a non-preemptable SRB.

Example

Cause a program process to enter, then end, process-must-complete mode.
* Chaining for a nonreenterable program, but note that STATUS SET,MC,
* PROCESS and STATUS RESET,MC,PROCESS do not require that a savearea
* be provided.

SETPMC   CSECT
SETPMC   AMODE 31
SETPMC   RMODE ANY
         STM   14,12,12(13)          SAVE REGISTERS
         LR    12,15                 GET ENTRY POINT ADDRESS
         USING SETPMC,12             ESTABLISH ADDRESSABILITY
         ST    13,SAVEAREA+4         SAVE REGISTER 13
         LR    2,13                  GET CALLER SAVEAREA ADDRESS
         LA    13,SAVEAREA           SET UP OUR SAVEAREA ADDRESS
         ST    13,8(2)               SAVE SAVEAREA ADDRESS IN CALLER
                                     SAVEAREA
         MODESET MODE=SUP,KEY=ZERO   GET INTO SUPERVISOR STATE, KEY 0
         STATUS SET,MC,PROCESS       SET PMC MODE
         LTR    15,15                CHECK RETURN CODE
         BNZ    BADSET               NOT SUCCESSFUL, GO HANDLE...
*
*  Perform processing that requires process-must-complete mode...
*  Note: This processing must not request the local lock and
*  must not issue any SVCs or issue a WAIT.
*
*
RESET    STATUS RESET,MC,PROCESS     RESET PMC MODE
         LTR    15,15                PMC MODE HAD ALREADY BEEN RESET,
                                     ALREADY OUT OF PMC MODE
         BNZ    BADRESET             NOT SUCCESSFUL, GO HANDLE...
*
EXIT     DS     0H
         MODESET MODE=PROB,KEY=NZERO GET OUT OF SUPERVISOR STATE, KEY 0
         L      13,4(13)             RESTORE REGISTER 13
         L      14,12(13)            RESTORE REGISTER 14
         LM     0,12,20(13)          RESTORE REGISTERS 0 THRU 12
         SLR    15,15                SET RETURN CODE 0 IN REGISTER 15
         BR     14                   RETURN TO THE CALLER
BADSET   DS     0H
*
*  Perform appropriate processing for nonzero return code from
*  STATUS SET,MC,PROCESS.
*
         B      EXIT
BADRESET DS     0H
*
*  Perform appropriate processing for nonzero return code from
*  STATUS RESET,MC,PROCESS.
*
         B      EXIT
SAVEAREA DC     18F'0'               18-WORD SAVEAREA
         END SETPMC

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014