Manipulate Job Parameter

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
news78
Participant
Posts: 44
Joined: Fri Jul 07, 2006 1:37 pm

Manipulate Job Parameter

Post by news78 »

Is it possible to manipulate the a job parameter in the Folder stage?
For e.g. I have a job parameter "File" which has the absolute path to a file
e.g. File = /a/b/file1.dat

Now in the folder stage in the Properties tab I need to specify just the folder
"/a/b" I tried doing #File#[1,4]
The job compiles fine but at run time it is not performing the substring and instead does /a/b[1,4]

How do I go about this?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Use two parameters, one for the folder and another for the filename.
-craig

"You can never have too many knives" -- Logan Nine Fingers
news78
Participant
Posts: 44
Joined: Fri Jul 07, 2006 1:37 pm

Post by news78 »

chulett wrote:Use two parameters, one for the folder and another for the filename. ...
Is there no other way using one parameter? Making two parameters is currently the last option as it will involve many other changes for us.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I never use a single parameter to encompass a complete filename, always two - specifically because they are not easily manipulated inside jobs. They are, however, easily combined. :wink:

You'd have to do that outside of the job. For example, a Sequence job could use substrings like you noted (or the Field command) to send portions of job parameters into jobs that it controls. Or a custom 'job control wrapper' could do that. But, as noted, it would have to have been split before it gets handed to the job that would be using it.

Is that something you can implement?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply