Passing a parameter from a unix command

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
dsuser_cai
Premium Member
Premium Member
Posts: 151
Joined: Fri Feb 13, 2009 4:19 pm

Passing a parameter from a unix command

Post by dsuser_cai »

Hi

I would like to pass a parameter to my job from a unix command.

the unix command reads a file that has one value (1000) and shoudl pass that as a parameter to the job. in the job properties window im using the before job subroutine, i use the following command

cat path/file_name.txt #DsParameter#

on the parameters tab, i have this parameter (DsParameter).

but when i run this job the command reads the file and gets the value but its not passing it to the DS parameter. Can anybody help me.
Thanks
Karthick
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You can not change a job's parameter values once the job is running.

Therefore you will need to read the file before the job runs (for example from an Execute Command activity in a sequence) and use its output, trimmed of field marks, as the value with which to provide the parameter in a downstream Job activity.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post by keshav0307 »

Yes a sequencer,
read the parameter from unix file before the job and loop the job.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

A sequence.

A sequencer only makes an "any" or "all" decision about whether its inputs have fired. It's a component in a sequence.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply