I have several input fields with xml format. Each field is having format like <Delimiter>Field value</Delimiter>. So I have fields namely, msgid,sysid,src,and msgtyp for which I have devloped below SORT card for it. <<Please dont go in detail for FINDREP part as I have shown to understand skip of the general header part of XML>>
INREC FINDREP=(INOUT=(C'<?xml version="1.0msg>',C'', -
and this will work perfectly fine for the order sequence of xml delimiters as, msgid ==> sysid ==> src ==> msgtyp then only.
If the delimiter order sequence is changed then it yields with wrong output. e.g. msgid ==> sysid ==> msgtyp ==>src
src ==> sysid ==> msgid ==> msgtyp
or any combination other than "msgid ==> sysid ==> src ==> msgtyp" this order sequence.
Can any one suggest me for this SORT card working for all the order sequences that will be a great help. Cause in XML format input its not mandate all the fields will be there in the input records, say some input records might have all the 4 fields with delimiters and some records may have only field with delimiter or two field with 2 delimiters likewise.