Job Parameters

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
myukassign
Premium Member
Premium Member
Posts: 238
Joined: Fri Jul 25, 2008 8:55 am

Job Parameters

Post by myukassign »

I want to give the file name in the sequentuial file from job parameters.

E.g If i have job parameter like this.


Variable Value
===== =====
p_FoldName /dw/dsadm

p_File MyFile.Txt


I gave like this in the sequential file stage. #p_FoldName##p_File #

But not working.


CAn anyone tell me wht need to do?

If I give an extra slash at the end of the p_FoldName its working fine.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

When you use "#p_FoldName##p_File #" as your file name, what happen? Normally this will work correctly. (If that extra space at the last hash mark is cut-and-pasted then that is the cause of your problem).
balajisr
Charter Member
Charter Member
Posts: 785
Joined: Thu Jul 28, 2005 8:58 am

Post by balajisr »

You need to give extra slash at the end of p_FoldName or #p_FoldName#/#p_File #
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Ahh, right. That too. But I still think the main problem is that space which is preventing the 2nd parameter to be used.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You're both right.
The slash is necessary to construct the pathname, and job parameter names can not include spaces.
So it's #p_FoldName#/#p_File# not #p_FoldName#/#p_File #
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Or as noted in the original post, make sure the pathname parameter value has a trailing separator:

p_FoldName /dw/dsadm/
p_File MyFile.Txt

#p_FoldName##p_File#

Makes it more portable if that is a consideration. However, I put the slash between the parameters as there's no chance of going from UNIX to Windows here and peoples tend to forget to supply the trailing slash. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
myukassign
Premium Member
Premium Member
Posts: 238
Joined: Fri Jul 25, 2008 8:55 am

Post by myukassign »

Yup!

Thanks a for all suggestions.

I think I need to put an extra slash.

:D m happy
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Then time to mark as Resolved with the big button at the top of the page.
-craig

"You can never have too many knives" -- Logan Nine Fingers
myukassign
Premium Member
Premium Member
Posts: 238
Joined: Fri Jul 25, 2008 8:55 am

Post by myukassign »

yep done
Post Reply