gtpc2m83 | C/C++ Language Support User's Guide |
This function returns an 8-byte file address based on the input record type and an 8-byte ordinal number.
Format
#include <tpfio.h> int tpf_fac8c(TPF_FAC8 *parm);
Normal Return
TPF_FAC8_NRM. The ifacret field in the TPF_FAC8 structure also contains TPF_FAC8_NRM, and the ifacmax field in the TPF_FAC8 structure contains the maximum ordinal number for the requested record type and the file address has been placed in the field ifacadr in the TPF_FAC8 structure.
Error Return
One of the following:
The ifacret field in the TPF_FAC8 structure also contains the return code.
Programming Considerations
Examples
The following example generates a system ordinal number (SON) address for #RECTYPE record number 198 and stores it in the output area of the TPF_FAC8 block.
#include <tpfio.h>
·
·
·
TPF_FAC8 fa; MCHR_STRUCT mchr; /* call tpf_fac8c to calculate FARF address */ fa.ifacord = 198; memcpy(fa.ifacrec, "#RECTYPE", sizeof(fa.ifacrec)); fa.ifactyp=IFAC8FCS; tpf_fac8c(&fa); if (fa.ifacret != TPF_FAC8_NRM) { /* error return */ } else { /* normal return */ }
Related Information