09-28-2016 11:49 AM
Not sure which board to post this question.
I want to print out some SAS programs so I can review them when not sitting before a computer.
When I print it out from SAS, there are two problems:
1. the green (comments) and blue (SAS key words) etc colors are all in black and white. Is there a way to keep the colors?
2. long lines are truncated by the paper width, even with landscape setting. Is there a way to handle this without editing SAS programs?
09-28-2016 12:38 PM
I have an idea of what you are trying to accomplish.
I am not sure why you would want to print it as long code might be pretty messy.
A SAS User - Michelle Buchecker - recently presented how to use SAS Enterprise Guide for this and refactoring code to be easier to read. This might be what you are already doing and simply want a hard copy.
So i dont have immediate experience with a solution because I just wouldnt approach the problem that way.
I would output the code to PDF (for documentation or back up purposes - hard copy for reasons of secruting intellectual property)
But for just working with the code, if you are NOT happy with SAS EG - which i doubt. but lets assume.
Try other code editors. Example: Textpad with sas syntax. SublimeText3.
There are ways to customize the editors and get a better looking printed version.
Your also going to have to deal with your printer and color ink. But clearly this is not a concern.
SO i know this isnt a 'solution' but maybe somethings to consider.
09-28-2016 01:43 PM
The only approach that I know that may accoplish what you want is to highlight the entire program in the editor and then paste into a work processor program such as Word. The long lines will wrap according to the document settings in the word processor but color highlighting and such are preserved.
You might have an issue with viewing the document on other machines if your editor font is SASMONO or similar as some characters will not map well to another font if the vieweing computer doesn't have access to the font.
09-28-2016 01:51 PM
Thank you both for your suggestions.
Copying to word can keep the color. I will go this way.