Skip to content

Instantly share code, notes, and snippets.

@atulsingh0
Created February 25, 2014 18:35
Know your DataStage Jobs Status without Director
#!/usr/bin/ksh # Declares a Korn shell ###############################
# #
##!/usr/bin/sh # Declares a Bourne shell #
##!/usr/bin/bash # Declares a Bourne-Again shell #
##!/usr/bin/csh # Declares a C shell #
##!/usr/bin/tsh # Declares a T shell #
# #
# #
# SCRIPT: dsjobStatus.sh #
# AUTHOR: Atul Singh #
# DATE: Jan 04, 2013 #
# #
# #
# PLATFORM: (AIX, HP-UX, Linux, Solaris & All Nix ) #
# #
# #
# PURPOSE: This script take the 2 input as argument and fetch the #
# datastage job status and last Start & End time of the job #
# #
# #
############################################################################
. /opt/IBM/InformationServer/Server/DSEngine/dsenv > /dev/null 2>&1
if [[ $# -eq 2 ]]; then
PROJECT="$1";
JOB="$2";
out=`dsjob -jobinfo $PROJECT $JOB | egrep 'Job Status|Job Start Time|Last Run Time'`
echo "$PROJECT\t$JOB\t$out";
else
echo "Please execute the script like : $0 PROJECT_NAME JOB_NAME";
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment