Is there a way to declare a job parameter and then use that job parameter in the default value of a parameter that appears later in the grid.
example:
declare SRC with a value of dev
and then declare
SOMEPATH with a value of /opt/somewhere/#SRC#/morepath
such that SOMEPATH evaluates to /opt/somewhere/dev/morepath at runtime.
Job Parameter's that include other Job Parameters
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Only indirectly.
You need to do it in job control code, in which you build all parameters before issuing job run requests.
Of course, you don't need DSGetParamInfo to determine the value of SRC, because it's already in the job control code. All you need is SRC = "dev"!
You need to do it in job control code, in which you build all parameters before issuing job run requests.
Code: Select all
hJob1 = DSAttachJob("Job1", DSJ.ERRNONE)
ErrCode = DSSetParam(hJob1, "SRC", "dev")
hJob2 = DSAttachJob("Job2", DSJ.ERRNONE)
SRC = DSGetParamInfo(hJob1, "SRC", DSJ.PARAMVALUE)
ErrCode = DSSetParam(hJob2, "SomePath", "/opt/somewhere/" : SRC : "/morepath")
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.
-
- Participant
- Posts: 3593
- Joined: Thu Jan 23, 2003 5:25 pm
- Location: Australia, Melbourne
- Contact:
If you want every part of your path to be a job parameter, and you want part of it to be DEV / TEST / PROD then consider two layers of batch/sequence jobs, the first sets multiple path variables and passes it through as consolidated paths to the child job.
Parent path has the following variables:
PROJECT_PATH "/opt/somewhere/"
ENVIRONMENT "DEV"
SOURCE_PATH "/sourcefiles"
LOOKUP_PATH "/lookupfiles"
REJECT_PATH "/rejectfiles"
Inside this sequence job you call another sequence job and pass it consolidated parameters which are then passed to server jobs:
FULL_SOURCE_PATH PROJECT_PATH:ENVIRONMENT:SOURCE_PATH
FULL_LOOKUP_PATH PROJECT_PATH:ENVIRONMENT:LOOKUP_PATH
FULL_REJECT_PATH PROJECT_PATH:ENVIRONMENT:REJECT_PATH
When you put your paths together you need to decide whether to do it once using this hierarchy or do it over and over in the actual path fields in server jobs.
Parent path has the following variables:
PROJECT_PATH "/opt/somewhere/"
ENVIRONMENT "DEV"
SOURCE_PATH "/sourcefiles"
LOOKUP_PATH "/lookupfiles"
REJECT_PATH "/rejectfiles"
Inside this sequence job you call another sequence job and pass it consolidated parameters which are then passed to server jobs:
FULL_SOURCE_PATH PROJECT_PATH:ENVIRONMENT:SOURCE_PATH
FULL_LOOKUP_PATH PROJECT_PATH:ENVIRONMENT:LOOKUP_PATH
FULL_REJECT_PATH PROJECT_PATH:ENVIRONMENT:REJECT_PATH
When you put your paths together you need to decide whether to do it once using this hierarchy or do it over and over in the actual path fields in server jobs.
Certus Solutions
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn