HP3000-L Archives

September 2001, Week 4

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:
KARSTEN HOLLAND <[log in to unmask]>
Reply To:
KARSTEN HOLLAND <[log in to unmask]>
Date:
Fri, 28 Sep 2001 10:16:21 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (83 lines)
Hello Colin,

You need to know the O-number of the spoolfile within the job stream,
then you can issue a :spoolf o-number.out.hpspool;print;dev=LJ,4
command in the job stream. Problem is to get the O-number. Here's a
command that gives the spoolfile numbers as variables SPFNUM0001,
SPFNUM0002:

PARM P_FILEDES='@' P_JOBNUM=!HPjobtype!HPjobnum
setvar HOLD_HPCIERR,HPCIERR
COMMENT spfnum -KH 01/10/01
COMMENT get a spoolfile number, load into a variable array.
DELETEVAR SPFNUM@ >$NULL
comment make a workfile to hold list of spoofles.
reset t00tmp01                       >$NULL
purge t00tmp01                       >$NULL
purge t00tmp01,temp                  >$NULL
build t00tmp01;rec=80,,f,ascii;msg;temp
comment send list of spoofles to workfile.
listspf @;seleq=[JOBNUM=!P_JOBNUM                        &
                 AND   FILEDES=!P_FILEDES   ]    >t00tmp01
COMMENT *loop through for O#file names, append out.hpspool
setvar spfnum_count,1
while FINFO("T00TMP01",19)>0 do
 setvar X_spfnum_count,RHT("0000"+"!spfnum_count",4)
 input showout_record<t00tmp01
 IF STR(showout_record,2,1)="O" &
   and STR(showout_record,1,5)<>"TOTAL" then
  setvar spfnum!x_spfnum_count,rtrim(STR(showout_record,2,8)," ")
  echo spfnum!x_spfnum_count = ![spfnum!x_spfnum_count]
  setvar spfnum_count,spfnum_count + 1
 ENDIF
ENDWHILE
COMMENT *END COMMAND SPFNUM


Save this file in your command path with the name SPFNUM. See
<http://members.core.com/~karsten/> for my thoughts on setting the
command path with the HPPATH variable.


Then instead of running the report three times, use the variable
returned by SPFNUM to make copies of the spoofle:


!FILE SA286P;DEV=MISSTD (This being the device class and queue name)
!RUN SA286
!SPFNUM SA286P
!SPOOLF !SPFNUM0001.OUT.HPSPOOL;PRINT;DEV=MISSTD
!SPOOLF !SPFNUM0001.OUT.HPSPOOL;PRINT;DEV=HOSTD
!SPOOLF !SPFNUM0001.OUT.HPSPOOL;PRINT;DEV=OPSTD

Regards,
Karsten Holland
MIS Site Manager
NWS Corp. Chicago
www.nwscorp.com
[log in to unmask]

[log in to unmask] (Colin Berg) wrote in message news:<[log in to unmask]>...
> Hi,
>
> I wish to print reports to multiple printers with only having to run
> the program once. The job to print the report currently looks like
> this :
>
> !FILE SA286P;DEV=MISSTD (This being the device class and queue name)
> !RUN SA286
> !FILE SA286P;DEV=HOSTD
> !RUN SA286
> !FILE SA286P;DEV=OPSTD
> !RUN SA286
>
> Is there anyway I can get around running the program multiple times.
>
> Thanks
> Colin Berg
>
> [log in to unmask]

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

ATOM RSS1 RSS2