XML stage

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
kumar66
Participant
Posts: 265
Joined: Thu Jul 26, 2007 12:14 am

XML stage

Post by kumar66 »

Hi All,


I have a requirement. My XML output stage should generated the output format mentioned below:

- <xtd:Data>
- <![CDATA[
01|3|34|343|01|01|361227|3|1|2007120600|JUL 2007 |2007120626|WK 26 - 08/04/2007
01|3|34|343|01|01|361227|1|1|2007120600|JUL 2007 |2007120625|WK 25 - 07/28/2007
01|3|34|343|01|01|361228|5|1|2007120600|JUL 2007 |2007120626|WK 26 - 08/04/2007
01|3|34|343|00|01|361246|0|1|2007120600|JUL 2007 |2007120624|WK 24 - 07/21/2007
01|3|34|343|01|01|361228|5|1|2007120600|JUL 2007 |2007120624|WK 24 - 07/21/2007
01|3|34|343|01|01|361237|3|1|2007120600|JUL 2007 |2007120625|WK 25 - 07/28/2007
01|3|34|343|01|01|361227|0|1|2007120600|JUL 2007 |2007120626|WK 26 - 08/04/2007
01|3|34|343|01|01|361233|3|1|2007120600|JUL 2007 |2007120626|WK 26 - 08/04/2007
01|3|34|343|01|01|361229|0|1|2007120600|JUL 2007 |2007120624|WK 24 - 07/21/2007
01|3|34|343|00|01|361248|0|1|2007120600|JUL 2007 |2007120626|WK 26 - 08/04/2007
01|3|34|343|00|01|361248|0|1|2007120600|JUL 2007 |2007120624|WK 24 - 07/21/2007
</xtd:Data>


I dont know how to generate this output format. I designed a job and my job generated this output in this format:


<xtd:Record>2006|.00|.00|.00|.00|.00|.00|.00|.00|AUG|TWILL SUMMER|USD|01|1|01|140|14|00|156671|.00|.00|.00|.00|.00|SMR|F|2002|0|0|0|0|29</xtd:Record>
<xtd:Record>2006|.00|.00|.00|.00|.00|.00|.00|.00|AUG|TWILL SUMMER|USD|01|1|01|140|14|00|156671|.00|.00|.00|.00|.00|F2 |F|2002|0|0|0|0|29</xtd:Record>
<xtd:Record>2006|.00|.00|.00|.00|.00|.00|.00|.00|AUG|TWILL SUMMER|USD|01|1|01|140|14|00|156671|.00|.00|.00|.00|.00|F2 |F|2002|0|0|0|0|27</xtd:Record>
<xtd:Record>2006|.00|.00|.00|.00|.00|.00|.00|.00|AUG|TWILL SUMMER|USD|01|1|01|140|14|00|156671|.00|.00|.00|.00|.00|SMR|F|2002|0|0|0|0|30</xtd:Record>
<xtd:Record>2006|.00|.00|.00|.00|.00|.00|.00|.00|AUG|TWILL SUMMER|USD|01|1|01|140|14|00|156671|.00|.00|.00|.00|.00|SB2|S|2002|0|0|0|0|30</xtd:Record>
<xtd:Record>2006|.00|.00|.00|.00|.00|.00|.00|.00|AUG|TWILL SUMMER|USD|01|1|01|140|14|00|156671|.00|.00|.00|.00|.00|F2 |F|2002|0|0|0|0|30</xtd:Record>
<xtd:Record>2006|.00|.00|.00|.00|.00|.00|.00|.00|AUG|TWILL SUMMER|USD|01|1|01|140|14|00|156671|.00|.00|.00|.00|.00|SMR|F|2002|0|0|0|0|27</xtd:Record>
<xtd:Record>2006|.00|.00|.00|.00|.00|.00|.00|.00|AUG|TWILL SUMMER|USD|01|1|01|140|14|00|156671|.00|.00|.00|.00|.00|SB2|S|2002|0|0|0|0|29</xtd:Record>
<xtd:Record>2006|.00|.00|.00|.00|.00|.00|.00|.00|AUG|TWILL SUMMER|USD|01|1|01|140|14|00|156671|.00|.00|.00|.00|.00|SB2|S|2002|0|0|0|0|27</xtd:Record>


Do you guys know how to do this.

Thanks,
turash
Premium Member
Premium Member
Posts: 51
Joined: Fri Apr 06, 2007 10:09 am
Location: Edison, NJ

Re: XML stage

Post by turash »

I think you have to define this as part of initial XML design.

kumar66 wrote:Hi All,


I have a requirement. My XML output stage should generated the output format mentioned below:

- <xtd:Data>
- <![CDATA[
01|3|34|343|01|01|361227|3|1|2007120600|JUL 2007 |2007120626|WK 26 - 08/04/2007
01|3|34|343|01|01|361227|1|1|2007120600|JUL 2007 |2007120625|WK 25 - 07/28/2007
01|3|34|343|01|01|361228|5|1|2007120600|JUL 2007 |2007120626|WK 26 - 08/04/2007
01|3|34|343|00|01|361246|0|1|2007120600|JUL 2007 |2007120624|WK 24 - 07/21/2007
01|3|34|343|01|01|361228|5|1|2007120600|JUL 2007 |2007120624|WK 24 - 07/21/2007
01|3|34|343|01|01|361237|3|1|2007120600|JUL 2007 |2007120625|WK 25 - 07/28/2007
01|3|34|343|01|01|361227|0|1|2007120600|JUL 2007 |2007120626|WK 26 - 08/04/2007
01|3|34|343|01|01|361233|3|1|2007120600|JUL 2007 |2007120626|WK 26 - 08/04/2007
01|3|34|343|01|01|361229|0|1|2007120600|JUL 2007 |2007120624|WK 24 - 07/21/2007
01|3|34|343|00|01|361248|0|1|2007120600|JUL 2007 |2007120626|WK 26 - 08/04/2007
01|3|34|343|00|01|361248|0|1|2007120600|JUL 2007 |2007120624|WK 24 - 07/21/2007
</xtd:Data>


I dont know how to generate this output format. I designed a job and my job generated this output in this format:


<xtd:Record>2006|.00|.00|.00|.00|.00|.00|.00|.00|AUG|TWILL SUMMER|USD|01|1|01|140|14|00|156671|.00|.00|.00|.00|.00|SMR|F|2002|0|0|0|0|29</xtd:Record>
<xtd:Record>2006|.00|.00|.00|.00|.00|.00|.00|.00|AUG|TWILL SUMMER|USD|01|1|01|140|14|00|156671|.00|.00|.00|.00|.00|F2 |F|2002|0|0|0|0|29</xtd:Record>
<xtd:Record>2006|.00|.00|.00|.00|.00|.00|.00|.00|AUG|TWILL SUMMER|USD|01|1|01|140|14|00|156671|.00|.00|.00|.00|.00|F2 |F|2002|0|0|0|0|27</xtd:Record>
<xtd:Record>2006|.00|.00|.00|.00|.00|.00|.00|.00|AUG|TWILL SUMMER|USD|01|1|01|140|14|00|156671|.00|.00|.00|.00|.00|SMR|F|2002|0|0|0|0|30</xtd:Record>
<xtd:Record>2006|.00|.00|.00|.00|.00|.00|.00|.00|AUG|TWILL SUMMER|USD|01|1|01|140|14|00|156671|.00|.00|.00|.00|.00|SB2|S|2002|0|0|0|0|30</xtd:Record>
<xtd:Record>2006|.00|.00|.00|.00|.00|.00|.00|.00|AUG|TWILL SUMMER|USD|01|1|01|140|14|00|156671|.00|.00|.00|.00|.00|F2 |F|2002|0|0|0|0|30</xtd:Record>
<xtd:Record>2006|.00|.00|.00|.00|.00|.00|.00|.00|AUG|TWILL SUMMER|USD|01|1|01|140|14|00|156671|.00|.00|.00|.00|.00|SMR|F|2002|0|0|0|0|27</xtd:Record>
<xtd:Record>2006|.00|.00|.00|.00|.00|.00|.00|.00|AUG|TWILL SUMMER|USD|01|1|01|140|14|00|156671|.00|.00|.00|.00|.00|SB2|S|2002|0|0|0|0|29</xtd:Record>
<xtd:Record>2006|.00|.00|.00|.00|.00|.00|.00|.00|AUG|TWILL SUMMER|USD|01|1|01|140|14|00|156671|.00|.00|.00|.00|.00|SB2|S|2002|0|0|0|0|27</xtd:Record>


Do you guys know how to do this.

Thanks,
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Tell us more about the source and what the input rows look like....is all of that information (the pipe delimited pieces) coming from "a single column in a single row?"...."a single column, but from multiple rows?"....."multiple columns in a single row?"....."Multiple coumns from multiple rows?" That will be very significant in addressing techniques for this...

Ernie
Post Reply