HP3000-L Archives

August 2002, 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:
"Michael D. Hensley" <[log in to unmask]>
Reply To:
Michael D. Hensley
Date:
Thu, 15 Aug 2002 13:47:08 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (57 lines)
 My version (which is currently implemented as a UDC named PRINTO):

parm po_target_in="!hplastjob"
anyparm print_parms=![""]
if ups("!po_target_in")="HELP" or "!po_target_in"=""
   echo
   echo This command file prints a spoolfile to the terminal.
   echo The spoolfile can be specified either via a "dfid" (#O1234)
   echo or a job number ("#J5678"); if the later, the $STDLIST is
   echo printed.  If no number is specified at all, prints the
   echo $STDLIST of the last job streamed.
   echo
   echo Examples:
   echo    :PRINTO #O1234     (Prints spoolfile #O1234)
   echo    :PRINTO #J5678     (Prints the $STDLIST for job #J5678)
   echo    :PRINTO 1234       (Prints spoolfile #O1234)
   echo    :PRINTO            (Prints $STDLIST of last job streamed)
   echo
   return
endif
comment --- If bare number, default to "#O" (dfid)
setvar po_target rtrim(ups("!po_target_in"))
if pos("#O",po_target)=0 and pos("#J",po_target)=0
   setvar po_target "#O"+po_target
endif
if pos("#J",po_target)<>0
   if finfo("pomsg","exists")
      purge pomsg,temp
   endif
   build pomsg;msg;rec=-80,,f,ascii;disc=100000; temp
   file pomsg,oldtemp
   showout sp;job=!po_target >>*pomsg
   setvar pomsg_rec ""
   setvar po_dfid ""
   while finfo("pomsg","eof")<>0
     input pomsg_rec<*pomsg
     setvar po_fname  word(pomsg_rec,,4)
     if po_fname="$STDLIST"
        setvar po_dfid   word(pomsg_rec,,2)-"#O"
     endif
   endwhile
   purge pomsg,temp
   reset pomsg
   deletevar pomsg_rec
   deletevar po_fname
else
   setvar po_dfid po_target-"#O"
endif
if po_dfid=""
   echo Sorry, can't help you...
else
   PRINT O!'po_dfid'.out.hpspool; !print_parms
endif

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

ATOM RSS1 RSS2