HP3000-L Archives

March 2005, Week 2

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:
Greg Stigers <[log in to unmask]>
Reply To:
Greg Stigers <[log in to unmask]>
Date:
Fri, 11 Mar 2005 18:46:14 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (66 lines)
I noticed that some of our jobs issue TELLs and TELLOPs that are identical.
Also, these TELLs tend not to bother with any kind of basic error
prevention.
So, STDLists are cluttered with multiple occurrence of the same message to
different recipients, and various inconsequential errors, such as the target
being another job, or a quiet session, or there being no such session. So,
it occurred to me to try to provide a single command file to manage TELLs to
any combination of the console operator, the account manager, and whoever
actually streamed the job when we don't want to annoy others signed on as
account manager. Here is what I have so far:
ANYPARM _ANYPARM=AOS #!HPJOBTYPE!HPJOBNUM !HPJOBNAME !HPSPOOLID
SETVAR _TEMPSTRING ANYPARM(!_ANYPARM)
SETVAR _LIST WORD('!_TEMPSTRING',,1)
SETVAR _MSG XWORD('!_TEMPSTRING',,1)
IF _MSG = ""
   SETVAR _MSG "!HPJOBNAME #!HPJOBTYPE!HPJOBNUM !HPSPOOLID"
ENDIF
IF POS('A',UPS(_LIST)) > 0
   IF JOBCNT('MGR.!HPACCOUNT') > 1
      TELL MGR.!HPACCOUNT !_MSG
   ENDIF
ENDIF
IF POS('O',UPS(_LIST)) > 0
   TELLOP !_MSG
ENDIF
IF POS('S',UPS(_LIST)) > 0
   IF STR('!HPSTREAMEDBY',![(POS('#','!HPSTREAMEDBY')+1)],1)= 'S'
      IF HPJOBTYPE = 'J'
         TELL ![WORD('!HPSTREAMEDBY',,3)] !_MSG
      ELSE
         ECHO !_MSG
      ENDIF
   ENDIF
ENDIF
IF HPCMDTRACE = FALSE
   DELETEVAR _TEMPSTRING,_LIST,_MSG
ELSE
   SHOWVAR _TEMPSTRING,_LIST,_MSG
ENDIF

I know that I want to add a check before the first TELL for actual users, to
avoid that error. While jobcnt can tell me how many there are, how can I
tell if they will in fact receive such a message? Perhaps those errors are
unavoidable, short of building and parsing my own list of such users.

And one nicety I could not come up with is a way to not bother with the
first word of the parm. I would need to test that first word for any of the
three expected values, but only some combination of those three. And a
simple test for their existence when optional might fail on a first word
containing anyone of those three letters. If I could sum up the number of
times each letter occurs once, and compare that to the length, that should
work (assuming messages do not begin with As, OS, So or SOA). But I don't
see a simple way to get the number of times each letter occurs once. I could
set a variable to the first word, test it for the existence of each letter,
and when found, substitute some token for each letter, then test for a
string of just those tokens. That seems awfully involved. But maybe parm
processing has to be.

Suggestions for improvements welcome. Once again, I suspect I am working on
a problem that others have already solved.

Greg Stigers

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

ATOM RSS1 RSS2