Page 1 of 1

finding the parameter type of a parameter

Posted: Mon Feb 19, 2007 3:37 am
by parvathi
Hi all,
I am trying to get the information of a job in aftersub routine.

the parameters are passed during runtime.
Now i want to find out the type of the parameter and then do some coding on the value i get.
This is the code that i have used

v_jobHandle = DSJ.ME
v_paramtype = DSGetParamInfo(v_jobHandle, v_paramName, DSJ.PARAMTYPE)

now
here what i want to to do is if the paramtype is integer then paramvalue
v_paramvalue = '123456'
how can i check with datastage code

else
v_paramtype = DSGetParamInfo(v_jobHandle, v_paramName, DSJ.PARAMVALUE)

Posted: Mon Feb 19, 2007 3:41 am
by ArndW
I'm not quite sure what your question is. The code snippets don't look incorrect (if you assign the appropriate parameter name to the v_paramName variable)

Posted: Mon Feb 19, 2007 4:03 am
by parvathi
ArndW wrote:I'm not quite sure what your question is. The code snippets don't look incorrect (if you assign the appropriate parameter name to the v_paramName variable) ...
based on the paramtype that i get i want to change the values

the output that i get out of this line is

v_paramtype = DSGetParamInfo(v_jobHandle, v_paramName, DSJ.PARAMTYPE)

either 1 or,2,

can i assume that if it is one that paramter type is integer,or 2 means it is an encrypted type.

Posted: Mon Feb 19, 2007 4:11 am
by ArndW
Although you can use integer values for the return value, you should always use the supplied constants as found in the documentation for the DSGetParamInfo() function, so code

Code: Select all

   IF (v_paramType = DSJ.PARAMTYPE.INTEGER) THEN ...
Note, you cannot change the value of a job's parameter after it has been callied, i.e. from inside the job itself.

Posted: Mon Feb 19, 2007 4:22 am
by parvathi
thanks. I got it