gtpc2m5y | C/C++ Language Support User's Guide |
This function returns the following configuration information about an SNA
resource:
- RID or SCBID
- RVT1 or SCB1 address
- RVT2 or SCB1 address
- Subarea address table (SAT) address
- Network address
- Pseudo LNIATA.
Format
#include <sysapi.h>
struct ridcc_return *ridcc(enum ridcc_func func, int id);
- func
- One of the following values that describes the type of input
argument:
- RIDCC_RID
- Resource identifier (RID) or session control block identifier (SCBID)
- RIDCC_NA
- Network address.
- RIDCC_RVT1
- Resource vector table part 1 (RVT1) address or session control block part
1 (SCB1) address
- RIDCC_RVT2
- Resource vector table part 2 (RVT2) address or session control block part
2 (SCB2) address
- RIDCC_PLIT
- Pseudo line number, interchange address, and terminal address
(LNIATA).
- id
- Value of the input argument specified in the func
parameter, passed as an integer type.
Normal Return
Pointer to a structure of type ridcc_return, which is defined in
sysapi.h.
Error Return
NULL pointer.
Programming Considerations
- One return area for each I-stream is allocated in the CP. The
returned data should be saved by the calling segment before issuing any macro
that could cause it to give up control; once control has passed to
another ECB, the contents of the return area cannot be predicted.
- The programmer must be aware of the size of the input arguments:
- Argument
- Size
- RID or SCBID
- 3 bytes
- RVT1 or SCB1
- 4 bytes
- RVT2 or SCB2
- 4 bytes
- Network address
- 3 bytes
- Pseudo LNIATA
- 3 bytes.
Examples
The following example converts an RID to the RVT1 address.
#include <sysapi.h>
·
·
·
int rid;
void *rvt1_address;
struct ridcc_return *ridcc_parm;
·
·
·
rid = ecbptr()->ebrout
if (ridcc_parm = ridcc(RIDCC_RID,rid))
rvt1_address = ridcc_parm->ridrvt1;
Related Information
None.