snalu62_receive_immediate(3) — Subroutines
Name
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.
FORMAT
STATUS_RTN snalu62_receive_immediate(
RES_ID resource,
STATUS_VEC status_vec,
UINT32 fill,
UINT32 ∗length,
UINT8 ∗rts_recv,
UINT8 ∗exp_data_recv,
unsigned char ∗data,
UINT32 ∗data_recv,
UINT32 ∗status_recv,
char ∗map_name,
ASYNC_INFO ∗wait_object
);
Valid Conversation States
Receive
Arguments
resource
A RES_ID structure assigned to the conversation by the interface. This ID was returned by the snalu62_allocate, snalu62_attach_listen, or snalu62_receive_allocate verb.
status_vec
A pointer to a STATUS_VEC array to receive the completion status information.
fill
A UINT32 value specifying whether the data is received in logical-record format or independent of logical-record format. Specify one of the following values:
•SNALU62_C_BUFFER
Specifies that the interface should supply data to the program independent of the logical-record format of the data. The interface continues to return full buffers on subsequent receive calls until all data is returned. The last buffer returned may be a partially-filled buffer.
•SNALU62_C_LL (the default for basic conversations)
Specifies that the interface should supply data to the program one logical record at a time. If the logical record cannot fit into the supplied data buffer, the interface truncates the data. If the logical record is shorter than the supplied data buffer, the interface returns only 1 logical record.
This parameter is only valid for basic conversations. The interface ignores it for mapped conversations.
length
A pointer to a UINT32 location specifying the maximum length of data that this program can receive. This location also receives a value indicating the actual size of the buffer in the data parameter.
rts_recv
A pointer to a UINT8 location to receive a boolean value indicating whether the remote transaction program has requested permission to send data. A value of TRUE (1)
indicates the remote program is requesting to send data. A value of FALSE (0)
indicates the remote program has not requested to send data.
exp_data_recv
This parameter is a place holder. The functionality represented by this parameter is not implemented.
data
A pointer to a unsigned char buffer to receive the data sent by the remote transaction program.
data_recv
A pointer to a UINT32 location to receive a value indicating what was stored into the buffer pointed to by the data parameter. It can be one of the following values:
•SNALU62_C_NO_DATA
For basic and mapped conversations: Specifies that the interface returned no data in the data buffer.
•SNALU62_C_DATA
For basic conversations: Used when the program specifies SNALU62_C_BUFFER for fill. Indicates that the interface returned data to the program.
•SNALU62_C_DATA_COMPLETE
For basic and mapped conversations: Indicates that the interface returned a complete data record or the final portion of a data record. For basic conversations the interface uses this code when the program specifies SNALU62_C_LL for fill.
•SNALU62_C_DATA_INCOMPLETE
For basic and mapped conversations: Specifies that the interface returned less then a complete data record. The program may receive the remainder of the data by using more receive calls. For basic conversations the interface uses this code when the program specifies SNALU62_C_LL for fill.
•SNALU62_C_DATA_TRUNCATED
For mapped conversations: Specifies that the interface returned an incomplete data record. The interface discarded the remainder of the data.
•SNALU62_C_LL_TRUNCATED
For basic conversations: Specifies that the interface returned an incomplete data record. The interface discarded the remainder of the data. The interface uses this code when the program specifies SNALU62_C_LL for fill.
•SNALU62_C_USER_CTRL_COMPLETE
For mapped conversations: Indicates that the interface returned a complete data record or the final portion of a data record and the data contained user control data.
•SNALU62_C_USER_CTRL_INCOMPLETE
For mapped conversations: Specifies that the interface returned less then a complete data record containing user control data. The program may receive the remainder of the data by using more receive calls.
•SNALU62_C_USER_CTRL_TRUNCATED
For mapped conversations: Specifies that the interface returned an incomplete data record containing user control data. The interface discarded the remainder of the data.
•SNALU62_C_PS_HEADER_COMPLETE
For basic and mapped conversations: Specifies that the interface received a complete Presentation Services header. This value indicates that the interface has received a complete Sync Point Services Presentation Services header.
•SNALU62_C_PS_HEADER_INCOMPLETE
For basic and mapped conversations: Specifies that the interface received an incomplete Presentation Services header. This value indicates that the interface has received an incomplete Sync Point Services Presentation Services header.
status_recv
A pointer to a UINT32 location to receive a value indicating the new status of the conversation. It can be one of the following values:
•SNALU62_C_SEND_RECV
The remote program has entered the Receive state. The local program enters the Send state and may now send data.
•SNALU62_C_CONFIRM_RECV
The remote program called the confirm verb. This action requests the local program to call the snalu62_confirmed verb. The local program enters the Confirm state.
•SNALU62_C_CONFIRM_SEND_RECV
The remote program called the prepare-to-receive verb. The remote program requested that the prepare-to-receive function be preceded by the function of the confirm verb. See snalu62_prepare_to_receive for more information. The local program enters the Confirm-Send state.
•SNALU62_C_CONFIRM_DEALLOC_RECV
The remote program called the deallocate verb. The remote program requested that the deallocate function be preceded by the function of the confirm verb. See snalu62_deallocate for more information. The local program enters the Confirm-Deallocate state.
•SNALU62_C_NO_STATUS_RECV
No state change information is available.
•SNALU62_C_PS_HEADER_NEXT
A Presentation Services header follows the data being received by this call.
map_name
This parameter is a place holder. The functionality represented by this parameter is not implemented.
wait_object
A pointer to an ASYNC_INFO structure specifying whether the interface should process the verb in a blocking or non-blocking manner.
Description
The interface returns control to the program with an indication of whether any information was received and, if so, the type of information.
When the send-receive queue
is not empty, the interface can block this verb in the same manner as the snalu62_receive_and_wait verb.
Return Values
SNALU62_S_OK
normal successful completion
SNALU62_S_ALLERR
conversation could not be allocated
SNALU62_S_BACKOUT
backed out
SNALU62_S_CONVCANC
conversation canceled
SNALU62_S_DEABPR
deallocate abend program
SNALU62_S_DEABSVC
deallocate abend services
SNALU62_S_DEABTIM
deallocate abend timer
SNALU62_S_DEALNOR
deallocate normal
SNALU62_S_FMHNOT
user control data (FMH) not supported
SNALU62_S_MAPEFAI
map execution failure
SNALU62_S_MAPNFOU
map name not found
SNALU62_S_MAPNSUP
mapping not supported
SNALU62_S_OPINCOMP
non-blocking operation not completed
SNALU62_S_OPNOTACC
non-blocking operation not accepted
SNALU62_S_PARERR
parameter error, function-name
SNALU62_S_PRERNTR
program error no truncate
SNALU62_S_PRERPU
program error purging
SNALU62_S_PRERTR
program error truncate
SNALU62_S_PRGPARCHK
program parameter check
SNALU62_S_RESFNO
resource failure no retry
SNALU62_S_RESFRET
resource failure retry
SNALU62_S_STAERR
LU6.2 verb function-name invalid with conversation in current state
SNALU62_S_SVCENTR
service error no truncate
SNALU62_S_SVCERPU
service error purging
SNALU62_S_SVCERTR
service error truncate
SNALU62_S_UNSUC
verb did not execute successfully