finding the parameter type of a parameter

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
parvathi
Participant
Posts: 103
Joined: Wed Jul 05, 2006 4:48 am
Contact:

finding the parameter type of a parameter

Post 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)
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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)
parvathi
Participant
Posts: 103
Joined: Wed Jul 05, 2006 4:48 am
Contact:

Post 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.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
parvathi
Participant
Posts: 103
Joined: Wed Jul 05, 2006 4:48 am
Contact:

Post by parvathi »

thanks. I got it
Post Reply