BookmarkSubscribeRSS Feed
chandler
Fluorite | Level 6
I am running SAS 9.1.3 Service Pack 4 on WindowsXP Pro platform with Service Pack 3. I have been saving my logs to a file in a specific folder on my hard drive, for future reference. However, the color coding is lost once I do this.

When I need to save SAS code from the Enhanced Editor window into a Microsoft Word 2007 document, the color coding of the code is preserved when I cut and paste into Word. Why does this not work for the Log Window color coding? Is there a way to preserve the color coding, so I can easily see my "ERROR:" and "WARNING:" messages?
7 REPLIES 7
ArtC
Rhodochrosite | Level 12
This is for windows and untested otherwise.

On your SAS.EXE line add the -RTFCOLOR initialiazation option. Then save your log to an RTF file by one of the following three ways 1) use the SAVE AS pull down under FILE (windows DM). 2) write the log file to an RTF using the command WRTFSAVE "c:\temp\mylog.rtf". 3) use a DM statement such as DM 'log; WRTFSAVE "c:\temp\mylog3.rtf"';

PROC PRINTTO does not do the trick. I have not tried the ALTLOG option.
Art
Peter_C
Rhodochrosite | Level 12
Last August a similar topic http://support.sas.com/forums/thread.jspa?messageID=40482鸢 points to alternative ways of collecting the color attributes that are native to SAS Display Manager.
ArtC provides the more convenient RTFcolor approach which works for me.
Neither approach will support log files created when SAS runs in batch mode which includes SAS Enterprise Guide.
peterC
KimLeBouton
Quartz | Level 8

The URL doesn't seem to be available anymore.  Is there an alternate way to get to the old community information.

 

Are there a any new solutions with SAS 9.3 and corresponding EB or SAS 9.4?

 

TIA,

Kim LeBouton

data_null__
Jade | Level 19
Do you know where this is documented? I could not find anything, other than this thread when I search RTFCOLOR at support.sas.com.

I did find this on SAS-L
http://www.listserv.uga.edu/cgi-bin/wa?A2=ind9609C&L=sas-l&P=R2522
Peter_C
Rhodochrosite | Level 12
proc options option= rtfcolor; run; suggests it doesn't exist 😉
proc options option= rtfcolor define value internal; run; provides very little additional info, but does indicate it is an "invocation-only" option.
The "internal" is emphasised with the additional NOTE:[pre]NOTE: Internal SAS system options facilitate testing, development and problem diagnosis of SAS.
Internal options are not documented or supported. Customer use of internal options is not
recommended, unless specifically directed by SAS Technical Support.[/pre]indicating no documentation is likely.
So, I guess it might be withdrawn at any release.
As long as you can run under Display Manager, I don't think it will disappear.
peterC
Andre
Obsidian | Level 7
I have only found a french sentence
at
[pre]
http://www.sas.com/offices/europe/france/services/support/faq/sasaf.html#AF14
[/pre]
as an AF trick
more precise:

"In your config.sas, the option -$rtfcolor would permit you to preserve the color of the text when you copy SAS text coming from a sas log or scl window."

Andre

Message was edited by: Andre Message was edited by: Andre
Linkachu
Obsidian | Level 7

I wish SAS would make this an option that the user can edit from within the program. I run SAS on a server and cannot make changes to the invocation options or configuration files.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 7 replies
  • 4402 views
  • 0 likes
  • 7 in conversation