Page 1 of 1

execute ds job through command line with env file

Posted: Wed Nov 01, 2017 1:09 pm
by deesh
Hi, I am trying to execute the ds job through command line.

when i am trying include the parameter set in the command line job is triggering, but if i include env variables in the command line job is failing.

1.Please let me know how to run command line with env variables.
2. Please let me know how to run the command line with the environment file, this environment file contains all the param values which are required for command line exection.

Please provide the syntax.

Posted: Wed Nov 01, 2017 1:17 pm
by FranklinE
You should be using a Unix script. If you are trying to manually create the command line, it will not work as you desire.

Sorry, but I won't do your scripting work for you, so no syntax provided.

The first thing you must source in a ssi file, which will contain all variables and their values for which you need to include in your command line parameters. That is the simplest and most direct way to use environment variables.

Posted: Wed Nov 01, 2017 2:23 pm
by ray.wurlod
Are the environment variables part of the job design (as parameters)?

In that case, simply refer to them in the -param option of dsjob command.

Posted: Wed Nov 01, 2017 3:50 pm
by chulett
Unless I'm missing something, actual environment variables don't need to be passed on the command line, that kind of defeats their purpose. You simply reference / source them from the environment where they are needed in the job.

Posted: Thu Nov 02, 2017 12:03 am
by ray.wurlod
... unless you want to override their values for this particular run. For example

Code: Select all

-param MyParamSet.$APT_DISABLE_COMBINATION=True

Posted: Thu Nov 02, 2017 12:17 am
by chulett
... right, assuming they are defined as job parameters, sure.