QUERY_LOCAL_LU

QUERY_LOCAL_LU returns information about local LUs. QUERY_LOCAL_LU can be issued to retrieve information about the Personal Communications or Communications Server control point LU.

The information is returned as a list in one of two formats, either summary or detailed information. To obtain information about a specific local LU, or to obtain the list information in several chunks, the lu_name or lu_alias field should be set. If the lu_name field is nonzero it will be used to determine the index. If the lu_name field is set to all zeros, the lu_alias will be used to determine the index. If both the lu_name and the lu_alias fields are set to all zeros then the LU associated with the control point (the default LU) will be used. If the list_options field is set to AP_FIRST_IN_LIST then both of these fields will be ignored. (In this case, the returned list will be ordered by LU alias if the AP_LIST_BY_ALIAS list_options is set, otherwise it will be ordered by LU name). See Querying the Node for background on how the list formats are used.

This list is ordered on either lu_alias or lu_name according to the options specified. The field is ordered by EBCDIC lexicographical ordering.

The list of local LUs returned can be filtered by the name of the PU that they are associated with. In this case, the pu_name field should be set (otherwise this field should be set to all zeros).

VCB Structure

Format 1
typedef struct query_local_lu
{
        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   *buf_ptr;          /* pointer to buffer                */
        unsigned long   buf_size;          /* buffer size                      */
        unsigned long   total_buf_size;    /* total buffer size required       */
        unsigned short  num_entries;       /* number of entries                */
        unsigned short  total_num_entries; /* total number of entries          */
        unsigned char   list_options;      /* listing options                  */
        unsigned char   reserv3;           /* reserved                         */
        unsigned char   lu_name[8];        /* LU name                          */
        unsigned char   lu_alias[8];       /* LU alias                         */
        unsigned char   pu_name[8];        /* PU name filter                   */
} QUERY_LOCAL_LU;
typedef struct local_lu_summary
{
        unsigned short  overlay_size;      /* size of this entry               */
        unsigned char   lu_name[8];        /* LU name                          */
        unsigned char   lu_alias[8];       /* LU alias                         */
        unsigned char   description;       /* resource description             */
} LOCAL_LU_SUMMARY;
typedef struct local_lu_detail
{
        unsigned short  overlay_size;      /* size of this entry               */
        unsigned char   lu_name[8];        /* LU name                          */
        LOCAL_LU_DEF_DATA def_data;        /* defined data                     */
        LOCAL_LU_DET_DATA det_data;        /* determined data                  */
} LOCAL_LU_DETAIL;
typedef struct local_lu_def_data
{
        unsigned char   description[RD_LEN];
                                           /* resource description             */
        unsigned char   lu_alias[8];       /* local LU alias                   */
        unsigned char   nau_address;       /* NAU address                      */
        unsigned char   syncpt_support;    /* Reserved                         */
        unsigned short  lu_session_limit;  /* LU session limit                 */
        unsigned char   default_pool;      /* member of default_lu_pool        */
        unsigned char   reserv2;           /* reserved                         */
        unsigned char   pu_name[8];        /* PU name                          */
        unsigned char   lu_attributes;     /* LU attributes                    */
        unsigned char   sscp_id[6];        /* SSCP ID                          */
        unsigned char   disable;           /* disable or enable Local LU       */
        unsigned char   attach_routing_data[128];
                                           /* routing data for                 */
                                           /* incoming attaches                */
        unsigned char   lu_model;          /* LU model name for SDDLU          */
        unsigned char   model_name[8];     /* LU model name for SDDLU          */
        unsigned char   reserv4[16];       /* reserved                         */
} LOCAL_LU_DEF_DATA;
typedef struct local_lu_det_data
{
        unsigned char   lu_sscp_sess_active;
                                          /* Is LU-SSCP session active         */
        unsigned char   appl_conn_active; /* Is LU-SSCP session active         */
        unsigned char   reserv1[2];       /* reserved                          */
        SESSION_STATS   lu_sscp_stats;    /* LU-SSCP session statistics        */
        unsigned char   sscp_id[6];       /* SSCP ID                           */
} LOCAL_LU_DET_DATA;
typedef struct session_stats
{
        unsigned short  rcv_ru_size;       /* session receive RU size          */
        unsigned short  send_ru_size;      /* session send RU size             */
        unsigned short  max_send_btu_size; /* max send BTU size                */
        unsigned short  max_rcv_btu_size;  /* max rcv BTU size                 */
        unsigned short  max_send_pac_win;  /* max send pacing win size         */
        unsigned short  cur_send_pac_win;  /* current send pacing win size     */
        unsigned short  max_rcv_pac_win;   /* max receive pacing win size      */
        unsigned short  cur_rcv_pac_win;   /* current receive pacing           */
                                           /* window size                      */
        unsigned long   send_data_frames;  /* number of data frames sent       */
        unsigned long   send_fmd_data_frames;
                                           /* num of FMD data frames sent      */
        unsigned long   send_data_bytes;   /* number of data bytes sent        */
        unsigned long   rcv_data_frames;   /* num data frames received         */
        unsigned long   rcv_fmd_data_frames;
                                           /* num of FMD data frames recvd     */
        unsigned long   rcv_data_bytes;    /* number of data bytes received    */
        unsigned char   sidh;              /* session ID high byte             */
        unsigned char   sidl;              /* session ID low byte              */
        unsigned char   odai;              /* ODAI bit set                     */
        unsigned char   ls_name[8];        /* Link station name                */
        unsigned char   pacing _type;      /* Type of pacing in use            */
} SESSION_STATS;

