Getting a list of parameters

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
onkie
Participant
Posts: 13
Joined: Thu Jul 10, 2003 2:27 am

Getting a list of parameters

Post by onkie »

Hi all,

I wondered if it's possible, given a jobname, to get the list of parameters it expects. I found nothing to do so when searching the forums or the basic.pdf file.

Thanks an regards,
Aart Onkenhout
DLM
The Netherlands
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

dsjob -lparams <projname> <jobname>

You can find dsjob in the bin dir of your DSEngine.
onkie
Participant
Posts: 13
Joined: Thu Jul 10, 2003 2:27 am

Post by onkie »

Hi,

Thanks for your quick reply. While searching for some help on DSjob I came across "varList = DSGetJobInfo( hJob1, DSJ.PARAMLIST )" (within basic.pdf, so didn't look or search to well). This gives me exactly what I've been looking for.

Thanks again and regards,
Aart
talk2shaanc
Charter Member
Charter Member
Posts: 199
Joined: Tue Jan 18, 2005 2:50 am
Location: India

Post by talk2shaanc »

Result = DSGetJobInfo (JobHandle,DSJ.PARAMLIST)--returns a comma-separated list of parameter names.

Result = DSGetParamInfo(JobHandle, ParamName,InfoType)

InfoType Specifies the information required and may be one of:

Result depends on the specified InfoType, as follows:

DSJ.PARAMDEFAULT String - Current default value for the parameter in question. See also DSJ.PARAMDES.DEFAULT.

DSJ.PARAMHELPTEXT String - Help text (if any) for the parameter in question.

DSJ.PARAMPROMPT String - Prompt (if any) for the parameter in question.

DSJ.PARAMTYPE Integer - Describes the type of validation test that should be performed on any value being set for this parameter. Is one of:

DSJ.PARAMVALUE String - Current value of the parameter for the running job or the last job run if the job is finished.

DSJ.PARAMDES.DEFAULT String - Original default value of the parameter - may be different from DSJ.PARAMDEFAULT if the latter has been changed by an administrator since the job was installed.

DSJ.PARAMLISTVALUES String - TAB-separated list of allowed values for the parameter. See also DSJ.PARAMDES.LISTVALUES.

DSJ.PARAMDES.LISTVALUES String - Original TAB-separated list of allowed values for the parameter - may be different from DSJ.PARAMLISTVALUES if the latter has been changed by an administrator since the job was installed.

DSJ.PROMPT.AT.RUN String - "1" means the parameter is supposed to be prompted for when the job is run; anything else means it is not (DSJ.PARAMDEFAULT string to be used directly).


For current job use JobHandle=DSJ.ME and if you want to know parametr list of some other job, You need get handle on that job using "DSAttachJob".
onkie
Participant
Posts: 13
Joined: Thu Jul 10, 2003 2:27 am

Post by onkie »

Thanks for your reply. I just discovered.

Regards,
Aart
Post Reply