BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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
1 REPLY 1
deleted_user
Not applicable
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!

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1 reply
  • 724 views
  • 0 likes
  • 1 in conversation