MTS has a rich set of options for handling printed output, suitable for a mainframe with many users sharing multiple printers.
Running under Hercules, the printer is emulated by writing ASCII text output to a file . Once you issue a print job within MTS you can view the file from your host operating system. This is a useful way to extract text files from MTS.
In order to get printing working you need the print device to the configured correctly (see part 1) and HASP needs to be running (see part 2). Once this is done you can direct output to the
*PRINT* pseudodevice and HASP will spool this for printing. With the default D6.0A configuration this will print to the file
If you have problems with this see the D6.0A FAQ question 21 for an alternative way to print.
Printing text files
The LIST command takes a second argument to determine where to send the output. By specifying
*PRINT* you can send this to the print queue.
LIST alpha *PRINT*
MTS will respond with the receipt number for the print job, for example:
> *PRINT* assigned receipt number 600011 > *PRINT* 600011 released, 3 pages, route=CNTR.
On a real shared mainframe it may take time for your job to reach the front of the queue and complete printing (although mainframe line printers were very fast), but on Hercules your output will be available almost immediately.
Switch back to your host operating system and look at the printer file - you will see output like this.
There is a header page in large type showing the username and print receipt number first, then the actual output (2 lines here) and finally a footer page with a summary of the job.
Some MTS files have carriage control instructions: these are characters in the first column of each line telling the output device driver how to format the file, eg overprint or centre line.
For these files you need to use
$COPY to send the file to the printer (or screen).
For example, let's look at the first ten lines of the
*CCMEMOS file. If we use
$list *ccmemos(1,10) *print* we get the below output; note the carriage control characters like
0 in the first column after the line number.
Listing of *CCMEMOS(1,10) at 23:08:07 on JUL 26, 1914 for CCid=REL. on MT Page 1 1 1 2 - 3 *CCMEMOS 4 0 April 1988 5 0 Current Computing Center Memos are available for checkout o r 6 in filing cabinets at all Campus Computing Sites. 7 0 The Computing Center's Documentation Support Staff (313-763 - 8 7624) or $MESS send to CC_Doc_Support_Staff, will mail CC Memo s 9 to individual users who cannot pick up copies at one of th e 10 public stations, for example, those who live out-of-town. We wil
If instead we use the command
$copy *ccmemos(1,10) *print* we get this formatted output.
*CCMEMOS April 1988 Current Computing Center Memos are available for checkout or in filing cabinets at all Campus Computing Sites. The Computing Center's Documentation Support Staff (313-763- 7624) or $MESS send to CC_Doc_Support_Staff, will mail CC Memos to individual users who cannot pick up copies at one of the public stations, for example, those who live out-of-town. We will
MTS has a large number of options to adjust how print output is processed. Many of these are no longer applicable (eg which physical printer to send it to, where the operators should deliver the hard copy). Look at the online help for
SET to learn more.
MTS comes with a number of formatters that will take a marked up file and return output with carriage control.
- Donald Knuth's
TeX(appears available but not installed on D6.0A
I may come back to these in a future post.
As always, MTS Volume 1 has a good introduction to getting printed output.
MTS Volume 15 has more information on