The SAS Output Delivery System and reporting techniques

Mainframe ODS style modification

Reply
N/A
Posts: 0

Mainframe ODS style modification

I am trying to change the background color in styles.brick.
PROC TEMPLATE;
DEFINE STYLE STYLES.BRICKA;
PARENT = STYLES.BRICK;

REPLACE COLOR_LIST /
'BGA1' = CXAFE6E9
;
END;
ODS PATH SASUSER.TEMPLAT(UPDATE) SASHELP.TMPLMST(READ);
ODS LISTING CLOSE;
ODS NOPROCTITLE ;
ODS PDF FILE = DISK
STYLE=STYLES.BRICKA
I get many messages like this:
WARNING: Could not locate style reference 'default.colors("docfg")'.

What am I missing?
SAS Super FREQ
Posts: 8,743

Re: Mainframe ODS style modification

Hi --
Your issue has nothing to do with the mainframe. It has to do with how you're specifying your new style. When you use the REPLACE statement, you must RESPECIFY all the style attributes for the style element that you're replacing. In this case, the style element is "COLOR_LIST" and you are trying to change the background color.

The paper might prove instructive to help you solve this problem:
http://www2.sas.com/proceedings/sugi27/p186-27.pdf
It shows the use of the REPLACE statement and RESPECIFYing ALL the style attributes. "Unable to find" messages happen because inheritance is resolved differently in SAS 8 and SAS 9 (right now) when you use the REPLACE statement. In fact, STYLES.BRICK shows you that you must RESPECIFY all the style attributes when you use REPLACE because it contains a REPLACE for COLOR_LIST. If you cut and paste the entire COLOR_LIST section from the existing STYLES.BRICK and put it into your program, and then change the BGA1 attribute, you will get a table background that is a lovely color of light blue.

Starting in SAS 9.2, the REPLACE statement behavior will change and REPLACE will essentially act like the STYLE statement as far as style template inheritance is concerned, as described here:
http://www2.sas.com/proceedings/sugi31/053-31.pdf

Good luck! If you need more help with your style template, then Tech Support is your best bet for help. Template code is lengthy.

cynthia
N/A
Posts: 0

Re: Mainframe ODS style modification

Thank you very much
Ask a Question
Discussion stats
  • 2 replies
  • 122 views
  • 0 likes
  • 2 in conversation