This topic describes how to handle the
scenario in which a service flow communicates with a transaction using
Link3270 Bridge, and the transaction contains an application screen
where the transaction returns and another transaction is launched
in its place. If the original transaction returns by using a RETURN
command without a TRANSID parameter, then the CICS® Service Flow Runtime terminates the service
flow with a runtime error CIA07014E (DFHMA07014E). You can fix this
problem by adding a small amount of special handling to the service
flow.
An example of the scenario that is discussed in this
topic is in the IVP sample application at the Operator Instructions
application screen (see
Operator
Instructions menu). There, when the user types a valid transaction
ID and item number and presses the Enter key, the IVP sample application
returns and indicates that the transaction identified by the transaction
ID that the user just typed in should be launched.
Note: This scenario
is not limited to situations in which the transaction ID is typed
in by the user. The original transaction can use any method to select
a new transaction to be launched.
For the launch of the new transaction to be carried
out correctly, one (or both) of the following conditions needs to
be true:
- The original transaction uses a RETURN TRANSID command to return
from its invocation and to specify the new transaction to be launched.
- In the service flow, you store the transaction ID of the new transaction
into an SNA_FIELDS structure.
Note: If neither of these two conditions is true,
then the CICS Service Flow
Runtime issues a runtime error CIA07014E (DFHMA07014E).
Each of these two conditions is described more detail
in the following subtopics of this topic.
Using a RETURN command with
the TRANSID parameter to terminate the transaction
The first way to avoid the CIA07014E
(DFHMA07014E) runtime error is for the original transaction to
return from its invocation by using the command RETURN TRANSID(<transaction_id>),
where <transaction_id> is the transaction ID of the new
transaction to be launched.
For example, in the
IVP sample application, if the user types the transaction ID ainq,
then the application could use the command RETURN TRANSID("ainq") to
return from its invocation.
Storing the transaction ID into
SNA_FIELDS.SNA_NEXT_TRANSID
If the original
transaction returns from its invocation by using a plain RETURN command
instead RETURN TRANSID, then you can still avoid the CIA07014E
(DFHMA07014E) runtime error by mapping the transaction ID of
the new transaction to SNA_FIELDS.SNA_NEXT_TRANSID.
Follow these steps:
- Open the flow in the flow editor.
- Locate the Invoke screen operation node that interacts with the
application screen where the original transaction returns so that
the new transaction can be launched.
- Right-click the node, click Open Mapping Routine,
and click the mapping routine for the input terminal of the node.
The mapping editor opens.
- In the mapping editor:
- Click Add a target message
. The Select Message window
opens.
- In the Select Message window, click and then click OK.
- On the target side of the editor, in the SNA_FIELDS structure:
- Right-click the SNA_NEXT_TRANSID field.
- Click Create Transform. The editor creates
an Assign transform and links it to the field.
- Click the Assign transform. The properties
of the transform are displayed in the Properties view.
- In the Properties view:
- Click General.
- In the Value input field, type the transaction
ID that you want to be written into the input field. (For example,
for the Operator Instructions application screen of the IVP sample
application, you might type ainq -- see Operator
Instructions menu.)
- Close the mapping editor.
- Close the flow editor.
- Use the Generate Runtime Code wizard to
regenerate the service flow.
Note: The SNA_FIELDS structure
in the mapping routine is a reference to an actual data area used
by the service flow. At run time, when the service flow performs the
Assign transform, the value that you specify in the transform is copied
into the actual SNA_FIELDS data area.