gtpc2mhi | C/C++ Language Support User's Guide |
This function returns the number of records used.
Format
#include <c$to2.h> long TO2_getNumberOfRecords (const TO2_PID_PTR pid_ptr, TO2_ENV_PTR env_ptr);
Normal Return
The number of records used by TPF collection support (TPFCS) to hold and organize the data of the collection will be returned.
Error Return
Not applicable.
Programming Considerations
This function does not use TPF transaction services on behalf of the caller.
Examples
The following example prints the number of assigned records.
#include <c$to2.h> /* Needed for TO2 API functions */ #include <stdio.h> /* APIs for standard I/O functions */ TO2_ENV_PTR env_ptr; /* PTR to the TO2 environment */ TO2_PID collect; /* PTR to PID return field */ long numberofrecords;
·
·
·
numberofrecords = TO2_getNumberOfRecords(&collect, env_ptr); printf("The number of records is %ld.\n", numberofrecords);
Related Information