HP3000-L Archives

September 2001, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Carl McNamee <[log in to unmask]>
Reply To:
Carl McNamee <[log in to unmask]>
Date:
Fri, 21 Sep 2001 13:01:17 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (38 lines)
I have a shell script which works wonderfully at the command line but
doesn't work correct in a batch job.

if [ -f /SYS/OPERATOR/joblist.txt ] ; then
  rm /SYS/OPERATOR/joblist.txt
fi

callci "SHOWJOB JOB=@J > /SYS/OPERATOR/joblist.txt"
callci "SAVE /SYS/OPERATOR/joblist.txt"
grep "$1" /SYS/OPERATOR/joblist.txt
export grep_status=$?
rm /SYS/OPERATOR/joblist.txt
if [ $grep_status = 0 ] ; then
  callci "SETVAR JOB_EXISTS 'y'"
  echo Job running.
else
  callci "SETVAR JOB_EXISTS 'n'"
  echo Job not running.
fi

When run from the command line the command (callci "SHOJOB JOB=@J >
/SYS/OPERATOR/joblist.txt") pipes the output of showjob to the temporary
file.  However when run in batch the showjob output is sent to $STDLIST
instead of the temporary file.  I execute the script by typing "SH -c
/SYS/OPERATOR/JOBCHK parm1"  where parm1 one is the jobname that I want to
look for.  I also tried "RUN SH.HPBIN.SYS;INFO="/SYS/OPERATOR/JOBCHK parm1"
with the same results.

Thoughts?  Comments?  Criticism?

Carl McNamee
Systems Administrator
Billing Concepts
(210) 949-7282

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2