gtps1m5aSystem Macros

SWISC-Switch Entry to Another I-Stream

Use this system macro to:

Format




label
A symbolic name can be assigned to the macro statement.

name
The name of the program to activate (same as for ENTDC macros).

PROGRAM
The name of the program to activate.

prog
The name of the program to be activated.

(Rx)
A register (R0 through R7) that contains the address of where the program name can be found.

BYPASS
Specify one of the following:

NO
The default. The IS value is limited to the I-streams usable by applications, as controlled by the ZCNIS command.

YES
The IS value is limited to all the I-streams online (active) in the CPC.

DECB=(reg)|label1
A register (R0-R7) or a label containing the address of a data event control block (DECB), which contains the data to be passed to the new ECB.

When a DECB is specified, the data block is attached to data level D0 of the created ECB.

IS
Specify one of the following:

MAIN
The main I-stream is the target.

MPIF
The MPIF I-stream is the target.

Ry
The specified register, R0 through R7, is set to the target I-stream number. At run time the register must contain the I-stream number where the ECB is to be created or switched. If the register contains zero, load balancing is used and the ECB is created or switched to the least busy I-stream.

LEV
Specify one of the following:

NONE
No data level is to be passed to the new ECB.

Dn
The data on data level Dn is to be passed to the new ECB.

Ry
The data level equate value specified in Ry is to be passed to the new ECB.

When a data level is specified by either Dn or Ry, the data block is attached to data level D0 of the created ECB.

LIST
Specify one of the following:

#CLHINP
Will get the entry added to the input list.

#CLHRDY
Will get the entry added to the ready list.

#CLHDEF
Will get the entry added to the deferred list.

TYPE
Specify one of the following:

ENTER
This entry is switched through an ENTDC macro.

CREATE
An entry is created on the dispatch list specified by the LIST parameter.

Entry Requirements

Return Conditions

Programming Considerations

Examples

This example creates a new ECB that initially enters the WXYZ segment.

***********************************************************************
* SWISC to WXYZ                                                       *
*                                                                     *
* Registers:                                                          *
*                                                                     *
* 1. R5 is set to point to the name 'WXYZ'.                           *
*                                                                     *
* 2. R3 is set to zero to request that load balancing will schedule   *
*    the created ECB to run on the least busy I-stream.               *
*                                                                     *
* 3. A core block is set up on data level D5.  A copy of this core    *
*    block will be attached to the created ECB on D0.  R4 is set up   *
*    to point to the core block's CBRW.                               *
*                                                                     *
* 4. R14 and R15 are set up to contain the length and address of the  *
*    the parameter string.  The created ECB will be initialized with  *
*    this string starting in EBW000.                                  *
*                                                                     *
* 5. The SWISC macro specifies that the new ECB will be added to the  *
*    CPU Ready list for the selected I-stream.                        *
***********************************************************************
         LA    R5,NEWPGM           Use PROGRAM=R5 interface to specify
*                                    the first program segment that the
*                                    created ECB will enter.
*
         SLR   R3,R3               Use IS=R3 interface to select load
*                                    balancing.
*
         GETCC D5,L0               Get core block to pass via SWISC.
         MVC   0(MSGSIZ,R14),MSG   Move message into core block.
         LA    R4,CE1CR5           Use LEV=R4 interface to pass block.
*
         LA    R14,PARMSIZ         Length of parameter.
         LA    R15,PARM            Address of parameter.
*
         SWISC TYPE=CREATE,                                            \
               PROGRAM=(R5),                                           \
               IS=R3,                                                  \
               LEV=R4,                                                 \
               LIST=#CLHRDY,                                           \
               BYPASS=NO
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
NEWPGM   DC    C'WXYZ'
MSG      DC    C'HELLO TO WXYZ FROM ABCD'
MSGSIZ   EQU   *-MSG
PARM     DC    C'THIS ECB WAS CREATED BY SWISC'
PARMSIZ  EQU   *-PARM