IBM InfoSphere, check for specific variable in a job

Good evening, I need your help please:

I was asked to print out which datastage jobs have a datasource called SCL_REPCOL

For each Job get the list of parameters by using dsjob command:

while read line
do
 echo Job "$line" has these params:
 dsjob -lparams ProduccionDSO "$line"
done < list_datastage_jobs.txt

Output:

Job prl_pasa_oferta_ant has these params:
Param_Teradata
Param_Teradata.$TD_Dflt_Server
Param_Teradata.$TD_Dflt_User
Param_Teradata.$TD_Dflt_Pwd
Param_Teradata.$TD_ML_ErrorLimit
Param_Teradata.$TD_ML_CheckPoint
Param_Teradata.$TD_ML_Tenacity
Param_Teradata.$TD_ML_Sleep
Param_Teradata.$TD_ML_Session_Min
Param_Teradata.$TD_ML_Session_Max
Param_Teradata.$TD_Dflt_Dsn
Param_Teradata.$TD_TP_CheckPoint
Param_Teradata.$TD_SyncTimeOut
Param_Teradata.$TD_ML_Session_Max_LowVol
Param_Teradata.$TD_RequestedSessions
Param_Teradata.$TD_SessionsXplayer
Param_Teradata.$TD_FL_Sleep
Param_Teradata.$TD_FL_Tenacity
Param_Teradata.$TD_FL_Session_Min
Param_Teradata.$TD_FL_Session_Max
Param_Teradata.$TD_FL_CheckPoint
Param_Teradata.$TD_FL_ErrorLimit
Param_Teradata.$TD_TP_Session_Max
Param_Teradata.$TD_TP_Session_Min
$pathWork
$orclPrclUser
$orclPrclPswd
$orclPrclSID
$pathDaSe
$APT_CONFIG_FILE

Status code = 0
Job prl_reporte_prop has these params:
Param_Teradata
Param_Teradata.$TD_Dflt_Server
Param_Teradata.$TD_Dflt_User
Param_Teradata.$TD_Dflt_Pwd
Param_Teradata.$TD_ML_ErrorLimit
Param_Teradata.$TD_ML_CheckPoint
Param_Teradata.$TD_ML_Tenacity
Param_Teradata.$TD_ML_Sleep
Param_Teradata.$TD_ML_Session_Min
Param_Teradata.$TD_ML_Session_Max
Param_Teradata.$TD_Dflt_Dsn
Param_Teradata.$TD_TP_CheckPoint
Param_Teradata.$TD_SyncTimeOut
Param_Teradata.$TD_ML_Session_Max_LowVol
Param_Teradata.$TD_RequestedSessions
Param_Teradata.$TD_SessionsXplayer
Param_Teradata.$TD_FL_Sleep
Param_Teradata.$TD_FL_Tenacity
Param_Teradata.$TD_FL_Session_Min
Param_Teradata.$TD_FL_Session_Max
Param_Teradata.$TD_FL_CheckPoint
Param_Teradata.$TD_FL_ErrorLimit
Param_Teradata.$TD_TP_Session_Max
Param_Teradata.$TD_TP_Session_Min
$pathWork
$orclPrclUser
$orclPrclPswd
$orclPrclSID
$pathDaSe
$APT_CONFIG_FILE
vRutaSalida
vArchivoOA
vArchivoCC
vPeriodo
vFecha

Status code = 0
Job prl_Ingl_06_Actuaciones_1 has these params:
$orclPpgaSID
$orclPpgaUser
$orclPpgaPswd
$orclPrclSID
$orclPrclUser
$orclPrclPswd
$pathSeFi
$pathDaSe
$APT_CONFIG_FILE
vFechaIni
vFechaFin

Status code = 0
Job prl_Ingl_06_prepagoDpi_1 has these params:
$pathWork
$orclPrclUser
$orclPrclPswd
$orclPrclSID
vRutaCarga
vArchivoCarga
$pathDaSe
$APT_CONFIG_FILE

Status code = 0
Job prl_Ingl_06_prepagoDpi_2_2 has these params:
$pathWork
$orclPrclUser
$orclPrclPswd
$orclPrclSID
$pathDaSe
$APT_CONFIG_FILE

Status code = 0
Job prl_Ingl_06_prepagoDpi_2_2_ODS has these params:
$orclPrclSID
$orclPrclUser
$orclPrclPswd
$pathSeFi
$pathDaSe
$APT_CONFIG_FILE
$vPasswdODSds
$vServerODSds
$vUserODSds

Status code = 0
Job prl_Ingl_06_prepagoDpi_3 has these params:
$pathWork
vNom_archivo
vNom_archivoResumen
vFechaFinal
$orclPrclUser
$orclPrclPswd
$orclPrclSID
vRutaSalida
$pathDaSe
$APT_CONFIG_FILE

