Include
Using the include
element it is possible to include other XML or text files inside a job script.
The include
element can be specified inside any element of the job script. Its value defines the name of the file to include.
If the file path is not absolute, it is searched in the same directory of the source job script.
The attributes type
indicates the nature of include code:
- xml (default): the included file must be a valid XML, and therefore is parse as part of the job XML
- text: the included file is any kind of text and therefore is treated as value of the surrounding element
Example
<?xml version="1.0" encoding="utf-8"?>
<job>
<filecompare name="FILECMP02" left="REPOEBCDIC" right="REPOASCII">
<left recfmt="fixed" reclen="80">IANUS.TEST.SEQ02.EBCDIC.DAT</left>
<right recfmt="fixed" reclen="80">IANUS.TEST.SEQ02.ASCII.DAT</right>
<layouts>
<include>ZZREC01.xml</include>
</layouts>
</filecompare>
<filecompare name="FILECMP02" left="REPOEBCDIC" right="REPOASCII">
<left recfmt="fixed" reclen="80">IANUS.TEST.SEQ02.EBCDIC.DAT</left>
<right recfmt="fixed" reclen="80">IANUS.TEST.SEQ02.ASCII.DAT</right>
<layouts>
<layout type="cobol" format="free" length="80">
<include type="text">ZZREC01.cpy</include>
</layout>
</layouts>
</filecompare>
</job>