gtpc2m5sC/C++ Language Support User's Guide

relfc-Release File Pool Storage

This function returns a pool file address to the system.

Format

#include   <tpfio.h>
void       relfc(enum t_lvl level);

or

#include   <tpfio.h>
void       relfc(TPF_DECB *decb);

level
One of 16 possible values representing a valid entry control block (ECB) data level from enumeration type t_lvl, expressed as Dx, where x represents the hexadecimal number of the level (0-F). This parameter identifies the file address reference word (FARW) containing the pool file address to be returned to the system.

decb
A pointer to a data event control block (DECB). This parameter identifies the FARW containing the pool file address to be returned to the TPF system.

Normal Return

Void.

Error Return

Not applicable.

Programming Considerations

Examples

The following example releases all forward chain pool records from a message block and zeros the forward chain field in the prime message block (prime message block already on level 1).

#include <tpfio.h>
#include <c$am0sg.h>
 
struct am0sg *prime,*chain;          /* Pointers to message blocks  */
unsigned int adrs[100];
int j,i = 0;
 
prime = ecbptr()->ce1cr1;            /* Base prime message block    */
chain = prime;
 
while(chain->am0fch != 0)            /* Obtain all chain addresses  */
   {
    adrs[i] = chain->am0fch;
    crusa(D2);                       /* Release last core block     */
    chain = find_record(D2,&adrs[i++],"OM",'\0',NOHOLD);
   }
for(j = 0; j < i; j++)               /* Release all chain addresses */
   {
    ecbptr()->ce1fm2 = adrs[j];      /* Set up FARW                 */
    relfc(D2);                       /* and release the address     */
   }

The following example releases a pool record that is held in the DECB named POOLREC.

#include <tpfio.h>
TPF_DECB 	*decb;
DECBC_RC rc;
char		decb_name[16] = "POOLREC";

  ·
  ·
  ·
if ((decb = tpf_decb_locate(decb_name, &rc)) != NULL) { relfc(decb); } else { /* error */ }

Related Information

See TPF Application Programming for more information about DECBs.