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!

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 983 views
  • 0 likes
  • 1 in conversation