HP3000-L Archives

June 2015, 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:
Barry Lake <[log in to unmask]>
Reply To:
Barry Lake <[log in to unmask]>
Date:
Thu, 11 Jun 2015 12:08:19 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (81 lines)
On 6/11/15 6:56 AM, Johnson, Tracy wrote:
> I noticed there is no easy way in MPEX to return the value of LDEV if it is a spooled and active printer
...


Not anywhere near a complete solution, but a suggestion for an avenue of 
exploration:



: run sh.hpbin.sys

$ callci showdev | grep SPOOLED
     6      SPOOLED      DOWN
    17     SPOOLED       SPOOLER OUT
    18     SPOOLED       SPOOLER OUT
$
$ callci showdev | grep SPOOLED | awk '{print $1}'
6
17
18
$
$ MY_LDEV_LIST=$(callci showdev | grep SPOOLED | awk '{print $1}')
$ echo $MY_LDEV_LIST
6 17 18
$
$ for LDEV in $MY_LDEV_LIST ; do
>   echo do something with LDEV $LDEV
> done
do something with LDEV 6
do something with LDEV 17
do something with LDEV 18
$



Regards,

Barry Lake
Allegro Consultants, Inc.






On 6/11/15 6:56 AM, Johnson, Tracy wrote:
> I noticed there is no easy way in MPEX to return the value of LDEV if it is a spooled and active printer.  Returning an active spool file is easy but the returning the LDEV is not.
>
> In other words there is no such thing:
>
> IF LDEV = SPOOLED true AND SPOOLER(LDEV)=ACTIVE
>    ECHO ***** DO SOMETHING TO LDEV HERE *****
> ENDIF
>
> The following method is slow and tedius because we have 15000 spool files.  It takes 6 seconds to pass through each ldev and check 15000 spoolfles before it goes to the next LDEV.
>
> We have 1200 ldevs, 50 are disc, 350 are sessions, 800 printers, The below would must also check nonexistent LDEVs to the upper limit of LDEV numbering,   At 6 seconds per LDEV, the below test would take seven and a half hours:
>
> REPEAT
> CONTINUE
> SHOWOUT @[log in to unmask]@(SPOOL.DEVICE="!i" AND SPOOL.ISACTIVE=TRUE)
> IF MPEXNUMSUCCEEDED>  0 THEN
>    ECHO ***** DO SOMETHING TO LDEV HERE *****
> ENDIF
> FORNUM I=100,4679
>
> Of course, YES I could use a traditional method like performing a SHODEV PRINTER (becasue I assigned that class), and reading the $STDLIST into a file and cropping out the spaces to pic up each LDEV number.  Then execute a script on each line of the edited file.
>
> However my mind was thinking in a serial mode this morning.  Or it could be it is just too early.
>
> Tracy Johnson
> 00 1 757 766 4318 tel
> 00 1 757 755-6470 mobile
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

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

ATOM RSS1 RSS2