z/OS JES2 Macros
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


$SJBFIND – Locate a subsystem job block (SJB)

z/OS JES2 Macros
SA32-0996-00

Use $SJBFIND to locate a specific subsystem job block (SJB). On return to the caller, R1 contains the address of the SJB. If TYPE=FIRST or TYPE=LAST, R0 will contain the address of the HASP address space block (HASB).

Format description

Read syntax diagramSkip visual syntax diagram
>>-+--------+--$SJBFIND----------------------------------------->
   '-symbol-'             

>--TYPE--=--+-+---+--LOJ--+-------------+--+-------------------->
            | '-(-'       '-,--FIRST--)-'  |   
            +-+---+--SSIB--+-------------+-+   
            | '-(-'        '-,--FIRST--)-' |   
            +-FIRST------------------------+   
            '-LAST-------------------------'   

>--+----------------------------+------------------------------->
   '-,--ASID--=--+-label------+-'   
                 '-(--R--n--)-'     

>--+-----------------------------+-----------------------------><
   '-,--ERRET--=--+-label------+-'   
                  '-(--R--n--)-'     

TYPE=
Specifies the type of SJB to locate, as follows:
Type
Meaning
LOJ
Life-of-job SJB
(LOJ,FIRST)
Specifies the life-of-job SSIB SJB and if not there, the first SJB for the address space.
SSIB
Subsystem information SJB
(SSIB,FIRST)
Specifies the caller's SSIB SJB and if not there the first SJB for the address space.
FIRST
First SJB of the address space
LAST
Last SJB of the address space
ASID=
Specifies the address space identifier (ASID) that is to be used if TYPE=FIRST or TYPE=LAST is also specified. If label is specified, it must indicate a halfword area. The default is the current ASID.
ERRET=
The address to branch to if an error occurs.

Return codes

The following return codes (in decimal) are returned in register 15.
Return Code
Meaning
0
SJB found
4
SJB not found
8
SJB not found because HASB is missing.
12
SJB not found because subsystem names are different.

Programming requirement

Be certain to include $TRE on the $MODULE call. The $SJBFIND calls $GETHP which requires this mapping.

Environment

  • User environment.
  • MVS™ WAIT cannot occur.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014