ItemSelection
Use this element to select individual data item in the COBOL structure.
The selection rules apply as follows:
- When any item is selected, all parent group items containing the selected item are automatically selected
- If a selected item contains the REDEFINES clause, it must also be specified in the RedefineSelection element for this message specification
- When any group item is selected all its children are automatically selected (any items that contain the REDEFINES clause are also subject to the preceding rule)
- When an ODO (variable size repeating) item is selected, its ODO object (count variable) must also be selected. Otherwise the results produced by the generated artifacts are undefined
- ItemSelection elements can appear in any order within ItemSelectionArray
- The value of the ItemSelection attribute must specify the data item name prefixed by dot-separated parent group names.
- The values of the ItemSelection attributes are not case-sensitive. For example, specifying itemName="FoO.bAr" is equivalent to specifying itemName="fOo.BaR"
- If none of the selected items appear in the language structure, the results produced by the generated artifacts are undefined.
Contained by
Contains
NoneAttributes
| 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>