BookmarkSubscribeRSS Feed
derekmor54
Obsidian | Level 7

I'm working with the LISTING destination. Is there a way to change the font size from Courier/Monospace 10 to 9, working on a LINUX server? A system option?

This would be SO much easier in RTF, but I'm restricted to producing .LST files. The issue is the larger font size won't accommodate the number of characters necessary, and the LINESIZE= option is set to a standard width.

 

Post-processing isn't allowed. 

5 REPLIES 5
ballardw
Super User

Having worked with the Listing output when it was pretty much the only option (SAS 6.12 nearly 30 years ago) I wonder at this restriction.

Listing is a text only output. So redirect output to a text file using Proc Printto. Then use whatever you want to display text files with a given font size.

 

Maybe. Fontsize doesn't have anything to do with what fits on a SAS listing destination line. Linesize is number of characters. If you can't make all the text appear in the Output WINDOW then make the window bigger. You don't mention what actual environment is involved so this is a generic suggestion.

 

Given the number of arbitrary restrictions, output destination, linesize (you don't mention what it might actually be), how about Pagesize?

 

Also with your 'post processing isn't allowed' how do you expect to share this with anyone???? The listing destination unless sent to a file doesn't exist after a session ends.

IF you are sending output to a file using ODS LISTING, not all clear from your description, then "font" is controlled by the viewing application and has nothing to do with SAS basically as pure text files do not have any font characteristic.

derekmor54
Obsidian | Level 7

The issue is the default font size from the LISTING destination on our LINUX system is 10pt, and I was wondering if there was any way to make that 9pt, like a system or configuration option. I have strict restrictions on what I can do: the linesize must be 132, which maximizes number of characters with 1-inch margins in a 9-point monospace font. I'm running this code in batch SAS, so yes, I am producing a listing file. For reference, I remember when SAS versioning moved away from "release year.release #" to version xx.xx. I was hoping for some advice from old-timers like me. Honestly, If it were up to me, I'd do the whole thing in RTF with a monospace font, and use a VB macro to produce a .lst file, but company standards don't allow for that. 

 

I stumbled on the solution: At the invocation of the LINUX terminal session, we have to specify which font the XTERM window uses. Apparently the font size used by SAS depends on the XTERM settings, which is bad news for large-font workers like me. It would be nice if there was a configuration option to change this.

Tom
Super User Tom
Super User

So your problem has nothing to do with SAS.

You need to know what UNIX command to print a text file works on your machine and how to control the fonts (or other options) used so your output is what you want.

derekmor54
Obsidian | Level 7

While I admit this isn't an ODS issue, I wouldn't say it has nothing to do with SAS; after all, SAS determines where to break the page horizontally when creating output. You can tell because SAS creates a hard page break and places spillover columns on a separate page. I can honestly say this is the first time I've ever seen SAS output dependent on XTERM font size in over 30 years of SAS programming across multiple UNIX/LINUX environments. 

Tom
Super User Tom
Super User

Listing file is text.  It does not have a FONT let alone a FONTSIZE.

You can control the LINESIZE (number of characters per line) and the PAGESIZE (number of lines per page).

 

If you use a fixed space font there will be a direct relationship between the LINESIZE the FONTSIZE and the WIDTH of the paper.  A 10point font will print 12 characters per inch.  So if you are using 8.5x11 inch paper in LANDSCAPE mode with 0.5 inch margins you have 10 inchs for the width which means 120 characters.

 

Note that the same relationship between fontsize, number of characters and width of paper also holds something printed from an RTF document, a PDF document or any other software.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 778 views
  • 0 likes
  • 3 in conversation