Rational Developer for System z, Version 7.6

Step 3.2: Add message elements to the message files

In this step you will add one message element each to the input message, the output message, and the variable message of the flow CheckItemAvailability.seqflow. You will also delete message elements that were automatically added to the output message when you created Extract actions during the flow recording.
Based on the default names that you accepted in the New Flow Recording wizard (see Step 2.4: Record the flow) the following message files, messages, and message elements were automatically created for CheckItemAvailability.seqflow:
Table 1. Message artifacts created for CheckItemAvailability.seqflow
Type of message file: Message file: Message: Message elements:
Input i_CheckItemAvailability.sfmxsd i_CheckItemAvailability (None)
Output o_CheckItemAvailability.sfmxsd o_CheckItemAvailability A message element for each Extract action in the recorded flow. These variables were created automatically and have the same names as the variables that you created in the variable message: INQ1-ITEMREF, INQ2-ITEMREF, and so on.
Variable v_CheckItemAvailability.sfmxsd v_CheckItemAvailability A message element for each Extract action in the recorded flow. You created and selected these variables in C. Record the flow information: INQ1-ITEMREF, INQ2-ITEMREF, and so on up to INQ15-ITEMREF.
In this section you will add one message element to each of the three messages:
Table 2. Message elements to be added
Message: Message element to be added: Data type of the message element:
i_CheckItemAvailability itemNumber xsd:string
o_CheckItemAvailability available xsd:string
v_CheckItemAvailability available1 xsd:string
1For more information about this variable see Use of v_CheckItemAvailability.available in the flow CheckItemAvailability.seqflow
Also in this section you will delete the Extract message elements from the output message. During flow recording, each time that you selected a variable from the variable message for a new Extract action (see the last row of Table 1) the flow recorder automatically also created a variable in the output message having the same name and type as the selected variable in the variable message (see the next to last row of Table 1).
Note: This feature is enabled by selecting the check box Automatically expose insert and extract variables in the interface operation messages (see B. Begin the flow recording).
You will delete these Extract message elements from the output message only. Do not delete the Extract message elements from the variable message.

Input message

In this subtopic you will add the message element itemNumber to the input message. This message element is an input parameter that specifies an item number to be searched for in the list of items in the catalog of the CICS example catalog application.

To add the message element:

  1. Open the input message file:
    1. In the EST Project Explorer, right-click CatalogSample > CatalogSample.Interface > Messages > i_CheckItemAvailability.
    2. Click Open With > Flow Message Editor.

  2. Add the message element:

    Table 3. Create the message element itemNumber
    Action: Item: User interface:
    a) Click Basic tab Flow message editor
    b) Right-click i_CheckItemAvailability.sfmxsd > i_CheckItemAvailability Flow message editor, Basic tab, left pane
    c) Click Add Element
    d) Click localElement1
    e) Type itemNumber Flow message editor, Basic tab, right pane, Name field
    f) Click Advanced tab Flow message editor
    g) Click i_CheckItemAvailability.sfmxsd > Messages > i_CheckItemAvailability > itemNumber Flow message editor, Advanced tab
    h) Click The cell in the Type column to the right of itemNumber
    i) Scroll the list and select (New Simple Type Restriction) The drop-down list that opens when you clicked the empty cell in the preceding step.
    j) Scroll the list and select xsd:string The Base Type drop-down list The New Simple Type Restriction window
    k) Click OK
    l) Click i_CheckItemAvailability.sfmxsd > Messages > i_CheckItemAvailability > itemNumber > xsd:string1 Flow message editor, Advanced tab
    m) Click Properties tab Flow message editor
    n) Click Logical properties > Value Constraints Flow message editor, Properties tab, left pane
    o) Leave blank Length field Flow message editor, Properties tab, the Length Constraints group
    p) Leave blank Min field
    o) Type 42

    See CAUTION.

    Max field
    q) Click Basic tab Flow message editor
    1Notice that here the itemNumber variable is defined as type xsd:string rather than as type xsd:integer. The reason is so that in a comparison such as the following both operands have the same type (xsd:string):
    (i_CheckItemAvailability.itemNumber = v_CheckItemAvailability."INQ1-ITEMREF")

    2Here the maximum length (the Max constraint) is set to 4 characters because the maximum item number is 9999.

  3. Close the flow message editor.

Output message

In this subtopic you will delete the Extract variables (message elements) from the output message. These Extract variables were added automatically to the output message as a convenience when you created the Extract actions. You are now going to delete these Extract variables because in this tutorial the flow CheckItemAvailability.seqflow does not need to return the Extract values to the calling program (see Table 1).

