Rational Developer for System z, Version 7.6

Step 4.3: Invoke a nonterminal application from the top-level flow

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:
  1. Create an operation named PlaceOrder that contains the information needed to invoke DF0XCMN (see the subtopic Create the nonterminal operation PlaceOrder).
  2. 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.

You can obtain the COBOL source files for DFH0XCMN from the system administrator for your host system (see Required environment, materials, and assistance). You will need the following files:
  • DFH0XCMN.CBL
  • DFH0XCP1.CPY
  • DFH0XCP2.CPY

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.
  1. Add the directory path to the SYSLIB tab on the Importer > COBOL preferences page of the workbench.

    1. On the main menu of the workbench click Window > Preferences. The Preferences window opens.

    2. In the Preferences window:
      1. In the left pane click Importer > COBOL.
      2. In the right pane:
        1. Click the SYSLIB tab.
        2. On the SYSLIB tab:
          1. Click Add.
          2. Browse to the directory where the COBOL file DFH0XCMN.CBL and its copy books DFH0XCP1.CPY and DFH0XCP2.CPY are located.
          3. Click OK.
        The location you selected is displayed in the Location list.

    3. Click OK. The Preferences window closes.

  2. Start the Import COBOL Files wizard:

    1. In the EST Project Explorer right-click the CatalogSample.Nonterminal subproject.

    2. Click Import > COBOL. The Import COBOL Files wizard opens.

  3. On the first page of the Import COBOL Files wizard:

    1. Verify that in ProjectName list the subproject CatalogSample.Nonterminal is selected.

    2. Select the source files for the nonterminal application:
      1. Click File System. The file system wizard opens.
      2. In the file system wizard navigate to the subdirectory containing the COBOL source files.
        1. 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.
        2. Click DFH0XCMN.CBL.
        3. Click Open. The file system wizard closes.
      3. 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.

    3. Click Next.

  4. On the second page of the Import COBOL Files wizard:

    1. Verify the following settings:
      1. The check box Create COBOL program definitions is selected.
      2. The radio button New File is selected.
      3. 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.
      4. 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.

    2. In the Properties for selected program group, in the Program input field:
      1. Erase the program name dfh0xcmn.
      2. Type a new program name PlaceOrder.

    3. In the Communication Type list select LINK with COMMAREA if it is not already selected.

    4. Specify an input message for this operation:
      1. 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.
      2. In the Select a language element window:
        1. 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).

        2. Click OK.

    5. Specify an output message for this operation by following the same procedure that you just used for specifying an input message:
      1. To the right of Output Data click the button labeled Select. The Select a language element window opens.
      2. In the Select a language element window:
        1. Click DFH0XCMN_DFHCOMMAREA.

          See Note on DFH0XCMN_DFHCOMMAREA.

        2. Click OK.

    6. 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.

    7. Click Finish. The wizard creates a new operations file and a new message file in the subproject CatalogOrder.Nonterminal:
      1. In the Operations folder the wizard creates a new operations file named new_programs.wsdl and stores the new operation PlaceOrder into this file.
      2. 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:

  1. In the flow editor open the flow CatalogOrder.seqflow if it is not already open.

  2. On the main menu of the workbench click View > Zoom Out.
  3. In the EST Project Explorer click CatalogSample > CatalogSample.Nonterminal > Operations > new_programs.wsdl > PlaceOrder.

  4. 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.

  5. The flow editor canvas for CatalogOrder.seqflow should now look like Figure 1:

    Figure 1. CatalogOrder.seqflow
    Nodes CheckItemAvailability, Assign, and Switch

  6. Close the flow editor.


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)