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


$ENTRY – Provide entry to JES2 assembly module

z/OS JES2 Macros
SA32-0996-00

Use $ENTRY to identify, to JES2, entry points in an assembly module such as an installation-provided exit routine. Each exit routine must use $ENTRY to define all of the routine's entry points.

Format description

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

>--+-------------------------------------+---------------------->
   |           .-(--R8--)--------------. |   
   '-,BASE--=--+-(--R--n--)------------+-'   
               +-(--R1--,--R2--,----)-+     
               '-NONE------------------'     

>--,BASESET=--+-YES-+--+--------------------+------------------->
              '-NO--'  |            .-NO--. |   
                       '-,CSECT--=--+-YES-+-'   

>--+--------------------+--+-----------------------------+------>
   |            .-YES-. |  '-,EYECATCHER--=--eye_catcher-'   
   '-,ENTRY--=--+-NO--+-'                                    

>--+---------------------------+-------------------------------->
   |              .-STD------. |   
   '-,LINKAGE--=--+-MTENONLY-+-'   
                  +-NONE-----+     
                  +-PC-------+     
                  '-BAKR-----'     

>--+----------------------------+------------------------------->
   |             .-R15--------. |   
   '-,REGUSE--=--+-(--R--n--)-+-'   

>--+---------------------------------------------+-------------->
   |         .-NO------------------------------. |   
   |         |             .-,NOTRACE-.        | |   
   '-,SAVE=--+-+---+--YES--+----------+--+---+-+-'   
               '-(-'       '-,TRACE---'  '-)-'       

>--+-------------------+--+------------------+-----------------><
   '-,TRDATA=tracedata-'  '-,RETADDR=address-'   

symbol
Specifies an entry point name. You must code this parameter. If you code ENTRY=YES, $ENTRY creates an entry in the assembler ESD for symbol.
Note: Be certain the value specified is different from any symbol specified on other $ENTRY or $MODULE statements.
BASE=
Specifies the registers that provide addressability to the entry point. If two or more registers are specified, they must be separated by commas and enclosed in parentheses. If BASE is not specified, BASE=R8 is assumed. A USING statement is generated using the specified registers. If BASE=NONE is specified then no code base register is assumed or set up by $ENTRY.

$ENTRY does not load the base registers unless SAVE=YES is also specified. If SAVE=NO is specified (or defaulted), then it is your responsibility to ensure that each base register is loaded with the entry point address.

CSECT=
Specifies whether a CSECT statement should be generated. If you specify CSECT=YES, the assembled module will include the JES2 version number and the date and time of the assembly. $ENTRY also creates an entry in the MIT entry table.

IBM® suggests that you do not define multiple CSECTs in any JES2 assembly modules including installation exit routines. The default is NO.

ENTRY=
Specifies whether $ENTRY is to generate an assembler ENTRY statement for the symbol parameter that is coded on the $ENTRY macro.
YES
$ENTRY is to generate an ENTRY statement and place an entry in the MIT entry table.
NO
$ENTRY is to place an entry in the MIT entry table but is not to generate an ENTRY statement.

If you code the CSECT= parameter, omit the ENTRY= parameter.

EYECATCHER=
Specifies an eyecatcher that $ENTRY is to include in the assembled module. An eyecatcher is a character string, typically the module name or entry point name, that makes it easier to identify the module in a storage dump. The eyecatcher appears near the module entry point.
You can specify any value that is valid as an operand of an assembler DC instruction. For example:
  …,EYECATCHER=C'A_STRING',…  generates DC C'A_STRING'
  …,EYECATCHER=CL20'MODULENAME',… generates DC CL20'MODULENAME'

If you specify LINKAGE=MTEONLY or LINKAGE=NONE, omit the EYECATCHER= parameter.

LINKAGE=
Specifies the type of entry point environment $ENTRY is to generate and causes JES2 to build an entry (MTE) in the module information table (MIT). The default is based on the routine name and the linkage that would be dictated by the field name in the CADDR or PADDR.
MTEONLY
$ENTRY generates a USING instruction for the symbol parameter. The register specified on the USING Instruction is the register specified on BASE= or the default, register 8. Because $ENTRY does not define the symbol parameter to the assembler, your program must do so.
NONE
$ENTRY defines the symbol parameter to the assembler as a label and generates a USING instruction for that label. The register specified on the USING Instruction is the register specified on BASE= or the default, register 8.
PC
Specifies that the programs that invoke this entry point do so by using a stacking PC instruction.

$ENTRY defines the symbol parameter to the assembler as a label and generates a USING instruction for that label. The register specified on the USING Instruction is the register specified on BASE= or the default, register 8. $ENTRY uses the register specified on REGUSE= or the default, register 15, to establish initial addressability.

STD
Specifies that the programs that invoke this entry point do so by using a branch linkage. The register identified by the REGUSE= parameter, or register 15 when you omit REGUSE=, must contain the entry point address.

$ENTRY defines the symbol parameter to the assembler as a label and generates a USING instruction for that label. The register specified on the USING Instruction is the register specified on BASE= or the default, register 8.

BAKR
Specifies that the programs that invoke this entry point do so by using a branch and stack linkage. The register identified by the REGUSE= parameter, or register 15 when you omit REGUSE=, must contain the entry point address.

$ENTRY defines the symbol parameter to the assembler as a label and generates a USING instruction for that label. The register specified on the USING Instruction is the register specified on BASE= or the default, register 8.

REGUSE=
Specifies either a register that contains the entry point address or a register that $ENTRY can use to establish initial addressability. The default is register 15.
  • If you omit the LINKAGE= parameter or code LINKAGE=STD, $ENTRY requires that a register contain the entry point address. You code the REGUSE= parameter to identify that register. If you omit REGUSE=, register 15 must contain the entry point address.
  • If you code LINKAGE=PC, $ENTRY uses the register specified by REGUSE=. If you omit REGUSE=, $ENTRY uses register 15.
SAVE=
Specifies whether (YES) or not (NO) a $SAVE should be generated as part of the linkage. An optional second parameter specifies whether (TRACE) or not (NOTRACE) the $SAVE should be traced. SAVE=NO is the default.
Note: This keyword is only valid for LINKAGE=STD.
SETBASE=
Specifies whether (YES) or not (NO) the base registers specified on BASE= are to be set. If YES is specified then the value for the first base register is assumed to be in REGUSE. For LINKAGE=PC, the macro sets the address of label in REGUSE. The default for this keyword is YES if LINKAGE=PC or SAVE=YES was specified and NO otherwise.
Note: This keyword is only valid with LINKAGE=STD or LINKAGE=PC.
TRDATA
Trace data to be passed to the $SAVE macro. See $SAVE for syntax. Only valid if $SAVE was requested.
RETADDR=
Specifies a register into which the return address should be restored. RETADDR= is valid only when LINKAGE=PC or LINKAGE=BAKR is specified.

Environment

  • JES2 Main task, JES2 subtask, user environment or FSS environment.
  • $WAIT not applicable.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014