gtpc2m1kC/C++ Language Support User's Guide

detac_id-Detach a Working Storage Block from the ECB

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);

level
One of 16 possible values representing a valid ECB data level from 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.

decb
A pointer to a DECB.

Normal Return

Void. The CBRW has been modified to indicate that no block is held.

Error Return

Not applicable.

Programming Considerations

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.