Pass the value to Parameter set from script

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
mandyli
Premium Member
Premium Member
Posts: 898
Joined: Wed May 26, 2004 10:45 pm
Location: Chicago

Pass the value to Parameter set from script

Post by mandyli »

Hi

I would like to pass the one paramater value to Paramater Set from command line.

I hope using -ds-job command we can pass -param for normal parameter,
But I need to pass only one value to Parameter set.

Thanks
Man
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Use "dot notation".

Code: Select all

-param parametersetname.parametername=value
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
mandyli
Premium Member
Premium Member
Posts: 898
Joined: Wed May 26, 2004 10:45 pm
Location: Chicago

Post by mandyli »

Thanks Ray.

When I test following command but still I am getting error?

psValue="-param project_param_set.data_path=/home/aaa/dir/"

$DSHOME/bin/dsjob -run -mode NORMAL -param $psValue Test_project seq_test

Invalid arguments: dsjob -run
[-mode <NORMAL | RESET | VALIDATE>]
[-paramfile <filename>]
[-param <name>=<value>]
[-warn <n>]
[-rows <n>]
[-wait]
[-opmetadata <TRUE | FALSE>]
[-disableprjhandler]
[-disablejobhandler]
[-jobstatus]
[-userstatus]
[-local]
[-useid]
<project> <job|jobid>

Status code = -9999 DSJE_DSJOB_ERROR
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Too many "-param"s in there.
-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 »

What Craig is intimating is that you have a -param in the dsjob command line and another in the value of the psValue shell variable. The dsjob command objects to what becomes an empty -param argument. Think about what the expanded command would look like.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
mandyli
Premium Member
Premium Member
Posts: 898
Joined: Wed May 26, 2004 10:45 pm
Location: Chicago

Post by mandyli »

Thanks Ray & Craig,

That is my mistake.

psValue="project_param_set.data_path=/home/aaa/dir/"

$DSHOME/bin/dsjob -run -mode NORMAL -param $psValue Test_project seq_test

After I modified but still I am getting same error.

Error -3 getting information for parameter 'project_param_set.data_path'

Status code = -3 DSJE_BADPARAM

I am not sure what i missed here.

Thanks
Man
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Verify for us that your job's parameter name exactly matches what you are using on the command line - including case.
-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 »

This is a different error than the syntax error you had before. DSJE_BADPARAM means one of three things:
  • there is no parameter set called project_param_set in the project

    there is no parameter called data_path in the parameter set

    the parameter set has not been loaded into the job design
Please verify all these aspects, noting too that parameter set names and parameter names are case sensitive.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
DIVIHN
Premium Member
Premium Member
Posts: 4
Joined: Thu Jun 23, 2011 12:05 pm
Contact:

Post by DIVIHN »

Thanks Ray & Craig.
Post Reply