#!/usr/bin/perl # Two arguments are passed to this script through the command line. # They are the number of days to go back and the options for the # deljobhst command. For example if you enter a 2 then this will # delete report files with a date that is 2 days less than the current # date. The from date is hard coded. # This script does not do any verification. # *************************************************************************** # This script was created by Jim Young for use with the Lawson system. # Depending on the options passed this script will delete job # history listings, completed history listings and report file listings. # Check the Lawson documentation for the command syntax and options. # *************************************************************************** $myseconds=time + ((@ARGV[0] * 86400) * -1); ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($myseconds); $year=$year+1900; $nyear=substr($year,2,2); # Grab the last two digits of the year $mon=$mon+1; if($mon<10) {$mon="0$mon";} if($mday<10) {$mday="0$mday";} # Format the date in MMDDYY. $mydate="$mon$mday$nyear"; $options=lc(@ARGV[1]); # Change to lower case system("deljobhst -$options -f010107 $mydate");
. cv lawprod perl /usr/local/bin/law_deljobhst 2 cj > /lsf1/hurdata/deljobhst_cj.log
. cv lawprod perl /usr/local/bin/law_deljobhst 14 r > /lsf1/hurdata/deljobhst_r.log
Has anyone experienced deadlock when a job starts to run while 'deljobhst' is executing? Infor's recommendation is to run 'deljobhst' while there are no other jobs running. I'd like to find out if anyone else had the deadlock issue and how you get around it, if we cannot stop other jobs to run. Any feedback would be appreciated. Thanks!