HP3000-L Archives

March 2000, 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:
Paul H Christidis <[log in to unmask]>
Reply To:
Paul H Christidis <[log in to unmask]>
Date:
Mon, 13 Mar 2000 10:30:43 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (82 lines)
The following command file will return the fully qualified file name of the
spoolfile.  Perhaps it is what you're looking for.  Just 'cut and paste' it into
your favorite editor, keep it under a name of your choise and invoke it (by
typing its name) for usage information.

Regards
Paul Christidis

--------------------Start Cut *+1
parm banner_name="?" filename="_spool_fname"
parm job_number="#!hpjobtype!hpjobnum"
if (setvar( _spf_banner,UPS("!banner_name")) = "?") then
 echo
 echo Usage: ![finfo(hpfile,"fname")]  Banner_name [_Spool_fname] &
              [Job_number]
 echo
 echo  Banner_name - File designator name for the desired spool file.
 echo       In the file equation "File x=report01;dev=lp;cctl"
 echo       "report01" is the banner or 'filedes' name.  If multiple
 echo       reports with the same banner name exist then this command
 echo       file will ONLY return the first one.
 echo
 echo  _Spool_name - Optional CI variable name that will hold the fully
 echo       qualified name of the spool file.  If one is NOT specified
 echo       the default CI variable of '_Spool_fname' will be used.
 echo
 echo  Job_Number  - Optional parameter indicating the job/session no.
 echo       that created the indicated spool file.
 echo       The default is the 'current' job/session number.
 echo
 echo   NOTE:  Steps MUST be taken, outside this command file, to remove
 echo    the spool file if duplicate banner names are possible.  If an
 echo    error occurs the spoolfile name is set to: "$NULL.OUT.HPSPOOL".
 echo
 deletevar _spf_banner
 return
endif
setvar _spf_currjob "#" + "![UPS("!Job_Number") - "#"]"
setvar hpcierr 0
listspf o@;seleq=[jobnum=!_spf_currjob and filedes=!_spf_banner] >$newpass
if hpcierr <> 0 then
   setvar _spf_spid_text "$NULL     "
else
   print $oldpass;start=4;end=4;out=$newpass
   input _spf_spid_text < $oldpass
endif
setvar !filename RTRIM(LTRIM(LFT(_spf_spid_text,10) - "#"))+".OUT.HPSPOOL"
echo The spoolfile for report "!_spf_banner" is: [![!filename]]
deletevar _spf_@
--------------------------------------End Cut *-1



Why not add the command showvar just before eoj.  This should tell you if a
variable has been set by a program or other process.  If that
doesn't work you could add !showvar [log in to unmask]
Be advised this is a long list of variables.



k jones wrote:

> within a job, is there a variable or command to get
> the spoolfile number of a report I created in this
> same job?
>
> like the last spoolfile id or something?
>
> tia
> __________________________________________________
> Do You Yahoo!?
> Talk to your friends online with Yahoo! Messenger.
> http://im.yahoo.com

--
Larry Barnes
Director of MIS
Mitek Corp.
4545 E. Baseline Rd.
Phoenix, AZ 85040
[log in to unmask]

ATOM RSS1 RSS2