comp.lang.ada
 help / color / mirror / Atom feed
From: kilgallen@eisner.decus.org (Larry Kilgallen)
Subject: Re: file to printer (spooling)
Date: 2000/03/23
Date: 2000-03-23T00:00:00+00:00	[thread overview]
Message-ID: <2000Mar23.131043.1@eisner> (raw)
In-Reply-To: 8bddei$gmg$1@infosun2.rus.uni-stuttgart.de

In article <8bddei$gmg$1@infosun2.rus.uni-stuttgart.de>, Peter Hermann <ica2ph@iris16.csv.ica.uni-stuttgart.de> writes:
> we need help:
> (First of all, our primary goal is portability)
> We create, write (several ada.text_io.put_line),
> and close a text file.
> Thereafter we want to spool that file to the printer 
> in order to let it print asynchronously.
> How should we do this from within the Ada program?
> We do need that action from within the running Ada program.
> 
> Do we need an implementation dependent operating system command call?
> If yes, what is the name of that call?

If the call is implementation dependent, then clearly the name varies !

SPOOL stands for "Simultaneous Peripheral Operation On-Line",
and originated when jobs ran from card decks.  Not all jobs had
the printer at the same time, but they cannot tell the difference.

If you want your Ada code to be portable, I would suggest putting
the system specific pieces outside the Ada code.  You need to
set up the environment so the file name used would go to the
spooled device.  On VMS this would be done with a logical name.
I presume on Unix it would be done with an "environment variable"
(whatever that is:-).  I know that MVS supports spooling, but I
do not know how you associate a particular program with a spooled
printer device (aside from Batch, where it would certainly be
declared in your JCL).  Certainly AS400 would have such support,
but no Ada compiler so it is not an issue :-).  Others in this
group will tell you about Microsoft and Unix.

Setting up which printers have spooling support is a necessary
system management step, just as is setting up which printers
have print queues associated with them.  Generally speaking,
to get spooling support you will be using print queues, and
even the Macintosh has that.




  parent reply	other threads:[~2000-03-23  0:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-23  0:00 file to printer (spooling) Peter Hermann
2000-03-23  0:00 ` John J Cupak Jr
2000-03-23  0:00   ` Robert Dewar
2000-03-23  0:00   ` Larry Kilgallen
2000-03-23  0:00 ` Larry Kilgallen [this message]
2000-03-23  0:00   ` Tucker Taft
2000-03-23  0:00 ` Pascal MALAISE
2000-03-24  0:00 ` Tarjei T. Jensen
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox