Updating your global style

2

Every six months or so I try to find a recent picture that captures who I am and what I am feeling. Loading this into my various social/online profiles in Twitter, SAS Community, Forums, LinkedIn, corporate internal, Facebook etc then take me a bit of time to implement. Wouldn't it be nice to only load this in one location so it takes a split second to implement? (Or maybe I need to remove a few profiles ... nah.)

So I realized this morning that this is how SAS Stored Process developers feel, adding the reserved macro variable _ODSSTYLE option to each and every stored process. Whether as a hidden prompt in the metadata or a %let statement in the stored process code, it's still time consuming but just barely to not make a big fuss about it.

Side Note: Out of the box, SAS Stored Processes all use the Default style sheet for HTML output. Its a dark grey and some don't consider it the best view of their reports. As a developer, simply adding the statement: %let _odsstyle = stylename; will update the single report to whatever style you have entered in the stylename area. (A list of all the shipped styles is available from SAS Documentation on ODS.)

Save the developers some time by globally changing the default style for all HTML output from grey to yeah! Here are just two available options for the SAS administrator to accomplish this.

  1. (New in 9.3! )Set the ODSSTYLE OPTION in the SAS Configuration File found at <install folder>\SASFoundation\9.3\nls\en\sasv9.cfg. This affects each ODS HTML report generated, whether in a batch SAS job or a stored process.

    -odsstyle sasweb

  2. Use %let _odsstyle = stylename within the Stored Process autoexec file. <config folder>\Lev1\SASApp\StoredProcessServer\autoexec_usermods.sas. This is kicked off for each client/session request to the stored process server.

%let _odsstyle = sasweb;

Note that these options can still be overridden by developers, but the hope is that making this change globally will address 80% (or more) of the reports making developers more productive for the important things, like updating their profile pictures in SAS Community.

Share

About Author

Angela Hall

Senior Technical Architect

Angela offers tips on using the SAS Business Intelligence solutions. She manages a team of SAS Fraud Framework implementers within the SAS Solutions On-Demand organization. Angela also has co-written two books, 'Building BI using SAS, Content Development Examples' & 'The 50 Keys to Learning SAS Stored Processes'.

Related Posts

2 Comments

  1. Side note:

    If you add _ODSSTYLE to your stored process and test it from SAS EG. SAS EG will use your default SAS EG style. So use a web browser when testing your ODS style changes.

    I know this because I spent more than an hour one day fighting with my stored process code. :-)

Leave A Reply

Back to Top