More specifically, the annotations function provides the capability currently provided by ItemExclusionArray, ItemSelectionArray, and XMLNameArray elements of the batch processor options files, they allow the user to explicitly exclude (ItemExclusionArray), include (ItemSelectionArray) and rename (XMLNameArray) the desired items in the generated service interface.
LINKAGE SECTION. 1 department. 2 member-count pic 9(9) binary. 2 member-details occurs 5 times. 3 first-name pic x(35). 3 last-name pic x(45). 3 contact-phone pic x(25). 3 contact-address pic x(75). 3 promotion-level pic x(20). 3 last-promotion-date pic x(10). 3 salary pic x(3).
<OutputMessage importFile="samp.cpy" importDirectory="C:/Source" nativeTypeName="department">
<ItemExclusionArray>
<ExcludeItem itemName="department.member-details.salary"/>
</ItemExclusionArray>
<XMLNameArray>
<XMLNameSelection itemName="first-name" XmlName="FirstName"/>
</XMLNameArray>
</OutputMessage>
Annotating the data structure source allows the users to specify similar type of information directly in the source of the data declaration rather than in an Batch processor option configuration file. This method keeps the service interface specification and the actual interface in a single source file.
@ANN *OMIT salary
@ANN *OLDNAME first-name
@ANN *NEWAME FirstName
LINKAGE SECTION.
1 department.
2 member-count pic 9(9) binary.
2 member-details occurs 5 times.
3 first-name pic x(35).
3 last-name pic x(45).
3 contact-phone pic x(25).
3 contact-address pic x(75).
3 promotion-level pic x(20).
3 last-promotion-date pic x(10).
3 salary pic x(3).