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 $userDS_HOME=`. /opt/IBM/InformationServer/Server/DSEngine/dsenv`cd $DS_HOMEecho ""echo " INODE USER PROCESS LOCKED ITEM"echo " NUMBER NUMBER ID BY LOCKED"echo " -------- ------ ------------ -------- ---------------------------------------------"if [[ -z "$user" ]];thenbin/list_readu |grep -v 'Active' |grep -v 'Device' |cut -b11-19,30-38,44-90 |sort -k 4.1b,4r -k 2.1b,2elsebin/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,2fiecho ""
--
Thank You.
Regards,
Guru