VCB Structure

Format 0

typedef struct local_lu_def_data
{
        unsigned char   description[RD_LEN];
                                           /* resource description             */
        unsigned char   lu_alias[8];       /* local LU alias                   */
        unsigned char   nau_address;       /* NAU address                      */
        unsigned char   syncpt_support;    /* Reserved                         */
        unsigned short  lu_session_limit;  /* LU session limit                 */
        unsigned char   default_pool;      /* member of default_lu_pool        */
        unsigned char   reserv2;           /* reserved                         */
        unsigned char   pu_name[8];        /* PU name                          */
        unsigned char   lu_attributes;     /* LU attributes                    */
        unsigned char   sscp_id[6];        /* SSCP ID                          */
        unsigned char   disable;           /* disable or enable Local LU       */
        unsigned char   attach_routing_data[128];
                                           /* routing data for                 */
                                           /* incoming attaches                */
 } LOCAL_LU_DEF_DATA;

Supplied Parameters

The application supplies the following parameters:
opcode
AP_QUERY_LOCAL_LU
format
Identifies the format of the VCB. Set this field to zero to specify the version of the VCB listed above.
buf_ptr
Pointer to a buffer into which list information can be written. The application can append data to the end of the VCB, in which case buf_ptr must be set to NULL.
buf_size
Size of buffer supplied. The data returned will not exceed this size.
num_entries
Maximum number of entries to return. The number of entries will not exceed this value. A value of zero means no limit.
list_options
This indicates what should be returned in the list information:
AP_SUMMARY
Returns summary information only.
AP_DETAIL
Returns detailed information.

The lu_name (or lu_alias if the lu_name is set to all zeros) specified represents an index value that is used to specify the starting point of the actual information to be returned.

AP_FIRST_IN_LIST
The index value is ignored, and the returned list starts from the first entry in the list.
AP_LIST_FROM_NEXT
The returned list starts from the next entry in the list after the one specified by the supplied index value.
AP_LIST_INCLUSIVE
The returned list starts from the entry specified by the index value.
AP_LIST_BY_ALIAS
The returned list is ordered by lu_alias. This option is only valid when AP_FIRST_IN_LIST is specified. If AP_LIST_FROM_NEXT or AP_LIST_INCLUSIVE is specified, the list ordering will depend on whether an lu_name or lu_alias has been supplied as a starting point.
lu_name
LU name. This name is an 8-byte type-A EBCDIC character string. If this field is set to all zeros, the lu_alias field will be used for determining the index. This field is ignored if list_options is set to AP_FIRST_IN_LIST.
lu_alias
Locally defined LU alias. This is an 8-byte string in a locally displayable character set. All 8 bytes are significant and must be set. If both the lu_name and the lu_alias field are set to all zeros, the LU associated with the control point (the default LU) is used. This field is ignored if list_options is set to AP_FIRST_IN_LIST.
pu_name
PU name filter. This should be set to all zeros or an 8-byte alphanumeric type-A EBCDIC string (starting with a letter), padded to the right with EBCDIC spaces. If this field is set then only Local LUs associated with this PU are returned. This field is ignored if it is set to all zeros.

