Try the following command file:
parm dfid, dev=lp, pri=1, env=tt99.pub.sys
file f!dfid;dev=!dev,!pri;cctl;env=!env
setvar hpmsgfence 2
purge tempcmd,temp
setvar hpmsgfence 0
echo copy !dfid;all,*f!dfid >tempcmd
echo exit >>tempcmd
run spooknm.pub.sys;stdin=tempcmd
reset f!dfid
purge tempcmd,temp
I can't remember exactly where I picked it up from - but it was a gem I've
kept in my toolkit.
If you have MPEX, you can easily apply this to a <fileset>.
>Hi Folks,
>For years we have done all our printing using an HP line printer. Happily,
>we just recently configured (thanks for the help, Wirt) and installed a new
>HP LaserJet. To properly format reports for printing on the LaserJet, I am
>aware of, and somewhat familiar with the use of environment files. I have
>already created several to suit my needs using the TTUTIL program. It is my
>(perhaps incorrect) understanding that a report must refer to an
>environment file via a file equation *before* it is actually created and
>sent to the spooler. My challenge is that I wish to avoid having to change
>hundreds of production reports in order to add the environment information
>for laser printing. Is there any way to append (or in this case 'prepend')
>the environment information to reports already spooled?
>
>BTW, I have tried to BUILD an empty spoolfile, add the environment
>information, append a spooled report to it, and SPOOLF;PRINT it. What I
>found is that the environment info does work to control the laserjet, but
>that all the CCTL is eliminated from the appended report. Actually, it's
>not eliminated, but is instead turned into printable characters.
>
>Thanks in advance any help you can give...
>
>Barry Lake
>Stanford Alumni Association
>
>
-----------------------------------------------------------------------------
Gilles Schipper Voice: 905/889-3000
GSA Inc. Fax: 905/889-3001
300 John Street, Box 87651 Internet: [log in to unmask]
Thornhill, ON Canada L3T 7R4 Compuserve: 71203,474
-----------------------------------------------------------------------------
|