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: