Dynamically update parameter in XML filename

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
cdp
Premium Member
Premium Member
Posts: 113
Joined: Tue Dec 15, 2009 9:28 pm
Location: New Zealand

Dynamically update parameter in XML filename

Post by cdp »

Is there a way to dynamically pass a field value to a parameter which will be used to generate an XML file name?

For example, I need to process thousands of policies, with policy number as the key identifier, and generate a xml file for each policy. The requirement is for the XML file name to contain the policy number e.g.: AMO_Policy_0017120M06_2012-03-04_D_198765.xml with '0017120M06' as the policy number. The policy number will also be available in the XML file in its own tag, for example: <policyNumber>0000821M03</policyNumber>

Does anyone have an idea how I can achive this?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I don't believe there is a way to control the XML Output's filename based on input data, at least not that I found in the versions I worked with. You give it a base name and you can control the split to a new filename with the Trigger Column, but you are stuck with the sequential numbering it does.

What we did was let it do that and also split off another stream to a flat file that contained the data element to control the actual filename. Then a post-process reads the list and performs a series of renames.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kandyshandy
Participant
Posts: 597
Joined: Fri Apr 29, 2005 6:19 am
Location: Singapore

Post by kandyshandy »

It is not possible while creating the files. May be you can have scripts to do this after creating the files.
Kandy
_________________
Try and Try again…You will succeed atlast!!
Post Reply