Use this system macro to obtain various types of functional access to a
user's program base or database. The access types are:
- Program access
- Global area database access.
In a multiple database function (MDBF) environment, the CROSC macro is the
interface between common or user-shared TPF programs and unique
user-associated data and programs. Through the macro services
facilities, user-sensitive TPF programs can access programs and databases that
are necessarily user-dependent.
Required Authorizations
|
Key0
| Restricted
| System
| Common Storage
|
| X
|
|
|
Format
Notes:
- accesstype
- label
- A symbolic name can be assigned to the macro statement.
- accesstype
- A positional parameter specifying the access type to be defined or
obtained. This is required in all macro calls.
- ENTDC
- Enter a program and release all previous programs attached to the
ECB.
- ENTNC
- Enter a program with no return expected.
- ENTRC
- Enter a program with return expected (not allowed from control program
(CP) when EXEC=NORM is specified).
- GLBAC
- Obtain subsystem global area update service (not allowed from the control
program (CP)).
- PROGRAM
- The program name that is to be accessed when the access type is ENTDC,
ENTNC, or ENTRC.
- prog
- The name of the program that is to be entered.
- (Rx)
- A register (R0-R7) that contains the address of where the program name can
be found.
- IDLOC
- A keyword operand specifying the location of the identifier to be used in
selecting the table access definitions. This is required in all macro
calls.
- DBI
- Use database ID field (CE1DBI)
- PBI
- Use program base ID field (CE1PBI)
- Ry
- Use the value in the specified register. When Ry is coded, it must
be the symbolic name of (R0-R7) that contains the 2-byte MDBF identifier
if the accesstype was GLBAC. Otherwise, it contains the 2-byte
MDBF identifier for the target PBI. Note that not all valid MDBF
identifiers are valid PBIs.
- BSS
- Use the BSS (Basic Subsystem) program base.
- INVAL=proglab1
- A keyword operand identifying the routine label to be given control if the
identifier fails the MDBF ID integrity check (ordinal number plus complement
not equal to X'FF'), if the designated subsystem was not included in
the last IPL, or if the designated subsystem is inactive. This operand
is required if IDLOC=Rx and EXEC=OPTN are specified in the macro
call. The operand is optional in other macro calls, but if
it is omitted and an error condition is raised, the ECB will be exited with a
system error (for integrity check failure, or for inactive or not included in
last IPL).
- NOTAVL=proglab2
- A keyword operand identifying the routine label to be given control if the
CROSC global interface program, GLBL, has not been locked in storage by
segment GOGO. If not defined and the condition is raised, a system
error with exit is taken.
- EP=entry
- A keyword operand specifying the desired entry point into the global area
update program. This operand is required in macro calls
requesting global access (access type GLBAC). Entry point equates are
defined in the equate macro GLBEQ.
- EXEC
- Specify one of the following:
- OPTN
- OPTN specifies that optional servicing of the specified access request is
needed in lieu of normal servicing. This is optional in macro calls
requesting program base access. If OPTN is specified, control is
returned to the caller with R14 containing the address of the enter
expansion; the enter expansion is not processed.
OPTN is not available when doing a global area database access.
- NORM
- If NORM is specified or left to default and the program is a form of
Enter, the requested function is activated.
Entry Requirements
- The control program (CP) can request program base access (except through
ENTRC), but not global area access.
- The control program (CP) can request a program base access without
supplying the address of an ECB in R9. To accomplish this IDLOC=Rx and
EXEC=OPTN must be specified in the macro call.
- If the operand IDLOC=Rx is coded, the general register specified by Rx
must contain the identifier to be used in selecting the access table.
- If you want control returned to an error routine when the identifier
contained in Rx is incorrect or valid but not available, you must specify the
INVAL parameter.
- If you want control returned to an error routine when the function
requested is not available, you must specify the NOTAVL parameter.
- The entry must not have a record held if update to CE1DBI is
requested.
- The entry reference register (R9) contains the address of the ECB prior to
using this macro if the service is requested by an ECB level entry.
Return Conditions
- Normal Return:
- If EXEC=NORM is coded and the function is ENTRC, ENTNC, or ENTDC, then
activate the requested function.
- Return to next sequential instruction (NSI) after processing the GLBAC
functions.
- If EXEC=OPTN is coded return to the NSI with a condition code of 0 and R14
set to the address of the ENTER expansion in the CROSC expansion.
- The content of R15 is unknown.
- The contents of the remaining general registers are saved during
processing of this macro.
- The ECB fields CE1DBI, CE1PBI, CE1SSU*, CE1GLA*, and CE1GLY* are updated
according to the following matrix:
- Note:
- Whenever the field CE1DBI (DBI) is modified the value in CE1DBI will be used
to locate, and decrease by one, the number of active ECBs for that
subsystem. The value with which it is being replaced will be used to
locate, and increase by one, the number of active ECBs for the
subsystem.
In conjunction with the modification of CE1DBI, the field CE1SSU will be
changed to reflect the identification of the first or only subsystem user of
the subsystem in question. The values in CE1GLA and CE1GLY will be
changed to reflect the base and address of GLOBAL areas A and Y for the
subsystem user.
- Error Returns:
- If the INVAL operand is supplied and the SS ID is found to be incorrect or
not included in this IPL, return to the next sequential instruction with
CC=1. R14 will be set to zero if the SS ID is incorrect, and nonzero if
the SS ID is not included in the IPL. If the error routine address is
not specified, a system error is taken.
- If the NOTAVL operand is supplied and the requested function is not
defined for the subsystem, return to the next sequential instruction with
CC=2. If the error routine address was not specified, a system error is
taken.
- Note:
- All system errors are with EXIT if the calling routine is an ECB level entry,
otherwise the system error is catastrophic.
Programming Considerations
- This macro can be run on any I-stream.
- The CROSC macro should be used only when it is necessary to cross
subsystem boundaries.
- ENTRC to FACE or FACS is a special type of enter and can not be used on
the CROSC macro. Attempting to CROSC to FACE or FACS will result in a
system error dump.
- The CROSC access type ENTNC cannot be called from an ISO-C segment (coded
with BEGIN TPFISOC=YES).
Examples
None.