DSGetParamInfo

Use the DSGetParamInfo function to obtain information about a parameter. You can use this information for job control. The DSGetParamInfo function might reference either a controlled job or the current job, depending on the value of the JobHandle variable.

Syntax


Result = DSGetParamInfo (JobHandle, ParamName, InfoType)

JobHandle is the handle for the job as derived from DSAttachJob, or it might be DSJ.ME to refer to the current job.

ParamName is the name of the parameter to be interrogated.

InfoType specifies the information required and might be one of:

DSJ.PARAMDEFAULT

DSJ.PARAMHELPTEXT

DSJ.PARAMPROMPT

DSJ.PARAMTYPE

DSJ.PARAMVALUE

DSJ.PARAMDES.DEFAULT

DSJ.PARAMLISTVALUES

DSJ.PARAMDES.LISTVALUES

DSJ.PARAMPROMPT.AT.RUN

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.PARAMTYPE.STRING

    DSJ.PARAMTYPE.ENCRYPTED

    DSJ.PARAMTYPE.INTEGER

    DSJ.PARAMTYPE.FLOAT (the parameter might contain periods and E)

    DSJ.PARAMTYPE.PATHNAME

    DSJ.PARAMTYPE.LIST (should be a string of Tab-separated strings)

    DSJ.PARAMTYPE.DATE (should be a string in form YYYY-MM-DD)

    DSJ.PARAMTYPE.TIME (should be a string in form HH:MM)

  • 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 - might differ 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 - might differ 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 to be prompted for when the job is run; anything else means it is not (DSJ.PARAMDEFAULT String to be used directly).

Result might also return error conditions as follows:

  • DSJE.BADHANDLE JobHandle was invalid.
  • DSJE.BADPARAM ParamName is not a parameter name in the job.
  • DSJE.BADTYPE InfoType was unrecognized.

Remarks

When referring to a controlled job, DSGetParamInfo can be used either before or after a DSRunJob has been issued. Any status returned following a successful call to DSRunJob is guaranteed to relate to that run of the job.

Example

The following command requests the default value of the quarter parameter for the qsales job:


Qs_quarter = DSGetparamInfo(qsales_handle, "quarter",
→ DSJ.PARAMDEFAULT)