Passing parameter values dynamically
Moderators: chulett, rschirm, roy
Passing parameter values dynamically
Hi Guys
Can anyone help me how can I pass values from a file into parameters randomly.
Thaiks in advance
Mohan
Can anyone help me how can I pass values from a file into parameters randomly.
Thaiks in advance
Mohan
-
- Participant
- Posts: 437
- Joined: Fri Oct 15, 2004 6:13 am
- Location: Pune, India
Hi thurmy
My seq file should read data from files based on the file names kept in another file. I mean how can I pass values from this file into parameters.
Please explain in detail
Thanks in advance
Mohan
My job is like this Seq---->Transformer----->Ocithurmy34 wrote:Hi,
I don't understand the randomly thing.
For the rest you can read your file,seek for your parameter and use the DSSetParam function.
My seq file should read data from files based on the file names kept in another file. I mean how can I pass values from this file into parameters.
Please explain in detail
Thanks in advance
Mohan
Create a Routine which will read the parameter from the file.
Call this routine in a Sequence Job,
Call your Server Job from this Sequence job with a parameter having the value as the return value from the routine activity.
Use this parameter in the server job as the name of the sequential file.
Call this routine in a Sequence Job,
Call your Server Job from this Sequence job with a parameter having the value as the return value from the routine activity.
Use this parameter in the server job as the name of the sequential file.
Success consists of getting up just one more time than you fall.
If the process is to be done for more than one file.
Then include the activity of calling the routine and server job in between loop activity.
But with that you would need to tweak the routine code a bit.
Or you could read all the file names once and concate them with spaces and in server use them with the cat command.
Then include the activity of calling the routine and server job in between loop activity.
But with that you would need to tweak the routine code a bit.
Or you could read all the file names once and concate them with spaces and in server use them with the cat command.
Success consists of getting up just one more time than you fall.
Hi,
Here is my own "seek a parameter" routine.
Arg1 is the name of the parameter we want.
We call it in a job control for each parameter of the job we will launch then we use DSSetParam.
Here is my own "seek a parameter" routine.
Arg1 is the name of the parameter we want.
Code: Select all
* Open The File
OpenSeq ParamFile to paramtemp Else Ans = "Not Found ":ParamFile
* Read the File
loop
while ReadSeq param from paramtemp
varParameter = upcase(field(param,'=',1))
varName = upcase(Arg1)
begin case
Case varParameter = varName
Ans = field(param,'=',2)
EXIT
Case varParameter <> varNom
Ans = ' NOT FOUND
End Case
repeat
CloseSeq paramtemp
Hope This Helps
Regards
Regards
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Use a job sequence with a Start Loop and End Loop activity. Set up your loop as a "list of things" loop generated by listing the file of file names. Invoke the job within the loop.
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.