z/OS MVS Programming: Writing Transaction Programs for APPC/MVS
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Send_Data

z/OS MVS Programming: Writing Transaction Programs for APPC/MVS
SA23-1397-00

Equivalent to:
  • LU 6.2 (MC_)Send_Data
  • CPI Send_Data (CMSEND)

Sends data to a partner program.

Requirements

Format

Figure 1. ATBSEND - LU 6.2 Send Data
CALL ATBSEND(
        Conversation_id,
        Send_type,
        Send_length,
        Access_token,
        Buffer,
        Request_to_send_received,
        Notify_type,
        Return_code
       );

Parameters

Conversation_id
Supplied parameter
  • Type: Character string
  • Char Set: No restriction
  • Length: 8 bytes

Conversation_id, sometimes called the resource identifier, identifies a conversation to the system.

Send_type
Supplied parameter
  • Type: Integer
  • Char Set: N/A
  • Length: 32 bits
Send_type specifies what, if any, information is to be sent to the partner program in addition to the data supplied. Send_type also lets you combine operations (for example, Send_and_confirm) and save extra calls to APPC.
Valid values for this parameter are:
Value
Meaning
0
Buffer_data

Specifies that no additional information is to be sent to the partner program, and the data may be buffered until a sufficient quantity is accumulated.

1
Send_and_flush

Specifies that no additional information is to be sent to the partner program. However, the supplied data is sent immediately rather than buffered. This is functionally equivalent to a Send_data call with the Send_type parameter set to Buffer_data followed by a Flush call.

2
Send_and_confirm

Specifies that the supplied data is to be sent to the partner program immediately, along with a request for confirmation. This is functionally equivalent to a Send_data call with the Send_type parameter set to Buffer_data followed by a Confirm call.

3
Send_and_prepare_to_receive

Specifies that the supplied data is to be sent to the partner program immediately, along with send control of the conversation. This is functionally equivalent to a Send_data call with the Send_type parameter set to Buffer_data followed by a Prepare_to_receive call with the prepare_to_receive_type set to sync_level and the locks parameter set to short.

4
Send_and_deallocate

Specifies that the supplied data is to be sent to the partner program immediately, along with a deallocation notification. This is functionally equivalent to a Send_data call with the Send_type parameter set to Buffer_data followed by a Deallocate call with the deallocate_type set to sync_level.

Send_length
Supplied parameter
  • Type: Integer
  • Char Set: N/A
  • Length: 32 bits
Send_length specifies the length of the data to be sent. This data length is not related in any way to the length of the logical record. It is used only to determine the length of the data contained in the Buffer parameter.

If Send_length is zero, no data is sent for this call and the Buffer parameter is not significant.

Access_token
Supplied parameter
  • Type: Integer
  • Char Set: N/A
  • Length: 32 bits

Access_token specifies the Access List Entry Token (ALET) of the address space or data space in which the buffer resides for Send_Data calls.

APPC/MVS always uses access_token together with the address of the buffer to resolve addressing to the transaction program's data. To specify that the buffer address passed should not be ALET qualified, an Access_token value of zero should be supplied. APPC/MVS will then consider the buffer to reside in the primary address space of the caller.

The Access_token can:
  • Represent an entry on the dispatchable unit access list (DU-AL)
  • Represent an entry on the caller's primary address access list (PASN-AL), only if the entry points to a SCOPE=COMMON data space.
The Access_token cannot:
  • Be the value 1 (which indicates "secondary ASID")
  • Represent an entry on the caller's PASN-AL that does not point to a SCOPE=COMMON data space.

For more information about ALETs for SCOPE=COMMON data spaces, see Features of the MVS-Specific Services.

Buffer
Supplied parameter
  • Type: Character string
  • Char Set: No restriction
  • Length: 0-2,147,483,647 bytes

Buffer specifies the data to be sent or received. This data can consist entirely of data (for mapped conversations) or logical records (for basic conversations).

If the data consists of logical records, each such record consists of a two-byte length field followed by a data field; the length of the data field can range from zero to 32,765 bytes. The length of the record includes the two-byte length field; therefore, logical-record length values of X'0000', X'0001', X'8000', and X'8001' are not valid.