Returned Parameters

If the verb executes successfully, the Program returns the following parameters:
primary_rc
AP_OK
buf_size
Length of the information returned in the buffer.
total_buf_size
Returned value indicating the size of buffer that would have been required to return all the list information requested. This can be higher than buf_size.
num_entries
Number of entries actually returned.
total_num_entries
Total number of entries that could have been returned. This can be higher than num_entries.
local_lu_summary.overlay_size
The number of bytes in this entry, and hence the offset to the next entry returned (if any).
local_lu_summary.lu_name
LU name. This name is an 8-byte type-A EBCDIC character string.
local_lu_summary.lu_alias
Locally defined LU alias. This is an 8-byte string in a locally displayable character set. All 8 bytes are significant.
local_lu_summary.description
Resource description (as specified on DEFINE_LOCAL_LU). This is a 16-byte string in a locally displayable character set. All 16 bytes are significant.
local_lu_detail.overlay_size
The number of bytes in this entry, and hence the offset to the next entry returned (if any).
local_lu_detail.lu_name
LU name. This name is an 8-byte type-A EBCDIC character string.
local_lu_detail.def_data.description
Resource description (as specified on DEFINE_LOCAL_LU). This is a 16-byte string in a locally displayable character set. All 16 bytes are significant.
local_lu_detail.def_data.lu_alias
Locally defined LU alias. This is an 8-byte string in a locally displayable character set. All 8 bytes are significant.
local_lu_detail.def_data.nau_address
Network addressable unit address of the LU, which is in the range 0–255. A nonzero value implies the LU is a dependent LU. Zero implies the LU is an independent LU.
local_lu_detail.def_data.syncpt_support
Reserved.
local_lu_detail.def_data.lu_session_limit
Maximum number of sessions for the local LU. A value of zero indicates that there is no limit.
local_lu_detail.def_data.default_pool
AP_YES if the LU is a member of the dependent LU 6.2 default pool. Always AP_NO for independent LUs.
local_lu_detail.def_data.pu_name
Name of the PU that this LU will use. This is an 8-byte alphanumeric type-A EBCDIC string (starting with a letter), padded to the right with EBCDIC spaces. This field is only used by dependent LUs, and will be set to all binary zeros for independent LUs.
local_lu_detail.def_data.lu_attributes
Configured LU attributes. This field either takes the value AP_NONE, or the following option ORed together:
AP_DISABLE_PWSUB
Password substitution support disabled for the local LU.
local_lu_detail.def_data.sscp_id
This field specifies the ID of the SSCP permitted to activate this LU. It is a 6–byte binary field. This field is only used by dependent LUs, and should be set to all binary zeros for independent LUs or if the LU can be activated by any SSCP.
local_lu_detail.def_data.disable
This field indicates whether the LOCAL LU should be disabled or enabled. The LU can be dynamically enabled or disabled by re-issuing the DEFINE_LOCAL_LU with this parameter set as appropriate (AP_YES or AP_NO). When a disabled LU is enabled, the Program issues a NOTIFY (online). When an enabled LU is disabled, the Program issues a NOTIFY (off-line). If the LU is bound when it is disabled, then the Program issues an UNBIND followed by a NOTIFY (offline).
local_lu_detail.def_data.attach_routing_data
This field indicates data passed out unchanged on a DYNAMIC_LOAD_INDICATION resulting from attaches arriving for the transaction program at this local LU. For example, this field may be used to set a path to the transaction program's working directory.
local_lu_detail.def_data.lu_model
Model type and number of the LU. This field is only used by dependent LUs and should be set to AP_UNKNOWN for independent LUs. For dependent LUs, this is set to one of the following values:

AP_3270_DISPLAY_MODEL_2
AP_3270_DISPLAY_MODEL_3
AP_3270_DISPLAY_MODEL_4
AP_3270_DISPLAY_MODEL_5
AP_RJE_WKSTN
AP_PRINTER
AP_SCS_PRINTER
AP_UNKNOWN

