gtpc2m8h | C/C++ Language Support User's Guide |
This function combines the relcc and relfc
functions. The storage block specified by the designated core block
reference word (CBRW) of an entry control block (ECB) data level or a data
event control block (DECB) is released from the ECB. The pool file
address specified by the designated file address reference word (FARW) of an
ECB data level or DECB is returned to the available pool of file
records.
Format
#include <tpfio.h>
tpf_rcrfc(enum t_lvl level)
or
#include <tpfio.h>
tpf_rcrfc(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). This
indicates the CBRW containing the address of the working storage block to be
returned to the system and the FARW containing the pool file address to be
returned to the system.
- decb
- A pointer to a DECB. This indicates the CBRW containing the address
of the working storage block to be returned to the system and the FARW
containing the pool file address to be returned to the system.
Normal Return
Void.
Error Return
Not applicable.
Programming Considerations
- File pool support must be active when this function is issued; the
system must be above UTIL (utility) state.
- This function checks the CBRW of the specified ECB data level or DECB to
determine if a storage block is held. A system error dump is taken if a
block is not held and the entry is exited.
- TPF transaction services processing affects tpf_rcrfc function
processing in the following ways:
- The file address is released only at commit time. For more
information about commit time, see tx_commit-Commit a Global Transaction.
- After the tx_rollback function has completed successfully, file
address release requests are discarded and file addresses are not
released.
- If a system error occurs, processing ends as if the tx_rollback
function was issued.
- Applications that call this function using DECBs instead of ECB data
levels must be compiled with the C++ compiler because this function has been
overloaded.
Examples
The following example releases a core block and file pool address from an
ECB data level and a DECB.
#include <tpfio.h>
·
·
·
TPF_DECB *decb
·
·
·
tpf_rcrfc(D6); /* Release block and file pool address held in D6 */
·
·
·
tpf_rcrfc(decb); /* Release block and file pool address held in DECB */
Related Information
See TPF Application Programming for more
information about DECBs.