Request_to_send_received
Returned parameter
  • Type: Integer
  • Char Set: N/A
  • Length: 32 bits

Request_to_send_received specifies whether or not Request_to_send notification has been received.

Valid return values for this parameter are:
Value
Meaning
0
Request_to_send_not_received

indicates that Request_to_send notification has not been received

1
Request_to_send_received

the partner program has issued a Request_to_send, requesting the local program to enter Receive state.

If Return_code indicates Program_parameter_check or Program_state_check, a value is not returned in Request_to_send_received.

Notify_type
Supplied parameter
  • Type: Structure
  • Char Set: N/A
  • Length: 4-8 bytes
Specifies the type of processing and notification (synchronous or asynchronous) requested for this service. Programs can request asynchronous processing, which returns control to the program immediately and later notifies the program by ECB when the service is complete. The possible types are:
  • None

    No notification is requested. The service is performed synchronously, and control is returned to the caller when processing is complete. All returned parameters are set on return to the caller. To specify no notification, set the parameter value to a four-byte structure containing binary zeros.

  • ECB

    Programs can request asynchronous processing by specifying an ECB to be posted when processing completes. To specify an ECB, set the parameter to an eight-byte structure containing a fullword binary one (X'00000001') followed by the address of a fullword area to be used as the ECB. The ECB must reside in the home address space.

    When you specify an ECB, control is returned before processing is complete, with only the return code set. If the asynchronous request was accepted, the return code is set to 0 to indicate that the service is being processed asynchronously. Other returned parameters are filled in during asynchronous processing, and the specified ECB is posted when all returned parameters are set. The completion code field in the ECB contains the return code for the service.

Return_code
Returned parameter
  • Type: Integer
  • Char Set: N/A
  • Length: 32 bits

Return_code specifies the return code that is returned to the local program. In cases where an error code is returned, the program should not examine any other returned variable associated with the call as nothing is placed in the variables.

See the following section for descriptions of return codes that can be returned to a caller of Send_Data.

Return Codes

The following table lists all of the possible return codes for Send_Data:

Table 1. Return Codes for the Send_Data Service
Return Code Value, Meaning, and Action
0 Value: OK

Meaning: The call completed successfully.

System Action: If the call specified a Notify_type of ECB, APPC/MVS posts the ECB specified on the Notify_type parameter when APPC/MVS finishes processing the call asynchronously.

Application Programmer Response: None required.

3 Value: Conversation_type_mismatch

Meaning: The partner LU rejected an allocate request. The local TP called the Allocate service and specified a value of Basic_conversation or Mapped_conversation on the Conversation_type parameter. The partner TP does not support the respective basic or mapped conversation protocol boundary.

System Action: The system returns this return code on a call that occurs after the call to Allocate.

Application Programmer Response: When requesting the allocate, change the Conversation_type parameter to specify a conversation type that the partner TP supports.

5 Value: PIP_not_specified_correctly

Meaning: The partner LU rejected an allocate request. The partner TP defined one or more initialization parameter (PIP) variables, which APPC/MVS does not support.

System Action: The system returns this return code on a call that occurs after the call to Allocate. The system does not return this code to callers of the CPI Communications Allocate call.

Application Programmer Response: Ask the partner system programmer to change the partner TP so it does not expect PIP data from the TP running on MVS.

6 Value: Security_not_valid

Meaning: The partner LU rejected an allocate request. The specified security information is not valid.

System Action: The system returns this return code on a call that occurs after the call to Allocate.

Application Programmer Response: See Diagnosing Problems with APPC/MVS TPs for methods to use to diagnose the return code. See Error_Extract for the Error_Extract calling format.

8 Value: Sync_lvl_not_supported_pgm

Meaning: The partner LU rejected an allocate request. The local TP specified a synchronization level (on the Sync_level parameter) that the partner TP does not support.

System Action: The system returns this return code on a call that occurs after the call to Allocate.

Application Programmer Response: See Allocate for an explanation of the Sync_level parameter. When requesting the allocate, ensure that the Sync_level parameter specifies a correct value.

9 Value: TPN_not_recognized