For dependent LUs, if model_name is not set to all binary zeros, then this field is ignored. If a value other than AP_UNKNOWN is specified and the host system supports SDDLU (Self-Defining Dependent LU), the node will generate an unsolicited PSID NMVT reply in order to dynamically define the local LU at the host. The PSID subvector will contain the machine type and model number corresponding to the value of this field. This field may be changed dynamically by re-issuing the verb. Changes will not come into effect until after the LU is closed and deactivated.
local_lu_detail.def_data.model_name
Model name of the LU. This field is only used by dependent LUs and should be set to binary zeros for independent LUs.

If this field is not set to binary zeros and the host system supports SDDLU, the node generates an unsolicited PSID NMVT reply in order to dynamically define the local LU at the host. The PSID subvector contains the name supplied in this field. The field may be changed dynamically reissuing the verb. Changes do not come into effect until after the LU is closed and deactivated.

local_lu_detail.det_data.lu_sscp_session_active
Specifies whether the LU-SSCP session is active (AP_YES or AP_NO). If the def_data.nau_address is zero, then this field is reserved.
local_lu_detail.det_data.appl_conn_active
Specifies whether an application is using the LU (AP_YES or AP_NO). If the def_data.nau_address is zero, then this field is reserved.
local_lu_detail.det_data.lu_sscp_stats.rcv_ru_size
This field is always reserved.
local_lu_detail.det_data.lu_sscp_stats.send_ru_size
This field is always reserved.
local_lu_detail.det_data.lu_sscp_stats.max_send_btu_size
Maximum BTU size that can be sent.
local_lu_detail.det_data.lu_sscp_stats.max_rcv_btu_size
Maximum BTU size that can be received.
local_lu_detail.det_data.lu_sscp_stats.max_send_pac_win
This field will always be set to zero.
local_lu_detail.det_data.lu_sscp_stats.cur_send_pac_win
This field will always be set to zero.
local_lu_detail.det_data.lu_sscp_stats.max_rcv_pac_win
This field will always be set to zero.
local_lu_detail.det_data.lu_sscp_stats.cur_rcv_pac_win
This field will always be set to zero.
local_lu_detail.det_data.lu_sscp_stats.send_data_frames
Number of normal flow data frames sent.
local_lu_detail.det_data.lu_sscp_stats.send_fmd_data_frames
Number of normal flow FMD data frames sent.
local_lu_detail.det_data.lu_sscp_stats.send_data_bytes
Number of normal flow data bytes sent.
local_lu_detail.det_data.lu_sscp_stats.rcv_data_frames
Number of normal flow data frames received.
local_lu_detail.det_data.lu_sscp_stats.rcv_fmd_data_frames
Number of normal flow FMD data frames received.
local_lu_detail.det_data.lu_sscp_stats.rcv_data_bytes
Number of normal flow data bytes received.
local_lu_detail.det_data.lu_sscp_stats.sidh
Session ID high byte.
local_lu_detail.det_data.lu_sscp_stats.sidl
Session ID low byte.
local_lu_detail.det_data.lu_sscp_stats.odai
Origin Destination Address Indicator. When bringing up a session, the sender of the ACTLU sets this field to zero if the local node contains the primary link station, and sets it to one if the ACTLU sender is the node containing the secondary link station.
local_lu_detail.det_data.lu_sscp_stats.ls_name
Link station name associated with statistics. This is an 8-byte string in a locally displayable character set. All 8 bytes are significant. This field can be used to correlate this session with the link over which the session flows.
Note:
The LU-SSCP statistics (local_lu_detail.det_data.lu_sscp_stats) are valid only when nau_address is not zero. Otherwise the fields are reserved.
local_lu_detail.det_data.lu_sscp_stats.pacing_type
Receive pacing type in use on the LU-SSCP session. This will be set to AP_NONE.
local_lu_detail.det_data.sscp_id
This is a 6–byte field containing the SSCP ID received in the ACTPU for the PU used by this LU.
If the verb does not execute because of a parameter error, the Program returns the following parameters:
primary_rc
AP_PARAMETER_CHECK
secondary_rc
AP_INVALID_LU_ALIAS

AP_INVALID_LU_NAME
AP_INVALID_LIST_OPTION

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