Passing Env variables through dsjob
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 497
- Joined: Sun Dec 17, 2006 11:52 pm
- Location: Kolkata
- Contact:
Passing Env variables through dsjob
Hi All,
The job designed has certain environmental variables that have been defined in DS Administrator and its default value is passed as $ENV in the job properties . How can we pass those parameters when we run the job through dsjob command.
Thanks in advance.
The job designed has certain environmental variables that have been defined in DS Administrator and its default value is passed as $ENV in the job properties . How can we pass those parameters when we run the job through dsjob command.
Thanks in advance.
-
- Premium Member
- Posts: 497
- Joined: Sun Dec 17, 2006 11:52 pm
- Location: Kolkata
- Contact:
Thanks for the reply. The scenario is suppose for the file path we declare it as an env variable, in the job the parameter is called and the default value is defined as $ENV and then in the sequential file stage file property we call that parameter.As the parameter is used we need to pass this parameter in the dsjob command , but what value should be passed, without the parameter definition the job gets aborted.
-
- Premium Member
- Posts: 497
- Joined: Sun Dec 17, 2006 11:52 pm
- Location: Kolkata
- Contact:
Thanks for the reply. The value has been defined in the DS Administrator and in the job properties $ENV is passed in the default value tab.
The job aborts with the following message :-
where path is the env parameter.
The job aborts with the following message :-
Code: Select all
Missing Parameters $path [$ENV]
-
- Premium Member
- Posts: 497
- Joined: Sun Dec 17, 2006 11:52 pm
- Location: Kolkata
- Contact:
Nice article but it doesn't address the specific 'dsjob' question that I noticed. However, it does make me realize that the OP doesn't really seem to have things setup correctly.
The value of the variable should either already be defined in the 'environment' (in dsenv, for example) and then set in the Adminitrator to $ENV or 'hard-coded' there instead to a value appropriate to the Project. Then what the job should use is $PROJDEF.
If you switch things around like that, do they work more better? Still without passing anything from the command line.
The value of the variable should either already be defined in the 'environment' (in dsenv, for example) and then set in the Adminitrator to $ENV or 'hard-coded' there instead to a value appropriate to the Project. Then what the job should use is $PROJDEF.
If you switch things around like that, do they work more better? Still without passing anything from the command line.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 497
- Joined: Sun Dec 17, 2006 11:52 pm
- Location: Kolkata
- Contact:
We're going around in circles here. If "the requirement" is to set the job's default value to $ENV then the proper value must exist in the environment before the job is started. You don't pass anything to it on the command line.
So why not try setting the environment variable to the proper value in the script before 'dsjob' is envoked, don't mention the parameter in the invocation, and see what happens.
So why not try setting the environment variable to the proper value in the script before 'dsjob' is envoked, don't mention the parameter in the invocation, and see what happens.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 497
- Joined: Sun Dec 17, 2006 11:52 pm
- Location: Kolkata
- Contact:
Thanks for the reply. So when we intend to use $ENV as the default value then the parameter value has to be defined in the shell script earlier and its not needed to define it in the DS Administrator. No need of passing the parameter as dsjob argument and the dsjob command will be the same as used in the case of $PROJDEF command. Do we need to use -local option as well in the dsjob command.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The special tokens $PROJDEF, $ENV and $UNSET are only ever used in the job parameter definition grid in a job design. They are never mentioned in the Administrator client.
Does that help clarify your question?
Does that help clarify your question?
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.