How can I put arguments in a dynamic array?
Moderators: chulett, rschirm, roy
OK, let's say your arg list was passed in as a pipe delimited string rather than individual values:
The syntax for all available functions are in the online help.
Code: Select all
for i=1 to NbArgument
ParamValues<i> = Field(ArgString,"|",i,1)
Next i
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Thank you for your time and your answers, i realy apriciate it... But
When i do :
I get in PARAMS(1) the value of the parameter Arg1. (wich i want)
But if i Do
I get in PARAMS(1) the string "Arg1"... (wich i don't want)
Is there a possibility to get the value of my paramter by browsing a list??
thanks
When i do :
Code: Select all
PARAMS(1) = arg1
But if i Do
Code: Select all
ArgString = DSGetJobInfo(DSJ.ME, DSJ.PARAMLIST)
for i=1 To NbArgument ;
PARAMS(i) = Field(ArgString,",",i,1)
Next i
Is there a possibility to get the value of my paramter by browsing a list??
thanks
![Confused :?](./images/smilies/icon_confused.gif)
Since your post is now marked as "Resolved" can you please post the resolution?
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Then why is it marked as resolved?
So, are you not passing these values to the routine? Instead, you want to lookup the job parameter values from the job that is calling the routine? That's quite different than what you originally posted.![Confused :?](./images/smilies/icon_confused.gif)
So, are you not passing these values to the routine? Instead, you want to lookup the job parameter values from the job that is calling the routine? That's quite different than what you originally posted.
![Confused :?](./images/smilies/icon_confused.gif)
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
OK - first I'll assume you are really using DYNAMIC arrays as suggested before and your code looks like the following. I am usiing [] square brackets because the less than sign and greater than sign don't post
PARAMS = '' ; * this initializes the array variable
ArgString = DSGetJobInfo(DSJ.ME, DSJ.PARAMLIST)
for i=1 To NbArgument ;
PARAMS = Field(ArgString,",",i,1))
Next i
Don't use the DIM function - read about Dynamic arrays
Next you need to get the value for each variable - see DSGetParamInfo in the manual
PARAMVALUES = '' ; * this initializes the array variable
for i=1 To NbArgument ;
PARAMVALUES = DSGetParamInfo(DSJ.ME,PARAMS ,DSJ.PARAMVALUE)
Next i
PARAMS = '' ; * this initializes the array variable
ArgString = DSGetJobInfo(DSJ.ME, DSJ.PARAMLIST)
for i=1 To NbArgument ;
PARAMS = Field(ArgString,",",i,1))
Next i
Don't use the DIM function - read about Dynamic arrays
Next you need to get the value for each variable - see DSGetParamInfo in the manual
PARAMVALUES = '' ; * this initializes the array variable
for i=1 To NbArgument ;
PARAMVALUES = DSGetParamInfo(DSJ.ME,PARAMS ,DSJ.PARAMVALUE)
Next i
Michael Favero
2852 Humboldt Ave So
Minneapolis, MN 55408
2852 Humboldt Ave So
Minneapolis, MN 55408
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
They do (post correctly) if you wrap them in Code tags!
Code: Select all
PARAMS = '' ; * this initializes the array variable
ArgString = DSGetJobInfo(DSJ.ME, DSJ.PARAMLIST)
for i=1 To NbArgument ;
PARAMS<i> = Field(ArgString,",",i,1))
Next i
Don't use the DIM function - read about Dynamic arrays
Next you need to get the value for each variable - see DSGetParamInfo in the manual
PARAMVALUES = '' ; * this initializes the array variable
for i=1 To NbArgument ;
PARAMVALUES<i> = DSGetParamInfo(DSJ.ME,PARAMS<i> ,DSJ.PARAMVALUE)
Next i
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.