DEFINE_ADJACENT_NODE

DEFINE_ADJACENT_NODE adds entries to the node directory database for the resources on an adjacent node.
Note: This verb is not required, and should not be issued, if there is an active path to the adjacent node using CP-CP sessions.

This verb can be issued on an end node, in which case the node's control point is added to the root of the directory.

To define the node's control point LU, set the following fields:
  • Specify the node's control point name in the cp_name field
  • Add an ADJACENT_NODE_LU structure, specifying the control point name in the fqlu_name field.

Any additional LUs on the node are added to the directory as children of the node's control point.DEFINE_ADJACENT_NODE can also be used to add LU definitions to an existing node definition. LUs can be removed in the same way by issuing the DELETE_ADJACENT_NODE verb. If the verb fails part way through processing, all new directory entries are removed, leaving the directory as it was before the verb was issued.

VCB Structure

The DEFINE_ADJACENT_NODE verb contains a variable number of ADJACENT_NODE_LU overlays. The ADJACENT_NODE_LU structures are concatenated onto the end of DEFINE_ADJACENT_NODE structure.
typedef struct define_adjacent_node
{
        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   cp_name[17];         /* CP name                 */
        unsigned char   description[RD_LEN]; /* resource description    */
        unsigned char   reserv3[19];         /* reserved                */
        unsigned short  num_of_lus;          /* number of LUs           */
} DEFINE_ADJACENT_NODE;
typedef struct adjacent_node_lu
{
        unsigned char   wildcard_lu;         /* wildcard LU name        */
                                             /* indicator               */
        unsigned char   fqlu_name[17];       /* fully qualified LU name */
        unsigned char   reserv1[6];          /* reserved                */
} ADJACENT_NODE_LU;

Supplied Parameters

The application supplies the following parameters:
opcode
AP_DEFINE_ADJACENT_NODE
format
Identifies the format of the VCB. Set this field to zero to specify the version of the VCB listed above.
cp_name
The fully qualified name of the control point in the adjacent end node. This should match the name the node sends on its XIDs (if it supports them), and the adjacent control point name specified on the DEFINE_LS for the link to the node. The name is 17 bytes long and is right-padded with EBCDIC spaces. It is composed of two type-A EBCDIC character strings concatenated by an EBCDIC dot. (Each name can have a maximum length of 8 bytes with no embedded spaces.)
description
Resource description (returned on QUERY_DIRECTORY_LU). This is a 16-byte (nonzero) string in a locally displayable character set. All 16 bytes are significant.
num_of_lus
The number of adjacent LU overlays that follow the DEFINE_ADJACENT_NODE VCB.
adjacent_node_lu.wildcard_lu
Indicates whether the specified LU name is a wildcard name (AP_YES or AP_NO).
adjacent_node_lu.fqlu_name
The LU name to be defined. If this name is not fully qualified the network ID of the CP name is assumed. The name is 17 bytes long and is right-padded with EBCDIC spaces. It is composed of either one or two type-A EBCDIC character strings concatenated by an EBCDIC dot. (Each name can have a maximum length of 8 bytes with no embedded spaces.)

When wildcard_lu is TRUE, a dot (.) followed by EBCDIC spaces means a Full Wildcard (that will match anything). All EBCDIC spaces will match anything beginning with the Net id of the CP Name.

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_CP_NAME

AP_INVALID_LU_NAME
AP_INVALID_WILDCARD_NAME

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_INVALID_CP_NAME

AP_INVALID_LU_NAME

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

AP_DIRECTORY_FULL