In this part of the tutorial, you will use the host editor
to record the sample flow.
When a flow is recorded in the host editor, the host editor performs
the following actions automatically:
- The host editor captures each application screen (if this preference
is selected)
- The host editor assigns a name to the application screen (if this
preference is selected)
- The host editor creates a screen operation for each AID key that
the user presses during recording. (An AID key is a key, such as
Enter, that causes a terminal application to advance to the next application
screen.)
- The host editor creates a screen operations .wsdl file that contains
all of the screen operations.
- The host editor adds an Invoke screen operation node to the flow
for each screen operation.
- The host editor creates a .sfmap file to hold all the mapping routines for the new flow. As
needed, for the input terminal or for any of the output terminals
of each new Invoke screen operation node that is created, the host
editor creates and initializes a mapping routine and adds the new
mapping routine to the .sfmap file (see Mapping routines in terminal flows).
See Recording a flow for more information
on flow recording.
To record a flow in the host editor:
Set two recording preferences:
On the main menu of the workbench, click .
In the
Preferences window:
- In the left pane, select .
- In the right pane, select the check boxes Automatically capture
new screens and Do not prompt for name when automatically capturing
screens if they are not already selected:
The preference
Automatically
capture new screens causes the host editor to capture each screen
after you start recording a flow. The preference
Do not prompt
for name when automatically capturing screens causes the host
editor to assign a name to each screen instead of prompting you for
the name.
Note: If you also select the check box Do not prompt for
variables when generating variable mapping, the host editor automatically
provides a name for any variables that you create for Insert actions,
Extract actions, and recorded loops. In these tutorial instructions,
the check box is not selected.
- Click OK to close the Preferences window.
Because of the way in which the service flow project was created
in Part 1 of this tutorial, the host editor should now already be
open in the editor view. If not, open the host editor as follows:
In the EST Project Explorer, open .
The host editor opens and attempts to connect with the host,
using the information specified in the host connection file.
Navigate to the CICS® clear
screen. If you are unsure of how to navigate to the CICS clear screen, ask your host systems administrator.
Verify that the host editor is in flow mode: The first icon
on the host editor toolbar should be
(not
).
On the host editor toolbar, click the Start Recording
Flow icon
to start recording.
The New Flow Recording wizard opens. On the first and only
page of this wizard:
In the Flow input field, type the name
of the flow, SampleProject.
In the
Interface Resources group:
- Click Create all new resources if it is
not already selected.
- The wizard provides default names for the resources:
Check the check box Automatically expose insert
and extract variables in the interface operation messages if
it is not already checked.
Click Finish.
The icon changes to the Stop Recording Flow icon
.
Recording is now active.
Enter the 4-character transaction ID of the CICS IVP Menu application (this tutorial uses amnu:
your transaction ID may differ) and press Enter. The Operator
Instructions menu appears as shown in Figure 1:
In the input field following the words ENTER TRANSACTION: type
the account inquiry transaction ID (this tutorial uses ainq).
For the input field following the word NUMBER,
create an Insert action as follows:
On the host editor toolbar, click the Insert Data
into Screen icon
. The Select Variable window
opens.
Select a variable to use with the Insert action:
- In the Select Variable window, the list
of variables is blank because no variables have
been created yet (see The variable message of a flow):
- Click Add new variable. The Add
New Variable window opens:
- In the Variable Name field, type AccountNumber.
- Click OK to close the window.
- In the Select Variable window:
- Select the new variable AccountNumber.
- Click OK to close the window.
Select a field to use with the Insert action. This is the field
into which you want the Insert action to write text:
- On the CICS application
screen, move the mouse pointer icon to the input field immediately
following the word NUMBER. A red
underline with the ends turned up highlights this input field.
- Click the input field.
You have now completed creating the Insert action. When the
Insert action is performed, the contents of the variable AccountNumber will
be written into the field that you selected.
Note: All variables are defined in the v_SampleProject.sfmxsd file.
In the CICS application
screen, in the input field following the word
NUMBER,
enter a valid customer account number (such as
100)
and press Enter. The application displays the File Inquiry screen
as shown in Figure 2:
In the File Inquiry screen, create an Extract action to read
text from the application screen:
- On the host editor toolbar, click the Extract Data
from Screen icon
.The Select Variable window
opens.
Select a variable to use with the Extract action:
- In the Select Variable window:
- Click Add new variable. The Add
New Variable window opens.
- In the Add New Variable window:
- In the Variable Name field, type ciName.
- Click OK to close the Variable Name window.
- In the Select Variable window, select ciName
- Click OK.
Select a field to use with the Extract action. This is the
field from which you want the Extract action to extract text:
- In the CICS application
screen, move the mouse pointer to the field immediately to the right
of the word NAME:. Red square brackets appear surrounding
the input field.
- Click the field.
- You have now completed creating the Extract action. When the Extract
action is performed, the contents of the field that you selected will
be read into the variable ciName.
Repeat steps a - j for each subsequent line of information
on the CICS application screen.
Use the following names for the remaining variables:
- ciAddress
- ciPhone
- ciDate
- ciAmount
- ciComment
Note: Do not use a variable name that is a COBOL reserved
word, such as Address or Date.
Finish the recording. In the CICS application
screen:
- Press Enter. The Operator Instructions screen appears again.
- Press Escape to terminate the transaction.
- Type cesf logoff to log off.
- Click the Stop Recording Flow icon
to
stop the recording.
Recording is completed.
Click the Save Flow icon
to save the flow that you have just created.
If you like you can open the new flow in the flow editor to see
the nodes that were created by the flow recording. In the EST Project
Explorer, click . Although these actions are not covered in this tutorial,
you can use the flow editor to add nodes or subflows, change node
names, and so on. You can also populate empty flows in the flow editor.
The following outline describes the new files created in this step:
- Subproject or folder: Flows
- Subproject or folder: Mapping
- SampleProject.sfmap
There
is one mapping file per flow (see Mapping files).
This mapping file contains mapping routines that include mappings
for input actions, Insert actions, and Extract actions (see Mapping routines in terminal flows).
- Subproject or folder: SampleProject.Terminal
- Subfolder: Operations
- Subfolder: Messages