Send Data (QOLSEND) API

  Required Parameter Group:


  Default Public Authority: *USE

  Threadsafe: No

The Send Data (QOLSEND) API performs output on a link that is currently enabled in the job in which the application program is running. The operation parameter allows you to specify the type of output operation to perform. The application program must provide the data associated with the output operation in the output buffer that was created when the link was enabled. For X'0000' operations, the application program must also provide a description of that data in the output buffer descriptor that was created when the link was enabled.

The types of output operations that can be performed on a link depend on the type of communications line that the link is using. See LAN Output Operations for more information on output operations that are supported on links using a token-ring, Ethernet, wireless, or FDDI communications line. See X.25 SVC and PVC Output Operations for more information on output operations that are supported on links using an X.25 communications line.


Authorities and Locks

None.


Required Parameter Group

Return code
OUTPUT; BINARY(4)

The recovery action to take. See Return and Reason Codes.

Reason code
OUTPUT; BINARY(4)

The error that occurred. See Return and Reason Codes.

Diagnostic data
OUTPUT; CHAR(40)

Additional diagnostic data. See Diagnostic Data Parameter Format for more information.

The content of this parameter is only valid when the operation parameter is set to X'0000' or X'B400'.

New provider connection end point ID
OUTPUT; BINARY(4)

The provider connection end point (PCEP) ID for the connection that is to be established. This identifier must be used on all subsequent calls to the QOLSEND API for this connection.

The content of this parameter is only valid for links using an X.25 communications line and when the operation parameter is set to X'B000'.

New user connection end point ID
INPUT; BINARY(4)

The user connection end point (UCEP) ID for the connection that is to be established. This is the identifier on which all incoming data for this connection will be received. Any numeric value except zero should be used. See Receive Data (QOLRECV) API for more information.

The content of this parameter is only valid for links using an X.25 communications line and when the operation parameter is set to X'B000' or X'B400'.

Existing provider connection end point ID
INPUT; BINARY(4)

The PCEP ID for the connection on which this operation will be performed. For links using a token-ring, Ethernet, or wireless communications line, the content of this parameter must always be set to 1.

For links using an X.25 communications line, the content of this parameter is only valid when the operation parameter is set to X'0000', X'B100', X'B400', or X'BF00'. It must contain the PCEP ID that was returned in the new provider connection end point ID parameter from the call to the QOLSEND API with operation X'B000', or the PCEP ID that was returned in the new provider connection end point ID parameter from the call to the QOLRECV API with operation X'B201' (incoming call). See Receive Data (QOLRECV) API for more information on receiving X.25 calls.

Communications handle
INPUT; CHAR(10)

The name of the link on which to perform the output operation.

Operation
INPUT; CHAR(2)

The type of output operation to perform. With the exception of X'0000', all values are only valid for links using an X.25 communications line. The valid values are as follows:


Number of data units
INPUT; BINARY(4)

The number of data units in the output buffer that contain data. Any value between 1 and the number of data units created in the output buffer may be used.

The content of this parameter is only valid when the operation parameter is set to X'0000'.

Note: The number of data units created in the output buffer was returned in the data units created parameter on the call to the QOLELINK API. See Enable Link (QOLELINK) API for more information.


Diagnostic Data Parameter Format

The format of the diagnostic data parameter is shown below. The contents of the fields within this parameter are only valid on X'0000' and X'B400' operations for the indicated return and reason codes.



LAN Output Operations

The only output operation supported on links using a token-ring, Ethernet, wireless, or FDDI communications line is X'0000' (send user data). For each data frame to be sent on the network, the application program must provide the following information:

For example, suppose a user-defined communications application program wants to send two data frames. The information for the first frame would be placed in first data unit of the output buffer and described in the first element of the output buffer descriptor. The information for the second frame would be placed in the second data unit of the output buffer and described in the second element of the output buffer descriptor. The number of data units parameter on the call to the QOLSEND API would be set to 2.

Note: The X'0000' operation is synchronous. Control will not return from the QOLSEND API until the operation completes.

Data Unit Format-LAN Operation X'0000'

Each data frame to be sent on the network corresponds to a data unit in the output buffer. The information in each of these data units is made up of general LAN information, optional routing data, and user data.

Output Buffer Descriptor Element Format-LAN Operation X'0000'

The information specified in each data unit of the output buffer must be described in the corresponding element of the output buffer descriptor.



X.25 SVC and PVC Output Operations

The following table shows the output operations that are supported on links using an X.25 communications line.

X.25 Operation X'0000'

This operation allows the application program to send user data on an SVC or PVC X.25 connection. The application must provide the following information:

For example, suppose a user-defined communications application program wants to send two data units of user data. The first portion of the user data would be placed in first data unit of the output buffer and described in the first element of the output buffer descriptor. The second portion of the user data would be placed in the second data unit of the output buffer and described in the second element of the output buffer descriptor. The number of data units parameter on the call to the QOLSEND API would be set to 2.

User-defined communications support automatically fragments the user data in each data unit into one or more appropriately sized X.25 packets based on the negotiated transmit packet size for the connection. All packets constructed for a data unit, except for the last (or only) packet, will always have the X.25 more data bit (M-bit) set on. See Output Buffer Descriptor Element Format-X.25 Operation X'0000' for more information on how to set the X.25 M-bit on or off in the last (or only) packet constructed for a data unit.

