Temporary conversations
In a one-out one-in conversational application you can use a single FEPI CONVERSE command that combines an ALLOCATE–SEND–RECEIVE–FREE command sequence.
This combination is selected by using the POOL option of FEPI CONVERSE rather than the CONVID option. In this case, the conversation is a temporary conversation that lasts only for the duration of the FEPI CONVERSE command. No conversation ID is returned by FEPI and no other commands can be issued for the conversation; you cannot even use FEPI EXTRACT FIELD to process the returned data.
As with all one-out one-in conversational applications, temporary
conversations should be used with care. If more data is received than
can
be returned on the FEPI CONVERSE command (because, for example, the
data is
not what you expect), the excess is discarded and cannot be retrieved by
the
application. Data may be lost if the command fails and, because you cannot
receive any more data or guarantee that your next conversation will
use the
same simulated terminal, it may be difficult to determine the state of
the
back-end
system.
Note:
- Every conversation started with FEPI ALLOCATE has a unique
conversation
ID, as does every conversation started for a handler, except in the
case of
end-session when started after a FEPI FREE. In this case, the ID is the same
as in the task issuing the FEPI FREE.
A task started when inbound data arrives gets the same conversation ID as the task that issued the FEPI START command.
- The state of a conversation (whether, for example, it is owned by an access program, in a begin-session handler, waiting for inbound data, or being passed) is shown by the STATE option of the CEMT INQUIRE FECONNECTION command (see CEMT INQUIRE FECONNECTION ) or the FEPI INQUIRE CONNECTION command ( topic page FEPI INQUIRE CONNECTION ). This may be useful when you are debugging applications.
- If your programs are written in C, do not handle conversation identifiers as strings; they may contain null characters.