Use this system macro to do:
- Table Indexing
In a multiple database function (MDBF) environment, several tables are
indexed on a subsystem (SS) or subsystem user ID (SSUID) basis through CE1DBI,
CE1PBI, CE1SSU, or general registers. If the table element size is a
power of 2, you can use this macro to obtain the index value for a specific
ID.
- MDBF ID Integrity Checking
This is an option. If CHECK=YES (default) is specified, the
specified SS or SSUID is first checked for integrity. If the integrity
check fails, (ordinal number plus complement not equal to X'FF'), a
system error is issued. For E-type programs, the entry control
block (ECB) is exited. The error is exited for C-type programs unless
(ENTRY=NO) is specified. If so, a catastrophic system error is
issued.
- Conversions of a SS/SSU ID to the SS/SSU Ordinal Number
This is a modification of function 1. If you omit or specify 0 for
leftshift, the specified register will contain the ordinal number of the input
SS or SSUID.
The reverse case is not supported.
The LEBIC macro expands to inline code for both C-type and E-type
programs.
Format
Notes:
- inputid
- operationreg
- label
- A symbolic name can be assigned to the macro statement.
- inputid
- Specify one of the following:
- DBI
- If CE1DBI is the source of the input ID.
- PBI
- If CE1PBI is the source of the input ID.
- SSU
- If CE1SSU is the source of the input ID.
- REG
- If the general register specified by REG contains the input ID. See
Programming Considerations for more information. REG must contain a SS or SSU ID
in the third and fourth bytes. The first two bytes in the register are
irrelevant.
- operationreg
- REG or (,) See Programming Considerations for more information. Iif specified, REG will contain
the operation result upon return to the macro caller. If operationreg
is not specified and inputid is DBI or SSU, an assembly error is
generated. If inputid is a general register and operationreg is not
specified, the operation result is returned in the general register specified
by inputid.
- leftshift
- NUM or (,)-where NUM is the number of bits (decimal
specification) to be shifted left. If specified, the maximum number of
bits to be shifted is 24 when inputid is DBI, PBI, or SSU. If inputid
is a general register, then the maximum number of bits to be shifted is
8.
Specifying 0 or (,) for leftshift will cause the specified SS/SSU ID to be
converted to the SS/SSU ordinal number.
- ecbreg
- REG or (,)-where REG specifies the base register of
the ECB if other than R9 for C-type macro calls when the DBI, PBI, or SSU is
specified for inputid. See Programming Considerations for more information. If (,) is specified, R9 is used
as the ECB base register when DBI, PBI, or SSU is specified for
inputid. For E-type macro calls this positional parameter must be
(,).
- CHECK
- Specify one of the following:
- YES
- Specifies integrity checking is required (YES is the default). If
the SS or SSU ID given by the macro caller is not valid, the error path is
determined by the ENTRY parameter. See the ENTRY parameter for more
information.
- NO
- Specifies integrity checking is not required.
- ENTRY
- Is valid only if CHECK=YES and called by C-type programs. If this
parameter is coded for an E-type program, an assembly error will
occur.
- YES
- Specifies ECB is exited with a system error. YES is the
default.
- NO
- Specifies that a catastrophic system error is issued.
- ERROR=label
- Specifies a label to which the control will be passed if an error was
detected.
Entry Requirements
- CE1PBI if PBI is specified.
- CE1DBI if DBI is specified.
- CE1SSU if SSU is specified.
- A general register if REG is specified for inputid, which must contain a
SS/SSU ID in the third and fourth bytes.
- For E-type programs, if inputid is DBI, PBI, or SSU R9 must contain an ECB
address.
- For C-type programs when inputid is DBI, PBI, or SSU, if ecbreg is
specified, it must specify the general register that contains the ECB
address. If ecbreg is not specified, R9 must contain the ECB
address.
Return Conditions
- Control is returned to the next sequential instruction (NSI).
- The contents of R14 and R15 are unknown. The contents of all other
registers are preserved across this macro call.
Programming Considerations
Examples
LEBIC SSU,R4,,R9,CHECK=YES
LEBIC SSU,R4,CHECK=NO