Use this general macro to detach a storage block from the specified entry
control block (ECB) data level or data event control block (DECB) while
allowing the ECB data level or DECB to be reused. The block is saved
and can be reattached by using the ATTAC macro.
Format
Notes:
- level
- label
- A symbolic name may be assigned to the macro statement.
- level
- The ECB data level from which the block is to be detached. Valid
formats are:
- datalevel
- Valid values are D0-DF.
- reg
- A register containing the ECB data level value.
- DECB=(reg)|label1
- The label or general register (R1-R7) containing the address of the
DECB where the block will be detached.
- ACPDB
- The user is TPFDF. The ECB data level value is in register 7 (R7)
if level or DECB is not specified.
- CHECK
- Specify one of the following:
- YES
- If specified and the ECB data level or DECB is not holding a block, the
service routine will issue a system error.
- NO
- The macro service routine will make the ECB data level or DECB reusable
without validating that a block is held.
Entry Requirements
- R9 must contain the address of the ECB being processed.
- When CHECK=YES is specified, the ECB data level or DECB must be holding a
storage block.
- When ACPDB is specified, a unique identifier must be supplied in the file
address reference word (FARW) of the indicated ECB data level or DECB.
This identifier will be used when reattaching the block and allows the order
of reattachment to be controlled by the user.
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.
- If the ECB data level is coded as a register and that register is not R7,
the contents of the specified register will be loaded into R7.
- The specified ECB data level or DECB will no longer be holding a storage
block.
Programming Considerations
- This macro can be run on any I-stream.
- The specified ECB data level or DECB must be holding a block at the time
the DETAC macro is issued unless CHECK=NO is specified.
- Excessive use of the macro can cause working storage to be depleted;
therefore, carefully monitor its use.
- The ACPDB option affects how detached blocks are reattached. Refer
to the ATTAC macro.
- The number of DETACs issued is kept in the ECB. The count is
maintained on an ECB data level or DECB basis. Only 255 DETACs are
allowed to be issued against a specific ECB data level. However, more
than 255 DETACs are allowed to be issued against a DECB (the count is
maintained in field IDECDET of the DECB). For the ACPDB option, the
count is maintained on an ECB basis and will only allow 255 ACPDB DETACs to be
issued. When the DETAC count is exceeded, the service routine will
issue a system error.
Examples
None.