snalu62(3) — Subroutines
NAME
snalu62, snalu62_intro − Introduction to the LU6.2/APPC Programming Interface
LIBRARY
/usr/shlib/libsnatprm.so
STANDARDS
The LU6.2 interface implemented by the Compaq SNA APPC/LU6.2 Programming Interface for Tru64 UNIX adheres to the interface described in the IBM manual Systems Network Architecture Transaction Programmer’s Reference Manual for LU Type 6.2. It supports most of the option sets described by this manual with the main exception being that it does not support sync point recovery processing. For a full list of the option sets supported, see the Compaq SNA APPC/LU6.2 Programming Interface for Tru64 UNIX Programming manual.
DESCRIPTION
Documentation
Installation
Describes how to install the product.
Administrator’s Guide
Describes how to set the LU6.2 Server and its client systems to enable usage of the Compaq SNA APPC/LU6.2 Programming Interface for Tru64 UNIX. Describes how to configure the LU6.2 Server using either the LU6.2 Manager or the the LU6.2 control operator verbs.
Programming
Describes how to use the APPC interface to write transaction programs.
CPI-C Implementation Specifics
Describes how to use the CPI-C interface to write CPI-C transaction programs.
Creating, Compiling, and Linking Your Program
To create and compile your transaction program, follow these three steps:
1Using the editor of your choice, create a source file containing the C language source statements. Your program should contain an #include statement with the following reference:
#include <sna/snatprmdf.h>
2
Invoke the C language compiler to process the source statements:
% cc -c -o userprog.o userprog.c <Return>
3Verify that there are no syntax errors or violations of the language rules.
After you create and compile the source statements, you are ready to link them with the shareable image of the interface procedures.
To link your program to the shareable interface procedure library (snatprm), enter the following command:
% cc -o userprog userprog.o -lsnatprm -pthread
Alternatively, you can use the UNIX link editor by entering the following command:
% ld -o userprog userprog.o -call_shared -lsnatprm -pthread
Interface Verbs
The LU6.2 interface verbs are grouped in the following functional groups:
•Conversation verbs consisting of:
•Architected conversation verbs
•Miscellaneous unarchitected conversation verbs
•Control Operator (COPR) verbs consisting of:
•LU definition verbs
•Change-number-of-sessions (CNOS) verbs
•Session control verbs
•Miscellaneous unarchitected control verbs
Conversation Verbs
Architected Conversation Verbs
snalu62_allocate
Allocates a basic or mapped conversation between a local transaction program and a remote transaction program to a session between the local LU and the remote LU. Call this verb prior to any other conversation verbs that refer to the conversation.
snalu62_confirm
Sends a confirmation request to the remote transaction program and waits for a reply. The interface flushes the currently buffered send data.
snalu62_confirmed
Sends a confirmation reply to the remote transaction program. Call this verb upon receipt of a confirm request.
snalu62_deallocate
Deallocates a conversation between the local transaction program and a remote transaction program.
snalu62_flush
Causes the interface to transmit the buffered data in the send queue to the remote transaction program.
snalu62_get_attributes
Returns information about the specified conversation.
snalu62_get_tp_properties
Returns information about the transaction program calling the verb.
snalu62_get_type
Returns a value indicating the type of the specified conversation.
snalu62_post_on_receipt
Causes the interface to post the specified conversation when information is available for the program to receive. To wait for posting to occur, make a call to snalu62_wait after calling this verb. Alternatively, call snalu62_test after this verb to test if posting has occurred.
snalu62_prepare_to_receive
Changes the conversation state from Send to Receive to prepare for receiving data from the remote transaction program. It also flushes any data in the local send buffer.
snalu62_receive_and_wait
Waits for information to arrive from the remote transaction program and receives it. The information may be data, conversation status, or a request for confirmation.
snalu62_receive_expedited_data
Receives data sent by the remote transaction program in an expedited manner.
snalu62_receive_immediate
Receives any information that is available, but does not wait for information to arrive, from the remote transaction program. The information may be data, conversation status, or a request for confirmation.
snalu62_request_to_send
Signals the remote transaction program that the local transaction program wants to send data.
snalu62_send_data
Sends data to the remote transaction program.
snalu62_send_error
Sends an error message to the remote transaction program.
snalu62_send_expedited_data
Sends expedited data to the remote transaction program.
snalu62_test
Tests the specified conversation for a condition. The return code indicates the result of the test.
snalu62_wait
Waits for posting to occur on any of the specified conversations.
snalu62_wait_for_completion
Waits for posting to occur on one or more nonblocking operations specified in the list of wait objects.
Miscellaneous Unarchitected Conversation Verbs
snalu62_api_trace_extract
Retrieves the API tracing characteristics.
snalu62_api_trace_set
Sets (or modifies) the API tracing characteristics.
snalu62_as2eb
Converts an ASCII-encoded buffer to an EBCDIC-encoded buffer.
snalu62_attach_listen
Waits for any inbound allocation request from a remote transaction program. The inbound request can be for any local transaction program.
snalu62_cancel_conversation
Terminates the indicated conversation immediately.
snalu62_eb2as
Converts an EBCDIC-encoded buffer to an ASCII-encoded buffer.
snalu62_free_mem
Deallocates memory allocated by the interface. Use this verb only to return memory allocated by the interface.
snalu62_get_event
Waits for one of a set of events to occur on one or more sessions associated with a local LU.
snalu62_get_log_data
Returns the log data that can accompany an error message received from a remote transaction program.
snalu62_get_message
Converts a status vector to a string containing the formatted text of all the status values contained in the status vector. A newline character separates one message text field from another. The returned string is null-terminated.
snalu62_get_pip
Returns the program initialization parameters (PIP) data that the remote transaction program supplied on an allocation request.
snalu62_pass_resource
Requests the interface to transition the specified conversation to the calling process.
snalu62_receive_allocate
Waits for an allocate request from a remote transaction program. This request is for a specific transaction program on a specific local LU.
Control Operator (COPR) Verbs
LU Definition Verbs
snalu62_define_local_lu
Defines a local LU and initializes or changes parameters that control the operation of the local LU.
snalu62_define_mode
Defines or changes parameters that control the operation of the local LU in conjunction with a group of sessions to the specified remote LU, the session group being identified by a mode name.
snalu62_define_remote_lu
Defines a remote LU and initializes or changes parameters that control the operation of the local LU when in session with the remote LU.
snalu62_define_tp
Defines a transaction program and initializes or changes parameters that control the operation of the transaction program.
snalu62_delete
Deletes one or more definitions created by the snalu62_define_xxx verbs.
snalu62_display_local_lu
Displays a local LU’s parameters.
snalu62_display_mode
Displays the parameters for the specified mode name.
snalu62_display_remote_lu
Displays a remote LU’s parameters.
snalu62_display_tp
Displays a transaction program’s parameters.
Change-Number-Of-Sessions (CNOS) Verbs
snalu62_change_session_limit
Changes the LU/mode session limit and contention-winner polarities for parallel-session connections. This verb does not terminate active conversations.
snalu62_initialize_sess_limit
Initializes the LU/mode session limit and contention-winner polarities for parallel- and single-session connections.
snalu62_process_session_limit
Processes the LU/mode session limit and contention-winner polarities for parallel-session connections. This verb does not terminate active conversations.
snalu62_reset_session_limit
Resets the LU/mode session limit and contention-winner polarities for single- or parallel-session connections.
Session Control Verbs
snalu62_activate_session
Activates a session with the specified mode name to the remote LU.
snalu62_deactivate_conv_group
Deactivates a session with the specified conversation group ID.
snalu62_deactivate_session
Deactivates a session with the specified session ID.
Miscellaneous Unarchitected Control Verbs
snalu62_define_server
Defines the SNALOG and syslog characteristics of an LU6.2 Server.
snalu62_display_server
Retrieves the current SNALOG and syslog characteristics of an LU6.2 Server. Also retrieves a list of the currently defined local LU names on the server.