Reading Parameters from a file

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
ragasambath
Participant
Posts: 12
Joined: Wed Oct 03, 2007 9:11 am
Location: London

Reading Parameters from a file

Post by ragasambath »

Dear Members,

The requirement is to read the parameters defined in file and pass it to the sequence

Can you please suggest a possible solution

Thanks in advance
Regards

Raga
dsuser_cai
Premium Member
Premium Member
Posts: 151
Joined: Fri Feb 13, 2009 4:19 pm

Post by dsuser_cai »

You can use a routine to read parameters from a file and pass it to the sequence. This is how we do it.
Thanks
Karthick
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

You have to do it in job control or a shell script. You need to read the parameter values then run the first sequence or run this job to run the real job. The reason is you cannot change parameter values after a job starts. So this job would need the real job name as a parameter and maybe the filename in which the parameter values are stored.
Mamu Kim
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Or you may be able to read them in inside the Sequence job if the Sequence job itself doesn't need them, just the activities that it runs. For example, something like what was discussed here.

However. much cleaner to do this at the job control / script 'wrapper' level.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

I would only recommend that for a small number of variables. This is more tedious than doing it in job control.
Mamu Kim
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Agreed.
-craig

"You can never have too many knives" -- Logan Nine Fingers
sajidkp
Participant
Posts: 114
Joined: Thu Apr 30, 2009 12:17 am
Location: New Delhi

Post by sajidkp »

Use command stage and activity variables in sequencer
Regards,
Sajid KP
Post Reply