How to pass file path as parameter in xml output stage

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
Hema.k
Participant
Posts: 43
Joined: Wed Dec 30, 2009 3:28 am

How to pass file path as parameter in xml output stage

Post by Hema.k »

Hi,

We are generating the xml files using xml output stage.If we hard code the filepath , it is generating the files.
If we pass the file path as parameter , xml files are not getting generated, but the job sucessfully runs without any warning.

Please let us know how to generate the files by giving filepath as parameter.

Thanks in advance.

Regards,
Hema K
prasson_ibm
Premium Member
Premium Member
Posts: 536
Joined: Thu Oct 11, 2007 1:48 am
Location: Bangalore

Post by prasson_ibm »

Hi,

You can parametrize the xml file path and file name.We have done in the same way.

File path =#EVENT_XML_PATH#/#XML_NAME#.xml

and its generating the output file successfully.

Please check with your path,if it is correct in parameter.
Hema.k
Participant
Posts: 43
Joined: Wed Dec 30, 2009 3:28 am

Post by Hema.k »

Hi Prasson,

Thanks for your reply.

The job is working fine after giving the job parameters.
Initially I have specified environmental variable for file path and it is not working.
Could you please let us know why it is not accepting environmental variable.what should be done If i want to use environmental variable ?

Please help.

Regards,
Hema K
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Show us exactly how you set everthing up in the job / stage to use environment variables for the file path.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You still need the "#" markers for environment variables, and these need to have been loaded into the job as parameters. For example:
File path =#$EVENT_XML_PATH#/#$XML_NAME#.xml
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Hema.k
Participant
Posts: 43
Joined: Wed Dec 30, 2009 3:28 am

Post by Hema.k »

Hi ray,

We have give the parameters with "#" .for eg#$evRMSRootPath# filename.xml
But in the director log it shows error like
NOTLIKELYDISCAPIOP_$evRMSRootPath

Regards,
Hema K
Post Reply