can you override a "Add Environment Variable" parm
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 99
- Joined: Tue Aug 17, 2004 7:50 am
- Location: Boulder, Colorado
can you override a "Add Environment Variable" parm
Hi,
Are you allowed to override a "Add Environment Variable" parameter with a dsjob -param xx=...? I was reading all the DSJE_BADPARAM discussion and it seemed like the answer might be "NO". Almost all our parameters are $PROJDEF but we would like to override this one at runtime. Is our only option to make it a regular, user defined, job parameter in order to override it at runtime?
... Flash
Are you allowed to override a "Add Environment Variable" parameter with a dsjob -param xx=...? I was reading all the DSJE_BADPARAM discussion and it seemed like the answer might be "NO". Almost all our parameters are $PROJDEF but we would like to override this one at runtime. Is our only option to make it a regular, user defined, job parameter in order to override it at runtime?
... Flash
Flash Gordon
Hyperborean Software Solution
Hyperborean Software Solution
-
- Premium Member
- Posts: 99
- Joined: Tue Aug 17, 2004 7:50 am
- Location: Boulder, Colorado
Craig,
I'm having problems. At first I was doing a date parameter and there were dashes in it and I thought that was my problem. So I switched it to a straight character parameter and I am still having the problems.
Error -3 getting information for parameter 'EPMONEOPERATORID'
Status code = -3 DSJE_BADPARAM
I guess it makes sense. If you want $PROJDEF then that's all we're going to allow for that parameter. I'm going to try it as a regular user defined parameter.
... Flash
I'm having problems. At first I was doing a date parameter and there were dashes in it and I thought that was my problem. So I switched it to a straight character parameter and I am still having the problems.
Error -3 getting information for parameter 'EPMONEOPERATORID'
Status code = -3 DSJE_BADPARAM
I guess it makes sense. If you want $PROJDEF then that's all we're going to allow for that parameter. I'm going to try it as a regular user defined parameter.
... Flash
Flash Gordon
Hyperborean Software Solution
Hyperborean Software Solution
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You should be able to override.
dsjob -run -param $MYPARAM=value project job
The default date format should be YYYY-MM-DD
dsjob -run -param $MYDATEPARAM=2007-12-09 project job
Or maybe it has to be quoted
dsjob -run -param $MYDATEPARAM='2007-12-09' project job
Experiment.
dsjob -run -param $MYPARAM=value project job
The default date format should be YYYY-MM-DD
dsjob -run -param $MYDATEPARAM=2007-12-09 project job
Or maybe it has to be quoted
dsjob -run -param $MYDATEPARAM='2007-12-09' project job
Experiment.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
If the format was wrong (dashes and such) you'd throw a -4 error, the -3 says there isn't a parameter with that name in your job. Don't exclude the $ when doing this, it might be as simple as that. And as Ray notes, dates will need to be in YYYY-MM-DD format.
Let us know if you get this working.
Let us know if you get this working.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 99
- Joined: Tue Aug 17, 2004 7:50 am
- Location: Boulder, Colorado
Ray/Craig,
We are using autosys here. When we try to say
-param $myparam=2007-04-15
autosys subsitutes '' for $myparam because he can't find $myparam in his env.
Maybe there are some ways around this but they got too painful.
We found an answer to this that I want to share. We found that if in the sequences you subsitute a real sequence parameter as the value for the environment parameter, that value will be passed to the job at execution time.
So in the Sequence stage calling the job in the column called "Name" you specify $MYENVVAR. Then in the column for "Value Expression" you put a "real" (non-environment) parameter. Then in dsjob you override the "real" parameter.
.. Flash
We are using autosys here. When we try to say
-param $myparam=2007-04-15
autosys subsitutes '' for $myparam because he can't find $myparam in his env.
Maybe there are some ways around this but they got too painful.
We found an answer to this that I want to share. We found that if in the sequences you subsitute a real sequence parameter as the value for the environment parameter, that value will be passed to the job at execution time.
So in the Sequence stage calling the job in the column called "Name" you specify $MYENVVAR. Then in the column for "Value Expression" you put a "real" (non-environment) parameter. Then in dsjob you override the "real" parameter.
.. Flash
Flash Gordon
Hyperborean Software Solution
Hyperborean Software Solution
-
- Premium Member
- Posts: 99
- Joined: Tue Aug 17, 2004 7:50 am
- Location: Boulder, Colorado
Ray/Craig,
We are using autosys here. When we try to say
-param $myparam=2007-04-15
autosys subsitutes '' for $myparam because he can't find $myparam in his env.
Maybe there are some ways around this but they got too painful.
We found an answer to this that I want to share. We found that if in the sequences you subsitute a real sequence parameter as the value for the environment parameter, that value will be passed to the job at execution time.
So in the Sequence stage calling the job in the column called "Name" you specify $MYENVVAR. Then in the column for "Value Expression" you put a "real" (non-environment) parameter. Then in dsjob you override the "real" parameter.
.. Flash
We are using autosys here. When we try to say
-param $myparam=2007-04-15
autosys subsitutes '' for $myparam because he can't find $myparam in his env.
Maybe there are some ways around this but they got too painful.
We found an answer to this that I want to share. We found that if in the sequences you subsitute a real sequence parameter as the value for the environment parameter, that value will be passed to the job at execution time.
So in the Sequence stage calling the job in the column called "Name" you specify $MYENVVAR. Then in the column for "Value Expression" you put a "real" (non-environment) parameter. Then in dsjob you override the "real" parameter.
.. Flash
Flash Gordon
Hyperborean Software Solution
Hyperborean Software Solution
-
- Premium Member
- Posts: 99
- Joined: Tue Aug 17, 2004 7:50 am
- Location: Boulder, Colorado
Just curious, did you try something like:flashgordon wrote:We are using autosys here. When we try to say
-param $myparam=2007-04-15
autosys subsitutes '' for $myparam because he can't find $myparam in his env.
-param '$myparam=2007-04-15'
or
-param \$myparam=2007-04-15
So that the dollar sign passes as a literal?
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 99
- Joined: Tue Aug 17, 2004 7:50 am
- Location: Boulder, Colorado
Craig,
I decided I wanted this bad enough that I wrote a parm testing job. This is straight unix, no autosys. Your ideas abouts quotes and backslash ran the jobs but did not substitue the parameters. This is close to all possible permutations for this problem:
myserv:/ps1/psoftts8/Ascential/DataStage/DSEngine: bin/dsjob -run -mode NORMAL -param $EPMONEOPERATORID=XXXX -wait -jobstatus INSTALL xparmt
Error -3 getting information for parameter ''
Status code = -3 DSJE_BADPARAM
myserv:/ps1/psoftts8/Ascential/DataStage/DSEngine: bin/dsjob -run -mode NORMAL -param EPMONEOPERATORID=XXXX -wait -jobstatus INSTALL xparmt
Error -3 getting information for parameter 'EPMONEOPERATORID'
Status code = -3 DSJE_BADPARAM
myserv:/ps1/psoftts8/Ascential/DataStage/DSEngine: bin/dsjob -run -mode NORMAL -param MYPARAM=XXXX -wait -jobstatus INSTALL xparmt
Waiting for job...
Finished waiting for job
Job Status : (1)
Status code = 1
myserv:/ps1/psoftts8/Ascential/DataStage/DSEngine: cat .dsrel
7.5.1.35
myserv:/ps1/psoftts8/Ascential/DataStage/DSEngine: bin/dsjob -run -mode NORMAL -param '$EPMONEOPERATORID=XXXX' -wait -jobstatus INSTALL xparmt
Waiting for job...
Finished waiting for job
Job Status : (1)
Status code = 1
myserv:/ps1/psoftts8/Ascential/DataStage/DSEngine: bin/dsjob -run -mode NORMAL -param \$EPMONEOPERATORID=XXXX -wait -jobstatus INSTALL xparmt
Waiting for job...
Finished waiting for job
Job Status : (1)
Status code = 1
myserv:/ps1/psoftts8/Ascential/DataStage/DSEngine: more /tmp/parmout.txt
"1","2",""
"1","2",""
"1","2",""
"1","2",""
"1","2",""
myserv:/ps1/psoftts8/Ascential/DataStage/DSEngine: bin/dsjob -run -mode NORMAL -param MYPARAM=CRAIG -wait -jobstatus INSTALL xparmt
Waiting for job...
Finished waiting for job
Job Status : (1)
Status code = 1
myserv:/ps1/psoftts8/Ascential/DataStage/DSEngine: more /tmp/parmout.txt
"1","2","CRAIG"
"1","2","CRAIG"
"1","2","CRAIG"
"1","2","CRAIG"
"1","2","CRAIG"
myserv:/ps1/psoftts8/Ascential/DataStage/DSEngine:
I decided I wanted this bad enough that I wrote a parm testing job. This is straight unix, no autosys. Your ideas abouts quotes and backslash ran the jobs but did not substitue the parameters. This is close to all possible permutations for this problem:
myserv:/ps1/psoftts8/Ascential/DataStage/DSEngine: bin/dsjob -run -mode NORMAL -param $EPMONEOPERATORID=XXXX -wait -jobstatus INSTALL xparmt
Error -3 getting information for parameter ''
Status code = -3 DSJE_BADPARAM
myserv:/ps1/psoftts8/Ascential/DataStage/DSEngine: bin/dsjob -run -mode NORMAL -param EPMONEOPERATORID=XXXX -wait -jobstatus INSTALL xparmt
Error -3 getting information for parameter 'EPMONEOPERATORID'
Status code = -3 DSJE_BADPARAM
myserv:/ps1/psoftts8/Ascential/DataStage/DSEngine: bin/dsjob -run -mode NORMAL -param MYPARAM=XXXX -wait -jobstatus INSTALL xparmt
Waiting for job...
Finished waiting for job
Job Status : (1)
Status code = 1
myserv:/ps1/psoftts8/Ascential/DataStage/DSEngine: cat .dsrel
7.5.1.35
myserv:/ps1/psoftts8/Ascential/DataStage/DSEngine: bin/dsjob -run -mode NORMAL -param '$EPMONEOPERATORID=XXXX' -wait -jobstatus INSTALL xparmt
Waiting for job...
Finished waiting for job
Job Status : (1)
Status code = 1
myserv:/ps1/psoftts8/Ascential/DataStage/DSEngine: bin/dsjob -run -mode NORMAL -param \$EPMONEOPERATORID=XXXX -wait -jobstatus INSTALL xparmt
Waiting for job...
Finished waiting for job
Job Status : (1)
Status code = 1
myserv:/ps1/psoftts8/Ascential/DataStage/DSEngine: more /tmp/parmout.txt
"1","2",""
"1","2",""
"1","2",""
"1","2",""
"1","2",""
myserv:/ps1/psoftts8/Ascential/DataStage/DSEngine: bin/dsjob -run -mode NORMAL -param MYPARAM=CRAIG -wait -jobstatus INSTALL xparmt
Waiting for job...
Finished waiting for job
Job Status : (1)
Status code = 1
myserv:/ps1/psoftts8/Ascential/DataStage/DSEngine: more /tmp/parmout.txt
"1","2","CRAIG"
"1","2","CRAIG"
"1","2","CRAIG"
"1","2","CRAIG"
"1","2","CRAIG"
myserv:/ps1/psoftts8/Ascential/DataStage/DSEngine:
Flash Gordon
Hyperborean Software Solution
Hyperborean Software Solution