passing parameters
Moderators: chulett, rschirm, roy
-
MerinaPremaj
- Participant
- Posts: 4
- Joined: Thu Oct 20, 2011 4:33 am
passing parameters
how to get parameters from a sequential file and pass those values as parameters to a job?
Welcome.
What exactly is in the ssequential file? Name/value pairs, I assume? Regardless, what you'll basically need is something to read the file and then assign those values to the parameters either before you run the job or as you launch it. The former approach would all be handled via the API in "job control" code that you write using functions like DSAttachJob, DSSetParam and DSRunJob.
The latter approach would be something you script, where the values are read from the file and a "parameter string" built for all of the pairs. Meaning, a series of "-param XXXX=YYYY" statements that you then pass along with all of the other required parameters to the dsjob command when you launch the job from the command line.
Now, all of this can be automated (to a large degree) by leveraging "value files" for your parameters via a Parameter Set. The Designer Client Guide pdf has all the details on that approach.
What exactly is in the ssequential file? Name/value pairs, I assume? Regardless, what you'll basically need is something to read the file and then assign those values to the parameters either before you run the job or as you launch it. The former approach would all be handled via the API in "job control" code that you write using functions like DSAttachJob, DSSetParam and DSRunJob.
The latter approach would be something you script, where the values are read from the file and a "parameter string" built for all of the pairs. Meaning, a series of "-param XXXX=YYYY" statements that you then pass along with all of the other required parameters to the dsjob command when you launch the job from the command line.
Now, all of this can be automated (to a large degree) by leveraging "value files" for your parameters via a Parameter Set. The Designer Client Guide pdf has all the details on that approach.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
MerinaPremaj
- Participant
- Posts: 4
- Joined: Thu Oct 20, 2011 4:33 am
-
ray.wurlod
- Participant
- Posts: 54595
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Create a Parameter Set (separate from the job).
In the Parametet Set create the three parameter names, just as you would in a job.
Create two "values files". Put the values into these values files (easiest for you is manually in the Parameter Set dialog).
Add the Parameter Set to your job.
Anything else involves tedious programming that is no longer necessary.
If you're invoking the job from the dsjob command line interface in version 8.7 there is a parameter file option, but the structure of the file is different from the one you have.
In the Parametet Set create the three parameter names, just as you would in a job.
Create two "values files". Put the values into these values files (easiest for you is manually in the Parameter Set dialog).
Add the Parameter Set to your job.
Anything else involves tedious programming that is no longer necessary.
If you're invoking the job from the dsjob command line interface in version 8.7 there is a parameter file option, but the structure of the file is different from the one you have.
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.
-
MerinaPremaj
- Participant
- Posts: 4
- Joined: Thu Oct 20, 2011 4:33 am
