Hi:
A long time ago, in a galaxy far, far away, on a mainframe line printer, you could get (most often):
Landscape mode:
132 characters for your linesize (12 char per inch X 11 inches) and
51 lines down the page for your pagesize (6 lines per inch x 8.5 inches)
Portrait mode:
102 characters for linesize (12 char per inch x 8.5 inches) and
66 lines down the page for pagesize( 6 lines per inch x 11 inches)
The output was almost always landscape and the font that we used was SAS Monospace or more a generic "line printer" font. When we
finally got away from perforated paper, then we started to be able to get "portrait" output -- but it was all in upper case until we got a printer with
an upper and lower case print train.
As I remember it on the mainframe, your DD statement for SYSPRINT always went to SYSOUT=A or something and SYSOUT=A
automatically went to a "line printer".
The other big difference was that the mainframe used "carriage control characters" -- so even if your linesize was 132, the DCB of the
SYSPRINT file was LRECL=133 and VBA or FBA -- where the A meant that carriage control characters were in position 1 of the file. I'm not
even sure that you can make PC printers read those kind of carriage control characters these days.
You -can- still create an ASCII text file that will approximate the mainframe "look and feel" by sticking with the LISTING window and using a
program similar to that shown below.
Next, the issue comes in on how you direct this file to the printer. Do you use Notepad? Well, Notepad has a default font and default
interface for working with the printer. Do you use Word? Word has the NORMAL.DOT template in play when you print from Word.
On the PC, if you open your SAS LISTING output in Notepad or Word, you will see that those applications generally use a proportional space
font by default and so, the output viewed in Word or Notepad, will not LOOK like the mainframe printer output outside of the SAS Listing Window.
The output will only start to look like mainframe output again after you change your font in the viewing software (Word or Notepad) to
SAS Monospace 8 or 9 pt on the PC.
The program below shows you what DATA _NULL_ to LISTING output would look like. Review the SAS output in the LISTING window and then
open the file in Word or Notepad and see the difference. The PROC PRINTTO "sandwich" is the way that I would capture the
equivalent of what goes to the SAS listing window into an ASCII text file. Whether the "page breaks" are respected when you print the file,
depends on the interface between the printer and the software that does the printing.
You may actually have to experiment with PROC FORMS in page mode on a PC printer:
http://support.sas.com/documentation/onlinedoc/base/91/forms.pdf
If you can't get what you want with DATA _NULL_ and this documentation doesn't help you with PROC FORMS, then your next stop
should be SAS Tech Support. They may be able to help you work with the specific print driver and rendering software and form to come up with the best solution.
cynthia
[pre]
proc printto file='c:\temp\lnprt.txt' new; run;
title; footnote;
options orientation=landscape linesize=132 ps=51 ;
data _null_;
file print notitle;
put @1 '0..................................................................................................1.........1.........1.........1..';
put @1 '0........1.........2.........3.........4.........5.........6.........7.........8.........9.........0.........1.........2.........3..';
put @1 '123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012';
do i = 4 to 51;
put @1 '.....line: ' i 2.0;
end;
run;
proc print data=sashelp.class;
title 'Line 1 Title Proc Print';
run;
proc means data=sashelp.class;
title 'Age Info';
var height;
class age;
run;
proc printto; run;
[/pre]