Status code = 0
Job prl_Ingl_06_prepago_1 has these params:
$pathWork
$orclPrclUser
$orclPrclPswd
$orclPrclSID
vRutaCarga
vArchivoCarga
$pathDaSe
$APT_CONFIG_FILE

Status code = 0
Job prl_Ingl_06_prepago_2_2 has these params:
$pathWork
$orclPrclUser
$orclPrclPswd
$orclPrclSID
$pathDaSe
$APT_CONFIG_FILE

Status code = 0
Job prl_Ingl_06_Prepago_2_2_Ods has these params:
$orclPrclSID
$orclPrclUser
$orclPrclPswd
$pathSeFi
$pathDaSe
$APT_CONFIG_FILE
$vPasswdODSds
$vServerODSds
$vUserODSds

Status code = 0
lbogvmapp161$

But i dont know how to Check whether specific variable is present or not in a job, for instance the var orclPrclSID=SCL_REPCOL

 dsjob -paraminfo ProduccionDSO prl_Ingl_06_prepago_2_2 orclPrclSID = 'SCL_REPCOL'

Output yields an error:

Invalid arguments: dsjob -paraminfo [-useid] <project> <job|jobid> <param>

Status code = -9999 DSJE_DSJOB_ERROR

I appreciate your help in advanced:

I know nothing about dsjob application, but according to this usage information:

dsjob -paraminfo [-useid] <project> <job|jobid> <param>

if your <project> is ProduccionDSO, and your <job> is prl_Ingl_06_prepago_2_2, then I assume that <param> should be provided simply as orclPrclSID, like this:

dsjob -paraminfo ProduccionDSO prl_Ingl_06_prepago_2_2 orclPrclSID

and I expect in return you should get some information (e.g. whether the parameter is present or not, and if it is present, then what value it stores).

Good afternood, thanks you very much for yor time and support:

Unfortunately your propsal did not work:

dsjob -paraminfo ProduccionDSO prl_Ingl_06_prepago_2_2 orclPrclSID

Output:

Error -3 getting info for parameter
Status code = -3 DSJE_BADPARAM

But as i told you these are the parameters defined by the job:

lbogvmapp161$ dsjob -lparams ProduccionDSO prl_Ingl_06_prepago_2_2 
$pathWork
$orclPrclUser
$orclPrclPswd
$orclPrclSID
$pathDaSe
$APT_CONFIG_FILE

Status code = 0 
lbogvmapp161$

And searching in jobs log contains the values:

$orclPrclUser=XYZ
$orclPrclSID=SCL_REPCOL
$pathDaSe=/Projects/cluster/ProduccionDSO/DataSets/

but just i want to fetch/extract jobs whose parameter named orclPrclSID has the value SCL_REPCOL. and there are 5000 datastaje jobs to lokk for

I tried this line but it didnt nor work either:

dsjob  -param orclPrclSID='SCL_REPCOL' ProduccionDSO prl_Ingl_06_prepago_2_2
Invalid/unknown primary command switch.
Command Syntax:
        dsjob [-authfile <authfile> | -file <file> <domain> <DataStage server> |  [-domain <domain> | -url <url>] -user <user> -password <password> -server <DataStage server>] | -domain <domain> [-user <user>] -server <DataStage server>
                        <primary command> [<arguments>]

I dont have documentacion about dsjob command or datastage itself
I appreciate your help in adavanced

Did you also try providing single-quoted parameter name, containing the $ character?
Here's the documentation for the newest version of IBM InfoSphere Information Server (11.7)

Thanks you once again for your time and help, and shating documentation, very useful

you were right about single quotes, for instance another var, it works:

dsjob -paraminfo ProduccionDSO prl_Ingl_06_prepago_2_2 '$APT_CONFIG_FILE'
Type            : Pathname (4)
Help Text       : The Parallel job configuration file.
Prompt          : Configuration file
Prompt At Run   : 0
Default Value   : /datastage/IBM/InformationServer/Cluster/IIS/Server/Configurations/datasets.apt
Original Default: /datastage/IBM/InformationServer/Cluster/IIS/Server/Configurations/datasets.apt

Filtering just to fetch the value:

dsjob -paraminfo ProduccionDSO prl_Ingl_06_prepago_2_2 '$APT_CONFIG_FILE' | grep "Default Value"
Default Value   : /datastage/IBM/InformationServer/Cluster/IIS/Server/Configurations/datasets.apt

But regarding to fetch tha value for parameter named orclPrclSID something weird prints out:

dsjob -paraminfo ProduccionDSO prl_Ingl_06_prepagoDpi_2_2_ODS '$orclPrclSID'
Type            : String (0)
Help Text       : None
Prompt          : Orcl Procol SID
Prompt At Run   : 0
Default Value   : $PROJDEF
Original Default: $PROJDEF

in response use this value:

Default Value   : $PROJDEF

dont know where this get this value from?

i also source an env var:

. ./dsenv
server61$

neither in the env i found this var:

env | grep PROJDEF
server61$

I appreciate your help in advanced