You will also add an available message element to the output message. This message element is an output parameter that returns to the calling program a copy of the value in the available message element in the variable message (either the string YES or an empty string).

To delete the Extract variables (message elements):

  1. Open the variable message file:
    1. In the EST Project Explorer, right-click CatalogSample > CatalogSample.Interface > Messages > o_CheckItemAvailability.
    2. Click Open With > Flow Message Editor.

  2. Click the Basic tab.
  3. To delete the first message element:
    1. In the left pane of the flow message editor, right-click o_CheckItemAvailability.sfmxsd > o_CheckItemAvailability > INQ1-ITEMREF.
    2. Click Delete.

  4. Repeat the actions in Step 3 above to delete the remaining Extract variables INQ2-ITEMREF through INQ15-ITEMREF.

  5. Press Ctrl-S to save your work. Leave the flow editor open for now so that you can add the available message element.

To add the available message element:

  1. Open the output message file if it is not already open.
  2. Add the message element:

    Table 4. Create the message element available in the output message
    Action: Item: User interface:
    a) Click Basic tab Flow message editor
    b) Right-click o_CheckItemAvailability.sfmxsd > o_CheckItemAvailability Flow message editor, Basic tab, left pane
    c) Click Add Element
    d) Click localElement1
    e) Type available Flow message editor, Basic tab, right pane, Name field
    f) Click Advanced tab Flow message editor
    g) Click o_CheckItemAvailability.sfmxsd > Messages > o_CheckItemAvailability > available Flow message editor, Advanced tab
    h) Click The cell in the Type column to the right of available
    i) Scroll the list and select (New Simple Type Restriction) The drop-down list that opens when you clicked the empty cell in the preceding step.
    j) Scroll the list and select xsd:string The Base Type drop-down list The New Simple Type Restriction window
    k) Click OK
    l) Click o_CheckItemAvailability.sfmxsd > Messages > o_CheckItemAvailability > available > xsd:string Flow message editor, Advanced tab
    m) Click Properties tab Flow message editor
    n) Click Logical properties > Value Constraints Flow message editor, Properties tab, left pane
    o) Leave blank Length field Flow message editor, Properties tab, the Length Constraints group
    p) Leave blank Min field
    o) Type 31

    See CAUTION.

    Max field
    q) Click Basic tab Flow message editor

    1Here the maximum length (the Max constraint) is set to 3 characters because the value will be either the string YES or an empty string.

  3. Close the flow message editor.

Variable message

In this subtopic you will add the available variable (message element) to the variable message. This message element indicates whether the input item number is found in the list of items in the catalog of the CICS example catalog application. If the item number is found then available is set to the string YES. Otherwise available is set to an empty string (see Use of v_CheckItemAvailability.available in the flow CheckItemAvailability.seqflow).

To add the message element:

  1. Open the variable message file:
    1. In the EST Project Explorer, right-click CatalogSample > CatalogSample.Interface > Messages > v_CheckItemAvailability.
    2. Click Open With > Flow Message Editor.

  2. Add the message element:

    Table 5. Create the message element available
    Action: Item: User interface:
    a) Click Basic tab Flow message editor
    b) Right-click v_CheckItemAvailability.sfmxsd > v_CheckItemAvailability Flow message editor, Basic tab, left pane
    c) Click Add Element
    d) Click localElement1
    e) Type available Flow message editor, Basic tab, right pane, Name field
    f) Click Advanced tab Flow message editor
    g) Click v_CheckItemAvailability.sfmxsd > Messages > v_CheckItemAvailability > available Flow message editor, Advanced tab
    h) Click The cell in the Type column to the right of available
    i) Scroll the list and select (New Simple Type Restriction) The drop-down list that opens when you clicked the empty cell in the preceding step.
    j) Scroll the list and select xsd:string The Base Type drop-down list The New Simple Type Restriction window
    k) Click OK
    l) Click v_CheckItemAvailability.sfmxsd > Messages > v_CheckItemAvailability > available > xsd:string Flow message editor, Advanced tab
    m) Click Properties tab Flow message editor
    n) Click Logical properties > Value Constraints Flow message editor, Properties tab, left pane
    o) Leave blank Length field Flow message editor, Properties tab, the Length Constraints group
    p) Leave blank Min field
    o) Type 31

    See CAUTION.

    Max field
    q) Click Basic tab Flow message editor

    1Here the maximum length (the Max constraint) is set to 3 characters because the value will be either the string YES or an empty string.

  3. Close the flow message editor.


Terms of use | Feedback

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