gtpc2m7y | C/C++ Language Support User's Guide |
This function provides interfaces to release a data event control block
(DECB).
Format
#include <c$decb.h>
void tpf_decb_release(TPF_DECB *decb);
or
#include <c$decb.h>
void tpf_decb_release (char *name);
- decb
- A pointer to the DECB to be released.
- name
- A pointer to a 16-byte user-specified DECB name. The DECB name was
previously specified on a tpf_decb_create call.
Normal Return
Void.
Error Return
Not applicable.
Programming Considerations
- The DECB is an alternative to standard ECB data level information, which
is used to specify information about I/O request core block reference word
(CBRW) and file address reference word (FARW) fields. The DECB fields
specify the same CBRW and FARW information without requiring the use of an ECB
data level. All the same requirements and conditions that apply to the
CBRW and FARW in the ECB also pertain to the same field information in the
DECB.
- The FARW in the DECB provides storage for an 8-byte file address.
- The service routine will take a SERRC (which is a standard memory dump of
main storage) and exit the ECB for any of the following reasons:
- The DECB to be released does not currently exist
- The DECB is holding a block of storage
- The DECB has I/O pending
- The DECB has detached core blocks.
- Applications that use DECBs must be compiled with the C++ compiler.
- This function is implemented in dynamic link library (DLL)
CTAD. You must use the definition side-deck for DLL CTAD to link-edit
an application that uses this function.
Examples
The following example locates a DECB and releases it.
#include <c$decb.h>
·
·
·
DECBC_RC rc;
TPF_DECB *decb;
char decb_name[16] = "APPLWXY";
·
·
·
if ( (decb = tpf_decb_locate(decb_name, &rc)) != NULL );
{
tpf_decb_release(decb); /* release the DECB that was located */
} else
{
/* failed to locate DECB, check rc for the reason */
}
Related Information
See TPF Application Programming for more
information about DECBs.