Passing one line from a text file into a parm set?

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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I assume you mean here "replacing the default value of a parameter that is a member of a parameter set when the job run request is made".

In that case, yes, what you propose is feasible and viable. Beware that you may need to strip the newline from the end of the retrieved command output.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
rameshrr3
Premium Member
Premium Member
Posts: 609
Joined: Mon May 10, 2004 3:32 am
Location: BRENTWOOD, TN

Post by rameshrr3 »

Code: Select all

Trim(Convert(@FM,"",<Your Command Output ActivityVariable>)) 
should probably yield you what you are looking for
tbtcust
Premium Member
Premium Member
Posts: 230
Joined: Tue Mar 04, 2008 9:07 am

Post by tbtcust »

Thank you both. Could you provide details on how I can pass the output of $CommandOutput into the Job_Activity? I am lost on how this wold work.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

It doesn't sound like you want to pass it to a Job Activity stage since you're not looking up parameter values. I get the impression that you are overwriting the default values file for the parameter set and, if that is indeed what you are doing, then there's nothing to pass as far as I know. Just leave their value blank in the Job Activity stage so they can 'default'.
-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 can write to the Parameter Set values file before invoking the job. This would substitute the existing "default" values in that file. You would, of course, need to ensure that that particular values file was chosen as the "value" of the Parameter Set when the job run request is submitted.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
tbtcust
Premium Member
Premium Member
Posts: 230
Joined: Tue Mar 04, 2008 9:07 am

Post by tbtcust »

Thank you all for your help in this matter.

ray and chulett,
I am trying to replace the default value of a parameter in the set. I ran quite a few tests trying to pass the file content to the parm set with no success. Based on testing and your comments, overwriting the default values in the parameter set file (VOC file I think) is the only real option. I don't want to do this.

the workaround:
1) Have a sequence with Command Activity -> UserVariable activity -> Job Activity\

2) Have a job param in the Job Activity

3) Have the Command activity reads the input file via CAT command

4) UserVariable read the output of previous activity and stores it in a variables

3. Job activity pass the variable activity variables the job parm, which is used in the job.

rameshrr3, the FM command was not needed. The line comes as useable string


Thanks for all your help.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

No-one meant to imply any kind of VOC action was required. The assumption has been you are using a Values File to hold the default values and you want to overwrite that text file. Is that not what your goal here has been? :?
-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 will see references to individual parameters, whether or not they reside in Parameter Sets, in a Job Activity, and could therefore replace the default value of an individual parameter in that interface.

Or you can completely overwrite the values file, or even create a new values file, and set the Parameter Set "value" to the name (not pathname) of that 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.
tbtcust
Premium Member
Premium Member
Posts: 230
Joined: Tue Mar 04, 2008 9:07 am

Post by tbtcust »

Apologies to the forum for the confusion in this post.

chulett, in previous posts you wrote "write to the Parameter Set values file". Since I am not familiar with this file or it's location I decided to look at other posts which talked about the file. The VOC file reference is what I came up with.

Now that I have a better understanding, my goal is to overwrite the values file and use it in the Job Activity.
tbtcust
Premium Member
Premium Member
Posts: 230
Joined: Tue Mar 04, 2008 9:07 am

Post by tbtcust »

Found and able for update the parm set in DsPjHome/ParameterSets/ParameterSetName/
Post Reply