gtpc2m92C/C++ Language Support User's Guide

uatbc-MDBF User Attribute Reference Request

This function is used to provide addressability to an SSU slot in the Subsystem User Table (MS0UT). The function calculates the requested SSU slot address and returns a pointer to the slot in the uatbc_area. The user can access the data in the SSUT via the ms0ut structure (see header file c$ms0ut).

Format

#include   <c$uatbc.h>
int        *uatbc(struct uatbc_area *uatbc_area_ptr);

uatbc_area_ptr
A pointer to a work area for uatbc. This area is used for passing parameters to uatbc and for holding return information.

uatbc_area_ptr-> uat_call
Following are the possible values for uat_call. Each value indicates to uatbc what and where is the input parameter.

UAT_ESSI
Input is the SS ID in the ECB, ce1dbi

UAT_ESSU
Input is the SSU ID in the ECB, ce1ssu

UAT_RSSI
Input is the SS ordinal number in the uatbc_area, uat_parm. The SS ordinal number must be in the left-most byte of uat_parm.

UAT_RSSU
Input is the SSU ordinal number in the uatbc_area, uat_parm. The SS ordinal number must be in the left-most byte of uat_parm.

UAT_NSSI
Input is the SS name in the uatbc_area, uat_parm.

UAT_NSSU
Input is the SSU name in the uatbc_area, uat_parm.

uatbc_area_ptr->uat_parm
The area contains the addition parameter as specified by uat_call. The contents of uat_parm must be left-justified.

Normal Return

#define UAT_SUCCESS Return code 0.

Error Return

Table 34. uatbc Error Return

Value Name Return Code Description
#define UAT_EXCD 8 Either the SS ordinal number exceeds the number of subsystems included in the last IPL or the SSU ordinal exceeds the number of subsystem users in the parent subsystem.
#define UAT_INVLID 16 Either the SS ID in CE1DBI or the SSU ID in CE1SSU is not valid.
#define UAT_NOTAVL 32 Either the specified SS is inactive or the specified SSU is dormant.

Programming Considerations

The ms0ut structure is used to map the SSU entries that are returned.

uatbc_area_ptr->uat_ssu_ptr
Contains the pointer to an SSU slot. struct ms0ut should be used to map this slot.
  • If uat_call was UAT_xSSI, then the SSU slot returned is that of the first SSU within the specified SS.
  • If uat_call was UAT_xSSU, then the SSU slot returned is that of the specified SSU.

uatbc_area_ptr->uat_ss_name
Contains the SS name, left justified, of the parent SS to the SSU referenced by uat_ssu_ptr.

uatbc_area_ptr->uat_ssu_cnt
Contains a count of SSU entries.
  • If uat_call was UAT_xSSI, then the count is the number of SSU entries within the specified SS.
  • If uat_call was UAT_xSSU, then the count is the number of remaining SSU entries within the parent SS including the specified SSU. For example, if there are 5 SSUs in the SS and the specified SSU is the second one, then the count would be 4.

Examples

The following example uses the SSU ID in the ECB, retrieves the SSU entry, and copies the SS name and SSU name to an area specified by tmp_var_ptr.

#include <c$ms0ut.h>
#include <c$uatbc.h>
#include <string.h>

  ·
  ·
  ·
char * tmp_var_ptr; struct uatbc_area uatbc_parm; struct ms0ut *ssu_slot_ptr;
  ·
  ·
  ·
uatbc_parm.uat_call = UAT_ESSU; if (uatbc(&uatbc_parm) == 0) { ssu_slot_ptr = uatbc_parm.uat_ssu_ptr; (void) memcpy(tmp_var_ptr, &uatbc_parm.uat_ss_name, sizeof(uatbc_parm.uat_ss_name)); tmp_var_ptr += sizeof(uatbc_parm.uat_ss_name); (void) memcpy(tmp_var_ptr, ssu_slot_ptr->mu0nam, sizeof(ssu_slot_ptr->mu0nam)); tmp_var_ptr += sizeof(ssu_slot_ptr->mu0nam); }
  ·
  ·
  ·

Related Information