gtpc2m65 | C/C++ Language Support User's Guide |
This function is used to obtain an RCPL or session partner name.
Format
#include <tpfapi.h> union selec_return *selec(int req_type, union selec_arg *s_req);
Normal Return
Pointer to union of type selec_return, which may contain either a structure of type selec_ret_name or selec_ret_RCPL containing the requested information. This union is defined in tpfapi.h.
Error Return
The selrtncd field in selec_return is used to return errors discovered in the selec_arg parameters. The following codes are defined:
Programming Considerations
If req_type is not SELEC_NAME or SELEC_RCPL, a system error with exit results.
Examples
The following example calls selec to obtain the RCPL for the network qualified name at EBW032. A check is performed for certain errors.
#include <tpfapi.h> union selec_arg *reqptr; union selec_return *retptr;
·
·
·
reqptr = (union selec_arg *) &(ecbptr()->ebw032); /* storage for selec_arg */ strncpy(&(reqptr->name_type.selorg), "TPFDATA ", 8); /* fill in blanks for */ strncpy(&(reqptr->name_type.selnetid), "MVS1 ", 8); /* length of 8 */ strncpy(&(reqptr->name_type.selnode), "DB2 ", 8); retptr = selec(SELEC_NAME, reqptr); switch (retptr->selec_ret_name.selrtncd) { case 04: serrc_op(SERRC_EXIT, 0x999004, "Invalid Name", NULL); case 32: serrc_op(SERRC_EXIT, 0x999020, "SLU not active", NULL); }
Related Information