Cant find anywhere else to ask for help. Hope someone can enlighten.
We have a datastage sequence which we want to execute via shell script. The first job activity in that sequence is an FTP object writing to a sequential file.
On datastage, that job is working fine, however, on the script, it is being aborted with the following errors:
Host key verification failed.
Connection closed
Server Name: Error occurred during initializeFromArgs().
Creation of a step finished with status = FAILED.
Below is the script. Hope you can help guys.
Code: Select all
# Initialize enviromental parameters to use Datastage commands.
cd /opk/IBM/InformationServer/Server/DSEngine
. ./dsenv > /dev/null 2>&1
#"Project Name"
v_ambiente=DESA_HUB_NAL
# Define a path where will be the log of each run
v_pathLogs=/interfaces/hub/temp/archivos
VpathRuta=/interfaces/hub/temp/archivos
# Name of the jobs that will be executed
v_strJob1=SEQ_HUB_CRM_AUTORIZACIONES
#The path defined process monitoring
PT_PATH='\Jobs\DMR\CALIDAD_DE_DATOS\AUTORIZACIONES\SEQ_HUB_CRM_AUTORIZACIONES'
#The file names are defined
PT_NAME_WARNINGS=LISTA_JOB_WARNING.CSV
PT_NAME_FAILED=LISTA_JOB_ABORT.CSV
PT_NAME_NO_COMPILED=LISTA_JOB_NO_COMPILADOS.CSV
# Creates log files that will contain the information of the execution
v_LOG=$v_pathLogs/LOG_HUB_DMR_CRM_AUTORIZACIONES.txt
#Identify the status of the 1st Datastage
v_msgJob1status=`dsjob -jobinfo $v_ambiente $v_strJob1 | grep "Job Status" | sed "s/.*(//" | sed "s/.$//"`
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Job1=SEQ_HUB_CRM_AUTORIZACIONES
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#Check status, if the last State was failed or stopped then reset the Job1
if [ "$v_msgJob1status" != "1" ] || [ "$v_msgJob1status" != "2" ]; then
echo " ... Resetting JOB: "$v_strJob1
dsjob -run -mode RESET $v_ambiente $v_strJob1
fi
# Estimated date with hours and seconds to display the start time of execution
echo "Job running: "$v_strJob1
# Executes the sequence SEQ_HUB_SFTP_ADDRESS_CRM_FN
dsjob -run -jobstatus $v_ambiente $v_strJob1 1>$v_pathLogs/DatastageError 2>$v_pathLogs/DatastageAix
OUT=$?
if [ $OUT = "1" ]; then
Vmens="El proceso finalizo correctamente."
Vest="OK"
VfechaFin=`date +"%d%m%Y-%H:%M:%S"`
OUT = 0
elif [ $OUT = "2" ]; then
Vmens="El proceso finalizo correctamente, pero existen warning por revisar. "
Vest="WARNINGS"
VfechaFin=`date +"%d%m%Y-%H:%M:%S"`
OUT=0
# It invokes the Shell to monitor the execution of this process #
sh $VpathRuta/SEQ_PPAL_MONITOREO.sh $PT_PATH $PT_NAME_WARNINGS $PT_NAME_FAILED $PT_NAME_NO_COMPILED
else
Vmens="El proceso finalizo con errores."
Vest="FAILED"
VfechaFin=`date +"%d%m%Y-%H:%M:%S"`
OUT=3
# It invokes the Shell to monitor the execution of this process #
sh $VpathRuta/SEQ_PPAL_MONITOREO.sh $PT_PATH $PT_NAME_WARNINGS $PT_NAME_FAILED $PT_NAME_NO_COMPILED
fi
### Fields to display in the log
## "JOB NAME | DATE AND START TIME | DATE AND TIME OF END | STATUS AFTER | DESCRIPTION"
echo v_strJob1"|"v_fechaIni"|"v_fechaFin"|"$Vest"|"$Vmens>> $v_LOG
########################################END OF SCRIPT###############################################################################################