Meaning: The partner LU rejected an allocate request. The local TP specified a partner TP that the partner LU does not recognize.

System Action: The system returns this return code on a call that occurs after the call to Allocate.

Application Programmer Response: Ask the partner system programmer to provide a valid partner TP name. When requesting the allocate, specify the valid partner TP name.

10 Value: TP_not_available_no_retry

Meaning: The partner LU rejected an Allocate request. The local TP specified a partner TP that is known to the partner LU, but the partner LU cannot start the TP. The condition is not temporary. The TP should not retry the Allocate request.

System Action: The system returns this return code on a call that occurs after the call to Allocate.

Application Programmer Response: See Diagnosing Problems with APPC/MVS TPs for methods to use to diagnose the return code. See Error_Extract for the Error_Extract calling format.

11 Value: TP_not_available_retry

Meaning: The partner LU rejected an allocate request. The local TP specified a partner TP that the partner LU recognizes but cannot start. The condition might be temporary.

System Action: The system returns this return code on a call that occurs after the call to Allocate.

Application Programmer Response: Retry the Allocate request. If the error persists, see Diagnosing Problems with APPC/MVS TPs for methods to use to diagnose the return code. See Error_Extract for the Error_Extract calling format.

17 Value: Deallocate_abend

Meaning: A partner TP called the Deallocate service. The request specified a Deallocate_type of Deallocate_abend.

System Action: If the partner TP was in Receive state when it called Deallocate, the system purges information sent by the local TP that was not received by the partner TP. The system returns this return code to the local TP when it calls an APPC service in Send or Receive state.

Application Programmer Response: See the application programmer response for return code six for this service.

20 Value: Product_specific_error

Meaning: The system found a product-specific error.

System Action: The system might write symptom records, which describe the error, to the logrec data set.

Application Programmer Response: See Diagnosing Problems with APPC/MVS TPs for methods to use to diagnose the return code. See Error_Extract for the Error_Extract calling format. If necessary, see Diagnosing Product-Specific Errors for more information about product-specific errors.

22 Value: Program_error_purging

Meaning: A partner TP called the Send_Error service for a basic or mapped conversation. The conversation for the partner TP was in Receive or Confirm state.

System Action: The system returns this return code to the local TP when it calls an APPC service before sending any information. If the TP called Send_Error while in Receive state and before it received all the information that the partner TP sent, the system might purge the data. If the TP called Send_Error while in Receive or Confirm state but after it received all the information that the partner TP sent, the system does not purge the data.

Application Programmer Response: See the application programmer response for return code six for this service.

24 Value: Program_parameter_check

Meaning: The system detected a program parameter check.

System Action: The system returns this return code to the caller of the APPC service in error.

Application Programmer Response: See the application programmer response for return code six for this service.

25 Value: Program_state_check

Meaning: The local TP called a service while running in a state in which the call is not valid. The TP should not examine any other returned variables associated with the call because nothing is placed in those variables.

System Action: The state of the conversation remains unchanged. For a list of states that are valid for each call, see APPC/MVS Conversation State Table. The conversation was in send state and the TP started, but the TP did not finish sending a logical record.

Application Programmer Response: See the application programmer response for return code six for this service.

26 Value: Resource_failure_no_retry

Meaning: An error caused the conversation to terminate. The condition is not temporary. The application should not try to run the transaction until the condition is corrected.

System Action: The system terminates the conversation.

Application Programmer Response: See the application programmer response for return code six for this service.

27 Value: Resource_failure_retry

Meaning: An error caused the conversation to terminate. The condition might be temporary.

System Action: The system terminates the conversation.

Application Programmer Response: Retry the transaction.

30 Value: Deallocated_abend_SVC

Meaning: The partner TP called Deallocate with a Deallocate_type of Deallocate_abend_SVC.

System Action: If the partner TP was in Receive state when it called Deallocate, the system purges all information that was sent by the local TP but was not yet received by the partner TP. The system returns this return code to the local TP when it calls a service while in Send or Receive state.

Application Programmer Response: See the application programmer response for return code six for this service.

31 Value: Deallocated_abend_timer

Meaning: A partner TP called the Deallocate service with a Deallocate_type of Deallocate_abend_timer.

