ReceiveData

Purpose

Use ReceiveData to parse data obtained using a 3270 server or a custom server into individual items.


A screen capture of the Action ReceiveData window

Description

ReceiveData assigns each discrete data item to a variable.

Note that SendData and ReceiveData actions must be alternated in the state table. You cannot execute multiple SendData actions without intervening ReceiveData actions.

Every SendData action must have a matching ReceiveData action unless a server returns a void response, in which case SendData should have a Host Response Time Limit of 0, and there should be no corresponding ReceiveData action.

Parameters

The parameters for ReceiveData identify the server from which the information is received and the variables to which the individual items are assigned. The parameters also define a time limit.

Possible results

ReceiveData can have one of the following results:

Succeeded
The information has been received, parsed, and assigned to the designated variables.
No More Data
There is no more data to parse. ReceiveData has parsed the last record.
Data Not Found
The server did not find any information.
Host Problem
A problem with the computer on which the information is located prevented the information from being available. The application knows that the other computer is there, but GetFindData cannot retrieve the information at this time. This can occur, for example, if the time limit for the request, as specified in the SendData action, expires.
Host Not Open
This can occur for a number of different reasons, as identified by the System: Action additional information (SV180) system variable. Possible values are:
1
The computer on which the information is located could not be contacted. There is no open link to the host computer.
2
This means one of the following:
  • SendData had a timeout of zero, which meant that no answer from the host was expected or no corresponding SendData had been executed.
  • The ReceiveData followed a PlayVoiceFromHost or RecordVoiceToHost before the caller hung up, so the internally-generated SendData action was not executed.
  • The internally-generated SendData action in PlayVoiceFromHost or RecordVoiceToHost was not executed because no voice data was played or recorded.
Note: If you want to use the information in SV180, you must check it immediately after a state table action because it is reset by other actions.
Timeout
The action did not receive any information in the amount of time defined by the Timeout parameter.

ASCII syntax

When using an ASCII editor, code this action with these parameters in the following order:

  1. Server Type "CUSTOM_SERVER"
    • or "SERVER_3270"
  2. Server Name
  3. Timeout
  4. Server Command
  5. ... Parameters

For example:

label: "Check Edges"
   ReceiveData("SERVER_3270", SrvrSample_3270, 20, abrw_query, in1_n, in2_n)
   edge EDGE_RECEIVE_DATA_COMPLETED:      completed
   edge EDGE_RECEIVE_DATA_NO_MORE_DATA:  no_more_data
   edge EDGE_RECEIVE_DATA_NOT_FOUND:     not_found
   edge EDGE_RECEIVE_DATA_HOST_PROB:     host_prob
   edge EDGE_RECEIVE_DATA_HOST_NOT_OPEN: host_not_open
   edge EDGE_TIMEOUT:                               timeout
    ;
     ReceiveData("CUSTOM_SERVER", CS_Request_Call, 20,
          read_rec, in1_n, in2_n, in3_s, loc1_n);

The parameters and edges are described above under "Parameters" and "Possible results". For more information, see Testing a state table using the debugger.