Get list of locked item on DataStage Server with Script

#!/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 #
# 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 ""

--
Thank You.

Regards,
Guru





Popular posts from this blog

Shrink you container size up to 95%.

alma linux: dnf Module yaml error: Unexpected key in data