Rational Developer for System z

ItemSelection

Use this element to select individual data item in the COBOL structure.

The selection rules apply as follows:

Contained by

Contains

None

Attributes

Fields Description

Attribute: itemName
Valid values: See Description
Required?: Yes
Default value: None

Specifies the name of the data item to be selected.

Attribute: optional
Valid values: yes | no
Required?: No
Default value: None

Specifies whether the XML schema element generated from this item is optional. If set to "yes", the corresponding XML schema element will have a minOccurs facet generated and set to 0. If this attribute is not specified, minOccurs facet is not generated.

The value of the attribute must specify the item name qualified by a dot-separated parent names as shown in the example.

Example

For the following COBOL language structure
01 INPUT-MSG.
    02 IN-LL            PICTURE S9(3) COMP.
    02 IN-ZZ            PICTURE S9(3) COMP.
    02 IN-TRCD          PICTURE X(10).
    02 IN-CMD           PICTURE X(8).
    02 IN-NAME1         PICTURE X(10).
    02 redParent.
       03 redefd.
          04 IN-NAME2   PICTURE X(10).
       03 redefd2 redefines redefd.
          04 IN-NAME2R  PICTURE X(10).
    02 IN-EXTN          PICTURE X(10).
    02 IN-EXTNR redefines in-extn PICTURE X(10).
    02 IN-ZIP           PICTURE X(7).

The following item selections can be specified:

<ItemSelectionArray>
   <ItemSelection itemName="input-msg.redParent"/>
   <ItemSelection itemName="input-msg.in-extn"/>
   <ItemSelection itemName="input-msg.in-zip"/>
   <ItemSelection itemName="input-msg.in-ll"  optional="yes"/>
</ItemSelectionArray>
Note: To specify redefd2 redefinition in the redParent group, you need to specify the following RedefinesArray:

Otherwise, redefd items are selected by default.

<RedefinesArray>
   <RedefineSelection redefine="input-msg.redParent.redefd" 
            useRedefinition="input-msg.redParent.redefd2"/>
</RedefinesArray>

Feedback