gtpc2m1k | C/C++ Language Support User's Guide |
This function detaches a working storage block from an entry control block (ECB) data level or data event control block (DECB). The ECB must be holding a storage block on the specified ECB data level or DECB.
Save the file address reference word (FARW) contents of the ECB data level or DECB being detached. The saved FARW contents will be used as a key to attach the block through the attac_id function.
Format
#include <tpfapi.h> void detac_id(enum t_lvl level);
or
#include <tpfapi.h> void detac_id(TPF_DECB *decb);
Normal Return
Void. The CBRW has been modified to indicate that no block is held.
Error Return
Not applicable.
Programming Considerations
When you code 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 makes data level D6 reusable by detaching the storage block from level D6. A block must be held and can only be retrieved by using the information in the FARW.
#include <tpfapi.h>
·
·
·
detac_id(D6);
The following example saves the working storage block on the DECB referenced by the decb variable.
#include <tpfapi.h> TPF_DECB *decb;
·
·
·
detac_id(decb);
Related Information
See TPF Application Programming for more information about DECBs.