Various calls to the interface are supported to simplify session establishment and termination, and for reading and writing the information contained in 3270 data streams.
A parameter list supplied as the DSECT $NMVTAP in the product distribution library is used for communication. Once output has been received on the session a Field Descriptor List is built and the address placed in the main parameter area. This allows the interface user program to examine the contents of the panel and to update input fields for return your product.
The NMV3270I load module can be linked to a program requiring interface services, or loaded as part of an initialization process. Calls to the interface are then supported by passing the initialized parameter area to provide the following functions:
Starts a session with the product region using parameter list information to determine the target system applid, the local VTAM ACB name to be used for the session, the user ID and password for the user requesting the logon, the virtual 3270 screen size, and any initial menu selection required.
If an LUNAME prefix is used for the ACB name (APPLID) and the ACB fails to open because the APPL has been varied inactive, the operation retries using the next generic ACB name. This process is repeated until an open is successful, or until five successive inactive or unknown ACB name errors occur.
Is used to receive a full-screen of data and builds a Field Descriptor List which describes all input (and optionally output) fields found on the panel. This may then be examined by the calling application to determine the contents of the various fields.
Is used to return data to the product region. The Field Descriptor List may be plugged with the address of input data which is to be placed in panel input fields. A code specifying the function key to be pressed can also be set (the default is the Enter key).
Performs both send and receive functions before returning control to the calling program. This is useful when issuing a request which expects to solicit some data in reply.
Performs a Send then awaits session termination before returning control (for example, after a LOGOFF command has been sent). If the session does not shut down in an orderly fashion, then it is disconnected before control is returned to the calling application.
Closes the session immediately without further I/O and returns to the caller.
More documentation may be found in the DSECT $NMVTAP describing the fields which can be set for the various calls, and those which may be set by the interface on return.
The supplied DSECT $NMFLDDS can be used to map the data returned in the Field Descriptor List obtained from the panels used in a conversation. See those DSECTS in the distributed NMMACLIB for details on this facility.