DEFINE_LOCAL_LU

The DEFINE_LOCAL_LU verb requests the definition of a local LU with the specified characteristics, or, if the LU already exists, the modification of the attach_routing_data characteristic of the LU. Note that if a DEFINE_LOCAL_LU is used to modify an existing definition then any parameter other than the attach_routing_data field will be ignored.

VCB Structure

Format 1
typedef struct define_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   lu_name[8];       /* local LU name              */
        LOCAL_LU_DEF_DATA
                        def_data;         /* defined data               */
} DEFINE_LOCAL_LU;
typedef struct local_lu_def_data
{
        unsigned char   description;      /* resource description       */
        unsigned char   lu_alias[8];      /* local LU alias             */
        unsigned char   nau_address;      /* NAU address                */
        unsigned char   syncpt_support;   /* is sync-point supported?   */
        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;
                                          /* routing data for           */
                                          /* incoming attaches          */
        unsigned char   lu_model;         /* LU model for SDDLU         */
        unsigned char   model_name[7];    /* LU model name              */
                                          /* for SDDLU                  */
        unsigned char   reserv4[16];      /* reserved                   */
} LOCAL_LU_DEF_DATA;

VCB Structure

Format 0
typedef struct define_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   lu_name[8];       /* local LU name              */
        LOCAL_LU_DEF_DATA
                        def_data;         /* defined data               */
} DEFINE_LOCAL_LU;
typedef struct local_lu_def_data
{
        unsigned char   description;      /* resource description       */
        unsigned char   lu_alias[8];      /* local LU alias             */
        unsigned char   nau_address;      /* NAU address                */
        unsigned char   syncpt_support;   /* is sync-point supported?   */
        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;
                                          /* routing data for           */
                                          /* incoming attaches          */
     } LOCAL_LU_DEF_DATA;

Supplied Parameters

The application supplies the following parameters:
opcode
AP_DEFINE_LOCAL_LU
format
Identifies the format of the VCB. Set this field to zero or one to specify either format 0 or format 1 of the VCB listed above.
lu_name
Name of the local LU that is being defined. This is an 8-byte alphanumeric type-A EBCDIC string (starting with a letter), padded to the right with EBCDIC spaces.
def_data.description
Resource description (returned on QUERY_LOCAL_LU). This is a 16-byte string in a locally displayable character set. All 16 bytes are significant.
def_data.lu_alias
Alias of the local LU to define. This is an 8-byte string in a locally displayable character set. All 8 bytes are significant and must be set.
def_data.nau_address
Network addressable unit address of the LU, which must be in the range 0–255. A nonzero value implies the LU is a dependent LU. Zero implies the LU is an independent LU.
def_data.syncpt_support
This field should always be set to AP_NO unless a sync point manager is available for this LU.
def_data.lu_session_limit
Maximum number of sessions supported by the LU. Zero means no limit. If the LU is independent then this can be set to any value. If the LU is dependent then this must be set to 1.
def_data.default_pool
Set to AP_YES if the LU is a member of the dependent LU 6.2 default pool, or if it is to be used as the default Local LU for independent LU 6.2 sessions.
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 should be set to all binary zeros for independent LUs.
def_data.lu_attributes
Specifies further information about the LU. This field either takes the value AP_NONE, or one or more following options ORed together.
AP_DISABLE_PWSUB
Disable password substitution support for the local LU.
def_data.sscp_id
This 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 may be activated by any SSCP.
def_data.disable
Indicates whether the LOCAL LU should be disabled or enabled. The LU can be dynamically enabled or disabled by reissuing 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 (on-line). 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 (off-line).
def_data.attach_routing_data
Type of attach routing data.
AP_REGISTERED_OR_DEFAULT_ATTACH_MGR
Specifies that a DYNAMIC_LOAD_INDICATION resulting from an attach arriving for the transaction program (TP) at this local LU is sent to the attach manager that has registered to receive DLIs for this LU, or to the default attach manager if no attach manager has registered for this LU.
AP_REGISTERED_ATTACH_MGR_ONLY
Specifies that a DYNAMIC_LOAD_INDICATION resulting from an attach arriving for the transaction program (TP) at this local LU is sent only to the attach manager that has registered to receive DLIs for this LU. If no attach manager has registered for this LU, the attach is rejected.
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 reissuing the verb. Changes will not come into effect until after the LU is closed and deactivated.
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. APPN® checks that this field consists of the EBCDIC characters A–Z, 0–9 and @, #, and $.

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 def_data.model_name can be changed dynamically by reissuing the verb. Changes will not come into effect until after the LU is closed and deactivated.

Returned Parameters

If the verb executes successfully, the Program returns the following parameter:
primary_rc
AP_OK
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_MODEL

AP_INVALID_LU_NAME
AP_INVALID_NAU_ADDRESS
AP_INVALID_SESSION_LIMIT
AP_INVALID_DISABLE

If the verb does not execute because of a state error, the Program returns the following parameters:
primary_rc
AP_STATE_CHECK
secondary_rc
AP_PU_NOT_DEFINED

AP_INVALID_LU_NAME
AP_LU_ALREADY_DEFINED
AP_ALLOCATE_NOT_PENDING
AP_LU_ALIAS_ALREADY_USED
AP_PLU_ALIAS_ALREADY_USED
AP_PLU_ALIAS_CANT_BE_CHANGED

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 the node is stopping, the Program returns the following parameter:
primary_rc
AP_NODE_STOPPING
If the verb does not execute because of a system error, the Program returns the following parameters:
primary_rc
AP_UNEXPECTED_SYSTEM_ERROR
secondary_rc
AP_MEMORY_SHORTAGE