Releasing File Member Locks With QSH
April 22, 2009 Tom Van Looy
Sometimes our users just keep their sessions open when they go home. At times, such as when we need to install software updates, this is a problem. It is possible to write a CL that cleans up the file/member locks without getting too complicated? You’ll be happy to know it is. Unix to the rescue! All you need is to quickly hack together a small nine-line QSH shell script to do the job. See this example file named unlock that lives in my /home/tvl directory on the IFS: for file in $@; do system "WRKOBJLCK OBJ($file) OBJTYPE(*FILE) MBR(*ALL)" 2>/dev/null | |