QUERY_DEFAULT_PU

QUERY_DEFAULT_PU allows the user to query the default PU defined using a DEFINE_DEFAULT_PU verb.

VCB Structure

typedef struct query_default_pu
{
        unsigned short  opcode;         /* verb operation code   */
        unsigned char   reserv2;        /* reserved              */
        unsigned char   format;         /* format                */
        unsigned short  primary_rc;     /* primary return code   */
        unsigned long   secondary_rc;   /* secondary return code */
        unsigned char   def_pu_name[8]; /* default PU name       */
        unsigned char   description[RD_LEN];
                                        /* resource description  */
        unsigned char   def_pu_sess[8]; /* PU name of active     */
                                        /* default session       */
        unsigned char   reserv3[16];    /* reserved              */
} QUERY_DEFAULT_PU;

Supplied Parameters

The application supplies the following parameters:
opcode
AP_QUERY_DEFAULT_PU
format
Identifies the format of the VCB. Set this field to zero to specify the version of the VCB listed above.

Returned Parameters

If the verb executes successfully, the Program returns the following parameters:
primary_rc
AP_OK
def_pu_name
Name of the PU specified on the most recent DEFINE_DEFAULT_PU verb. This is an 8-byte alphanumeric type A EBCDIC string (starting with a letter), padded to the right with EBCDIC spaces. If no DEFINE_DEFAULT_PU verb has been issued then this field will be set to all zeros.
description
Resource description (as specified on DEFINE_DEFAULT_PU). This is a 16-byte string in a locally displayable character set. All 16 bytes are significant.
def_pu_sess
Name of the PU associated with the currently active default PU session. This will be different from the def_pu_name field if a default PU has been defined, but the session associated with it is not active. In this case, Personal Communications or Communications Server continues to use the session associated with the previous default PU until the session associated with the defined default PU becomes active. If there are no active PU sessions then this field will be set to all zeros.
If the verb does not execute because the node has not yet been started, the Program returns the following parameter:
primary_rc
AP_NODE_NOT_STARTED
If the verb does not execute because of a system error, the Program returns the following parameter:
primary_rc
AP_UNEXPECTED_SYSTEM_ERROR