The SAS Output Delivery System and reporting techniques

Traffic Lighting percentages with PROC FORMAT

Reply
N/A
Posts: 0

Traffic Lighting percentages with PROC FORMAT

I am trying to highlight a column of percentages in my excel ODS output where values are below 97.5%.
Here is my proc format code:

PROC FORMAT;
VALUE HILO
LOW-0.975 = 'RED'
0.975-HIGH = 'GREEN';
RUN;

Here is my proc print code:

PROC PRINT DATA = _LAST_ HEADING = H LABEL SPLIT =' ' NOOBS;
VAR VARN;
VAR CNT;
VAR COMMON;
VAR PCTG / STYLE = {BACKGROUND = HILO.};
VAR CDSMISS;
VAR PTH;
VAR SEG;
VAR CFN;
RUN;
On my workstation I have PC SAS 9.1.3, which I have managed to use this with and have had no problems.
On my mainframe I think version 8.2 is used. When I try to run the code on the mainframe I get the error message:
"Wrong type of format for data type: HILO."

Obviously it does not like comparing the values in my proc format to the percentage variable. I don't know how to make a proc format that will compare against a perentage in sas 8.2. Can anyone help??
---------------------------------------------------------

I have found this note to say that this is a problem that was not fixed until 9.1 and that proc report should be used instead:

http://support.sas.com/techsup/unotes/SN/006/006311.html

what a nuisance.
Message was edited by: The SAS Man at Nov 24, 2006 10:56 AM
N/A
Posts: 0

Re: Traffic Lighting percentages with PROC FORMAT

This is a known problem with V8.2, see SAS note 006311. PROC REPORT should work OK - if you can work out the different syntax!
Ask a Question
Discussion stats
  • 1 reply
  • 150 views
  • 0 likes
  • 1 in conversation