In this step you add to the top-level flow an Invoke nonterminal
node that invokes the application DF0XCMN.
DF0XCMN is a component of the CICS® example catalog application and is invoked
to place a simulated order. To create an Invoke nonterminal
node in the top-level flow that invokes DF0XCMN you need to do the
following:
- Create an operation named PlaceOrder that
contains the information needed to invoke DF0XCMN (see the subtopic Create the nonterminal operation PlaceOrder).
- Use the new operation PlaceOrder and the
plain Invoke node Step1 to create an Invoke
nonterminal node that invokes DF0XCMN (see the subtopic Modify the Invoke node Step1 to invoke PlaceOrder).
Create the nonterminal
operation PlaceOrder
In this subtopic you
use the Import COBOL Files wizard to create a nonterminal operation
named PlaceOrder that contains the information
needed to invoke the nonterminal application DFH0XCMN.
An operation is
an entity that contains the information required to invoke either
a flow, a terminal application, or a nonterminal application. A nonterminal
operation is the type of operation that contains the information
required to invoke a nonterminal application. A nonterminal application is
a host application that is invokable via a call-return interface and
that does not display application screens requiring user input.
Download these files from the host and place them in a
local directory of your workstation.
To create the nonterminal
operation:
Note: These instructions assume that the COBOL file DFH0XCMN.CBL
and its copy books DFH0XCP1.CPY and DFH0XCP2.CPY are located on your
workstation's file system and are in the same directory.
Add the directory path to the SYSLIB tab
on the preferences page of the workbench.
On the main menu of the workbench click . The Preferences
window opens.
In the Preferences window:
- In the left pane click .
- In the right pane:
- Click the SYSLIB tab.
- On the SYSLIB tab:
- Click Add.
- Browse to the directory where the COBOL file DFH0XCMN.CBL and
its copy books DFH0XCP1.CPY and DFH0XCP2.CPY are located.
- Click OK.
The location you selected is displayed in the Location list.
Click OK. The Preferences window closes.
Start the Import COBOL Files wizard:
In the EST Project Explorer right-click the CatalogSample.Nonterminal subproject.
Click . The Import COBOL Files wizard opens.
On the first page of the Import COBOL Files wizard:
Verify that in ProjectName list the
subproject CatalogSample.Nonterminal is selected.
Select the source files for the nonterminal application:
- Click File System. The file system wizard
opens.
- In the file system wizard navigate to the subdirectory containing
the COBOL source files.
- The source file DFHOXCMN.CBL is displayed.
Important: The two copy book files DFH0XCP1.CPY
and DFH0XCP2.CPY must also be present in the same directory (even
though they might not be displayed in the File System window) because
they will be imported by reference when DFHOXCMN.CBL is imported.
- Click DFH0XCMN.CBL.
- Click Open. The file system wizard closes.
- Verify that in the list COBOL files to import the
fully qualified directory path for DFH0XCMN.CBL is now listed.
Important: Even though the two copy book files
DFH0XCP1.CPY and DFH0XCP2.CPY are not displayed here in the COBOL
files to import list they will be imported when the COBOL
source file DFH0XCMN.CBL is imported, if they are
located in the same directory as DFH0XCMN.CBL.
Click Next.
On the second page of the Import COBOL Files wizard:
Verify the following settings:
- The check box Create COBOL program definitions is
selected.
- The radio button New File is selected.
- The input field beside the radio button contains the default file
name new_programs.
Note: This is the name of
the WSDL file in which the new operation will be stored.
- The program dfh0xcmn is
displayed in the Program Definitions list.
Note: This
is the name of the main program in the COBOL source file that you
imported.
In the Properties for selected
program group, in the
Program input
field:
- Erase the program name dfh0xcmn.
- Type a new program name PlaceOrder.
In the Communication Type list
select LINK with COMMAREA if it is not already
selected.
Specify an input message for this operation:
- To the right of Input Data click the button
labeled Select. The Select
a language element window opens and displays the data
structures contained in the COBOL source file and its two copybooks.
- In the Select a language element window:
- Click the structure DFH0XCMN_DFHCOMMAREA.
Note on DFH0XCMN_DFHCOMMAREA:The name of the
structure in the COBOL source is DFHCOMMAREA.
However, because DFHCOMMAREA is a reserved
word in CICS the wizard automatically changes the name of the structure to or DFH0XCMN_DFHCOMMAREA (see Names of imported data structures).
- Click OK.
Specify an output message for this operation by following the
same procedure that you just used for specifying an input message:
- To the right of Output Data click the button
labeled Select. The Select
a language element window opens.
- In the Select a language element window:
- Click DFH0XCMN_DFHCOMMAREA.
See Note on DFH0XCMN_DFHCOMMAREA.
- Click OK.
Notice that you could click the button Specify Generation
Properties and specify default generation properties for
this operation. However, in this tutorial you will not specify default
generation properties here.
Click
Finish. The wizard creates a new
operations file and a new message file in the subproject
CatalogOrder.Nonterminal:
- In the Operations folder the wizard creates
a new operations file named new_programs.wsdl and
stores the new operation PlaceOrder into this
file.
- In the Messages folder the wizard creates
a new message file dfh0xcmn.sfmxsd and creates
in the message file a new message for each data structure in the imported
source code, including the DFH0XCMN_DFHCOMMAREA.
Modify the Invoke node Step1 to
invoke PlaceOrder
In this subtopic you convert
the plain Invoke node Step1 to an Invoke nonterminal
node that invokes the nonterminal operation PlaceOrder.
Recall that you created the Invoke nodes Step0 and Step1 as
place holders (see Position the nodes, add Assign nodes and Invoke nodes, and connect the nodes).
A plain Invoke node such as Step1 can
be made functional by associating with it an operation or a flow (see Creating an Invoke node directly from an existing operation). In this subtopic you associate
the nonterminal operation PlaceOrder with the plain Invoke node Step1 so
that Step1 is converted to an Invoke nonterminal
node that invokes the nonterminal application DF0XCMN.
To
convert Step1 to an Invoke nonterminal node:
In the flow editor open the flow CatalogOrder.seqflow if
it is not already open.
- On the main menu of the workbench click .
In the EST Project Explorer click .
Drag the operation PlaceOrder to the
flow editor canvas and on top of the node Step1.
Step1 is
converted to an Invoke nonterminal node and is given the name of the
operation that it invokes, PlaceOrder.
The flow editor canvas for CatalogOrder.seqflow should
now look like Figure 1:
Figure 1. CatalogOrder.seqflow
Close the flow editor.