/DSgetJobLocks.sh Secret
Created
March 27, 2014 03:30
This script can get the Items,Jobs which is locked in Datastage.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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: DSgetJobLocks.sh # | |
# AUTHOR: Atul Singh # | |
# DATE: Mar 04, 2014 # | |
# # | |
# # | |
# PLATFORM: (AIX, HP-UX, Linux, Solaris & All Nix ) # | |
# # | |
# # | |
# PURPOSE: This script optionally take arguement and provide the ites locked by # | |
# the user, if no arguement is passed if will give the locked item list for all # | |
# # | |
# # | |
# # Usage : | |
# # ./DSgetJobLocks.sh | |
# # ./DSgetJobLocks.sh atul vibha peter mahei | |
############################################################################ | |
usr="$*" | |
user=`echo "$usr" | sed 's/ /|/g'` | |
echo $user | |
DS_HOME=`. /opt/IBM/InformationServer/Server/DSEngine/dsenv` | |
cd $DS_HOME | |
echo "" | |
echo " INODE USER PROCESS LOCKED ITEM" | |
echo " NUMBER NUMBER ID BY LOCKED" | |
echo " -------- ------ ------------ -------- ---------------------------------------------" | |
if [[ -z "$user" ]];then | |
bin/list_readu |grep -v 'Active' |grep -v 'Device' |cut -b11-19,30-38,44-90 |sort -k 4.1b,4r -k 2.1b,2 | |
else | |
bin/list_readu |grep -v 'Active' |grep -v 'Device' |egrep "$user" |cut -b11-19,30-38,44-90 |sort -k 4.1b,4r -k 2.1b,2 | |
fi | |
echo "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment