Example 6: XML clauses (with %{listValFile} and %{seq} keywords)
Here is the result of the Optimâ„¢ High Performance Unload execution:
[i1010@lat179(:) ~]$ db2hpu -i i1010 -f sysin_template
INZM031I Optim High Performance Unload for Db2 06.01.00.001(130808)
64 bits 08/05/2013 (Linux lat179 x86_64)
INZI473I Memory limitations: 'unlimited' for virtual memory and 'unlimited' for data segment
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----
000001 GLOBAL CONNECT TO
000002 SAMPLE
000003 ;
000004
000005 UNLOAD TABLESPACE
000006 DB2 NO
000007
000008 SELECT * FROM CUSTOMER2;
000009
000010 XMLFILE ("xmlfile%{listValFile,1,2}%{seq||1|.ext}","xmlfile3")
000011
000012 OUTFILE ("outfile")
000013
000014 FORMAT DEL;
000015
INZU462I HPU control step start: 15:34:29.163.
INZU463I HPU control step end : 15:34:29.183.
INZU464I HPU run step start : 15:34:29.184.
INZU410I HPU utility has unloaded 24 rows on lat179 host for I1010.CUSTOMER2 in outfile.
INZU465I HPU run step end
INZI441I HPU successfully ended: Real time ->0m0.610442s
User time -> 0m0.025995s : Parent -> 0m0.024996s, Children -> 0m0.000999s
Syst time -> 0m0.020996s : Parent -> 0m0.017997s, Children -> 0m0.002999s
[i1010@lat179(:) ~]$ ls -al xmlfile*
-rw-r--r-- 1 i1010 db2grp 281 Aug 8 15:34 xmlfile1.ext1.000.xml
-rw-r--r-- 1 i1010 db2grp 283 Aug 8 15:34 xmlfile1.ext2.000.xml
-rw-r--r-- 1 i1010 db2grp 282 Aug 8 15:34 xmlfile1.ext3.000.xml
-rw-r--r-- 1 i1010 db2grp 408 Aug 8 15:34 xmlfile1.ext4.000.xml
-rw-r--r-- 1 i1010 db2grp 412 Aug 8 15:34 xmlfile1.ext5.000.xml
-rw-r--r-- 1 i1010 db2grp 421 Aug 8 15:34 xmlfile1.ext6.000.xml
-rw-r--r-- 1 i1010 db2grp 281 Aug 8 15:34 xmlfile1.ext7.000.xml
-rw-r--r-- 1 i1010 db2grp 283 Aug 8 15:34 xmlfile1.ext8.000.xml
-rw-r--r-- 1 i1010 db2grp 282 Aug 8 15:34 xmlfile1.ext9.000.xml
-rw-r--r-- 1 i1010 db2grp 408 Aug 8 15:34 xmlfile2.ext1.000.xml
-rw-r--r-- 1 i1010 db2grp 412 Aug 8 15:34 xmlfile2.ext2.000.xml
-rw-r--r-- 1 i1010 db2grp 421 Aug 8 15:34 xmlfile2.ext3.000.xml
-rw-r--r-- 1 i1010 db2grp 281 Aug 8 15:34 xmlfile2.ext4.000.xml
-rw-r--r-- 1 i1010 db2grp 283 Aug 8 15:34 xmlfile2.ext5.000.xml
-rw-r--r-- 1 i1010 db2grp 282 Aug 8 15:34 xmlfile2.ext6.000.xml
-rw-r--r-- 1 i1010 db2grp 408 Aug 8 15:34 xmlfile2.ext7.000.xml
-rw-r--r-- 1 i1010 db2grp 412 Aug 8 15:34 xmlfile2.ext8.000.xml
-rw-r--r-- 1 i1010 db2grp 421 Aug 8 15:34 xmlfile2.ext9.000.xml
-rw-r--r-- 1 i1010 db2grp 281 Aug 8 15:34 xmlfile3.e00001.000.xml
-rw-r--r-- 1 i1010 db2grp 283 Aug 8 15:34 xmlfile3.e00002.000.xml
-rw-r--r-- 1 i1010 db2grp 282 Aug 8 15:34 xmlfile3.e00003.000.xml
-rw-r--r-- 1 i1010 db2grp 408 Aug 8 15:34 xmlfile3.e00004.000.xml
-rw-r--r-- 1 i1010 db2grp 412 Aug 8 15:34 xmlfile3.e00005.000.xml
-rw-r--r-- 1 i1010 db2grp 421 Aug 8 15:34 xmlfile3.e00006.000.xml
Among the XML files generated, there are 9 files named with the prefix xmlfile1 and 9 files named with the prefix xmlfile2, and all the other files are named with the prefix xmlfile3.
The filenames starting with the prefixes xmlfile1 and xmlfile2 come from the %{listValFile} keyword specification, and the number of files for each (9) comes from the %{seq} keyword specification.
For the filenames starting with the prefix xmlfile3, the default sequence template applies (%{seq||5|.e}).