From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7d6b00835cfb92fc X-Google-Attributes: gid103376,public From: kilgallen@eisner.decus.org (Larry Kilgallen) Subject: Re: file to printer (spooling) Date: 2000/03/23 Message-ID: <2000Mar23.131043.1@eisner>#1/1 X-Deja-AN: 601395887 References: <8bddei$gmg$1@infosun2.rus.uni-stuttgart.de> X-Trace: news.decus.org 953835048 28319 KILGALLEN [216.44.122.34] Organization: LJK Software Reply-To: Kilgallen@eisner.decus.org.nospam Newsgroups: comp.lang.ada Date: 2000-03-23T00:00:00+00:00 List-Id: In article <8bddei$gmg$1@infosun2.rus.uni-stuttgart.de>, Peter Hermann 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.