Data Unit Format-X.25 Operation X'000'

Each data unit in the output buffer consists solely of user data and starts offset 0 from the top of the data unit.

Output Buffer Descriptor Element Format-X.25 Operation X'0000'

The user data specified in each data unit of the output buffer must be described in the corresponding element of the output buffer descriptor.

X.25 Operation X'B000'

This operation allows the application program to either initiate an SVC call or to open a PVC connection. The application must provide the data for this operation in the first data unit of the output buffer. The output buffer descriptor is not used.

The format of the data required for the X'B000' operation depends on whether it is used to initiate an SVC call or to open a PVC connection. Each format is explained in the following table.

Note: When initiating an SVC call, the system chooses an available SVC to use. The logical channel identifier of the SVC that was chosen will be returned when notification of the completion of X'B000' is received from the QOLRECV API (operation X'B001'). See Receive Data (QOLRECV) API for more information.

Data Unit Format-X.25 Operation X'B000' (Initiate an SVC Call)

The data for this operation starts at offset 0 from the top of the first data unit in the output buffer. The following table shows the format of the data required for the X'B000' operation when initiating an SVC call.

Data Unit Format-X.25 Operation X'B000' (Open a PVC Connection)

The data for this operation starts at offset 0 from the top of the first data unit in the output buffer. The following table shows the format of the data required for the X'B000' operation when opening a PVC connection.

X.25 Operation X'B100'

This operation allows the application program to either send a clear packet on an SVC, close an SVC connection that was cleared by the remote system, or to close a PVC connection. The application must provide the data for this operation in the first data unit of the output buffer. The output buffer descriptor is not used.

The format of the data required for the X'B100' operation is the same whether or not it is used to send a clear packet on an SVC or to close a PVC connection. The format of the data required for the X'B100' operation should be set to hexadecimal zeros if it is used to close an SVC connection that was previously cleared by the remote system.

Notes:

  1. The system provides the confirmation of the clear indication, however, the local user-defined communications application must issue the X'B100' operation to free the PCEP for the connection.

  2. Closing a PVC connection will cause a reset packet to be sent to the remote system.

Data Unit Format-X.25 Operation X'B100'

The data for this operation starts at offset 0 from the top of the first data unit in the output buffer. The following table shows the format of the data required for the X'B100' operation.

X.25 Operation X'B110'

This operation allows the application program to clean up all internal control information on all the connections over the link and free up all PCEPs and UCEPs. This operation is only valid following the receipt of the X'B311' operation that reports the connection failure data to the application. There is no data associated with this operation.

X.25 Operation X'B400'

This operation allows the application program to accept an incoming SVC call. The application must provide the data for this operation in the first data unit of the output buffer. The output buffer descriptor is not used.

Note: Notification of incoming calls are received from the QOLRECV API with operation X'B201'. See Receive Data (QOLRECV) API for more information.

Data Unit Format-X.25 Operation X'B400'

The data for this operation starts at offset 0 from the top of the first data unit in the output buffer. The following table shows the format of the data required for the X'B400' operation.

X.25 Operation X'BF00'

This operation allows an application program to send a reset request packet or a reset confirmation packet on an X.25 SVC or PVC connection. The application must provide the X.25 cause and diagnostic codes required for this operation in the first data unit of the output buffer. The output buffer descriptor is not used.

Information indicating whether a reset request or reset confirmation packet was sent is returned when notification of the completion of the X'BF00' operation is received from the QOLRECV API (operation X'BF01'). This information will be in the diagnostic data parameter of the QOLRECV API. See Receive Data (QOLRECV) API for more information.

A reset confirmation packet will be sent under the following conditions:

A reset request packet will be sent when none of the above conditions are true.

Notes:

  1. Data not yet received by the application program on a connection will not be deleted when a X'BF00' operation is issued on that connection. This data will be received before the notification of the completion of the X'BF00' operation is received from the QOLRECV API (operation X'BF01'). Data received after the notification of the completion of the X'BF00' operation is received should be treated as new data.

  2. The X'BF00' operation is only valid on connections that support resets. See X.25 Operation X'B000' and X.25 Operation X'B400' for more information on specifying reset support.

Data Unit Format-X.25 Operation X'BF00'

The first 2 bytes of the data unit in the output buffer are used for this operation. The first byte contains the X.25 cause code. The second byte contains the X.25 diagnostic code.


Return and Reason Codes

The return and reason codes that can be returned from the QOLSEND API depend on the type of communications line the link is using and on the operation that was requested.

Return and Reason Codes for LAN Operation X'0000'

General X.25 Return and Reason Codes

The following table shows the return and reason codes that can be received from the QOLSEND API for any requested operation.

Return and Reason Codes for X.25 Operation X'0000'

Return and Reason Codes for X.25 Operation X'B000'

Return and Reason Codes for X.25 Operation X'B100'

Return and Reason Codes for X.25 Operation X'B110'

Return and Reason Codes for X.25 Operation X'B400'

Return and Reason Codes for X.25 Operation X'BF00'



Error Messages



API introduced: V2R1

[ Back to top | Communications APIs | APIs by category ]