gtpc2m1i | C/C++ Language Support User's Guide |
This function detaches a working storage block from an entry control block
(ECB). The ECB must be holding a storage block on the specified
level.
Format
#include <tpfapi.h>
void detac(enum t_lvl level);
- level
- One of 16 possible values representing a valid data level from the
enumeration type t_lvl, expressed as Dx, where x
represents the hexadecimal number of the level (0-F). The
working storage block on this data level is the block to be detached.
Normal Return
Void. The CBRW has been modified to indicate that no block is
held.
Error Return
Not applicable.
Programming Considerations
- Specifying an invalid data level results in a system error with
exit.
- Excessive use of this function can cause a depletion of working
storage; therefore, its use should be carefully monitored.
- The detach functions (detac, detac_ext, and
detac_id) and the attach functions (attac,
attac_ext, and attac_id) push and pop working storage
blocks to and from a list chained from the ECB. The attac
function always attaches the block most recently detached from the specified
data level. The attac_ext function attaches different blocks
depending on how it is coded. The attac_id function attaches
a working storage block with a matching FARW field to an ECB.
When coding attach and detach function calls, use the attac and
detac function calls together, or the attac_ext and
detac_ext function calls together, or the attac_id and
detac_id function calls together.
Examples
The following example detaches a working storage block from level
D6.
#include <tpfapi.h>
·
·
·
detac(D6);
Related Information
See TPF Application Programming for more
information about DECBs.