System Action: If the partner TP was in Receive state when it called Deallocate, the system purges all information that was sent by the local TP but was not yet received by the partner TP. The system returns this return code to the local TP when it calls a service while in Send or Receive state.

Application Programmer Response: See the application programmer response for return code six for this service.

33 Value: SVC_error_purging

Meaning: A partner TP called the Send_Error service, and LU services on the partner LU specified a value of SVC for the type of call. The conversation for the partner TP was in Receive or Confirm state, and the call might have caused information to be purged.

System Action: The system normally returns this code to the local TP after the system sends some information to the partner TP. However, the system can also return this code to the local TP before it sends any information.

Application Programmer Response: See the application programmer response for return code six for this service.

100 Value: Take_backout
Meaning: This value is returned only when all of the following conditions are true:
  • The Sync_level is set to syncpt.
  • The conversation is not in Initialize state.
  • The program is using protected resources that must be backed out.

System Action: The system returns this return code to the caller of the service.

Application Programmer Response: Before it can use this conversation or any other protected conversations associated with the current context again, the local TP must issue a Backout call to restore all protected resources to their status as of the last synchronization point.

130 Value: Deallocated_abend_bo

Meaning: This return code is returned only for conversations with Sync_level set to syncpt.

The partner program issued a Deallocate call with Deallocate_type set to deallocate_abend, or the partner LU has done so because of a partner program abnormal-end condition.

System Action: If the conversation for the partner program was in Receive state when the call was issued, information sent by the local program and not yet received by the partner program is purged. The conversation is now in Reset state.

Application Programmer Response: Before it can use any other protected conversations associated with the current context again, the local TP must issue a Backout call to restore all protected resources to their status as of the last synchronization point.

131 Value: Deallocated_abend_SVC_bo

Meaning: This return code is returned only for conversations with Sync_level set to syncpt.

The partner TP called Deallocate with a Deallocate_type of deallocate_abend_SVC.

System Action: If the partner TP was in Receive state when it called Deallocate, the system purges all information that was sent by the local TP but was not yet received by the partner TP. The system returns this return code to the local TP when it calls a service while in Send or Receive state.

Application Programmer Response: Before it can use any other protected conversations associated with the current context again, the local TP must issue a Backout call to restore all protected resources to their status as of the last synchronization point.

132 Value: Deallocated_abend_timer_bo

Meaning: This return code is returned only for conversations with Sync_level set to syncpt.

A partner TP called the Deallocate service with a Deallocate_type of deallocate_abend_timer.

System Action: If the partner TP was in Receive state when it called Deallocate, the system purges all information that was sent by the local TP but was not yet received by the partner TP. The system returns this return code to the local TP when it calls a service while in Send or Receive state.

Application Programmer Response: Before it can use any other protected conversations associated with the current context again, the local TP must issue a Backout call to restore all protected resources to their status as of the last synchronization point.

133 Value: Resource_failure_no_retry_bo

Meaning: This return code is returned only for conversations with Sync_level set to syncpt.

An error caused the conversation to terminate. The condition is not temporary. The application should not try to run the transaction until the condition is corrected.

The system terminates the conversation.Before it can use any other protected conversations associated with the current context again, the local TP must issue a Backout call to restore all protected resources to their status as of the last synchronization point.

System Action: The system terminates the conversation.

Application Programmer Response: Before it can use any other protected conversations associated with the current context again, the local TP must issue a Backout call to restore all protected resources to their status as of the last synchronization point.

134 Value: Resource_failure_retry_bo

Meaning: This return code is returned only for conversations with Sync_level set to syncpt.

An error caused the conversation to terminate. The condition might be temporary.

System Action: The system terminates the conversation.

Application Programmer Response: Before it can use any other protected conversations associated with the current context again, the local TP must issue a Backout call to restore all protected resources to their status as of the last synchronization point.

Restrictions

Transaction programs that call the Send_Data service while in task mode should not have any enabled unlocked task (EUT) functional recovery routines (FRRs) established. For more information about EUT FRRs, see the section on providing recovery in z/OS MVS Programming: Authorized Assembler Services Guide.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014