I have a whole series of jobstreams which use an MPEX construct
:FILE filename{PR_SET}
to direct filename to the user's preselected destination; works great,
usually resulting in either
:FILE filename;dev=hp5simx,8,<copies>;env=lj132dgb.pub.minisoft
or
:FILE filename=MAILTEXT;disc=32000,32,1;cctl
My Cobol programs output to filename just fine; the ordinary subsequent
scenario consists of
:IF finfo("MAILTEXT","EXISTS")
: mail ...
:ELSE
: comment (it already printed)
:ENDIF
Inevitably I've come up with a need for filename to be temporary so it can
be copied both to the user's {prsetup} destination, but also to a few other
places. So I do
:FILE filename=tempname;temp;disc=32000,32,1;cctl
and then in the MAILTEXT case,
:FCOPY FROM=tempname;to=*filename;NEW
works fine, but in the non-MAILTEXT case, ;NEW causes TWO blank output files
to appear on the printer, followed by the dread "file already exists" re the
printer.
So I'm wondering if anybody sees a cleaner way around this than my current
sloppy-looking...
:SETVAR CIERROR 0
:FCOPY FROM=tempname;to=*filename;NEW
:if cierror <> 0
: comment probably didn't like ;NEW for a printer, try
: FCOPY FROM=tempname;to=*filename
:ENDIF
TIA,
Tracy Pierce
(vendor replies welcome too, free ad! ;-)
on lemmings: http://www.snopes.com/disney/films/lemmings.htm (I was actually
looking for the image with the life-jacketed lemming == mpe user)
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|