Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Defining storage for the macro API z/OS Communications Server: IP Sockets Application Programming Interface Guide and Reference SC27-3660-00 |
|
The macro API requires the definition of a task storage area. The task storage area must be known to and addressable by all socket users communicating across a specified connection. A connection runs between the application and TCP⁄IP. The most common way to organize storage is to assign one connection to each MVS™ subtask. If there are multiple modules using sockets within a single task or connection, you must provide the address of the task storage to every user. The following information describes how to define the
address of the task storage:
Guideline: Clear the
task storage prior to calling EZASMI TYPE=INIT. If the EZASMI TYPE=TASK
definition is not named, you can use the EZASMI default storage name
of EZASMTIE. Use the TIELENTH field to determine the length of the
EZASMTIE storage to clear.
The defining program must make the
address of this storage available to all other programs using this
connection. Programs running in these tasks must define the storage
mapping with an EZASMI TYPE=TASK with STORAGE=DSECT. Restriction: The task storage area used
on an INITAPI call cannot be moved or copied to other storage locations.
Attempting to do so will result in an implicit INITAPI being performed
with unexpected results.
The EZASMI TYPE=TASK macro generates only one parameter
list for a connection. This can lead to overlay problems for programs
using APITYPE=3 connections (multiple calls can be issued simultaneously).
For more detail on APITYPE=3 connections, see Task management and asynchronous function processing. A program should use the following format
to build unique parameter list storage areas if it will be issuing
multiple calls simultaneously on one connection:
This example of
an asynchronous BIND macro would use the MF=L macro to generate the
parameter list. The fields that are common across all macro calls,
for example, RETCODE and ERRNO, must be unique for each outstanding
call.You can create multiple connections to TCP/IP from a single
task. Each of these connections functions independently of the other
and is identified by its own task interface element (TIE). The TASK
parameter can be used to explicitly reference a TIE. If you do not
include the TASK parameter, the macro uses the TIE generated by the
EZASMI TYPE=TASK macro.
In this example, the TIE TIE1 is used for the connection, not the TIE generated by the EZASMI TYPE=TASK macro. |
Copyright IBM Corporation 1990, 2014
|