Desktop productivity for business analysts and programmers

How do I create new web page style in EG for a stored proc?

Reply
N/A
Posts: 0

How do I create new web page style in EG for a stored proc?

When creating a stored procedure in EG that uses streaming output, I choose the option to create a HTML user interface. I see in the drop down that is provided that there is an option to browse for templates.
Are there other templates out there? And if so, where can I find them? How about creating my own?
Thank you.
Frequent Contributor
Posts: 97

Re: How do I create new web page style in EG for a stored proc?

Run the following code to create custom styles

ods path SASHELP.TMPLMST(update);
ods path show;
proc template;
define style MyCustomstyle;
parent=Styles.sasweb;

STYLE Header /
FONT_FACE = "Arial, Helvetica, sans-serif"
FONT_SIZE = 10pt
FONT_WEIGHT = bold
FONT_STYLE = roman
FOREGROUND = black
BACKGROUND = cx6495ed
;
STYLE SystemTitle /
FONT_FACE = "Arial, Helvetica, sans-serif"
FONT_SIZE = 10pt
FONT_WEIGHT = bold
FONT_STYLE = roman
FOREGROUND = cx003399
BACKGROUND = cxffffff
;

STYLE DataEmphasis /
FONT_FACE = "Arial, Helvetica, sans-serif"
FONT_SIZE = 2
FONT_WEIGHT = medium
FONT_STYLE = roman
FOREGROUND = cx000000
BACKGROUND = cxffffff
;
end;

run;


Hope this helps
SAS Super FREQ
Posts: 8,720

Re: How do I create new web page style in EG for a stored proc?

Hi:
Just a comment on the code above. It's probably NOT a good idea to update the SASHELP.TMPLMST item store. For one reason -- many users sometimes share SASHELP and you may not have write access to the item store. And if you do happen to have write access, I have talked to many people who have accidentally erased or changed the production templates in SASHELP.TMPLMST -- and they're generally very sorry that they did use UPDATE mode. Even worse would be to have write access and to use an access mode of WRITE -- which could potentially erase the entire template store -- affecting not just your styles, but ALL your SAS procedures' table templates, as well.

In fact, when we teach the use of the ODS PATH statement in class, we actually discourage this practice (update SASHELP.TMPLMST) in favor of something like this:
[pre]
ods path permlib.mytmplt(update)
sasuser.templat(update)
sashelp.tmplmst(read);
[/pre]

Where PERMLIB is a library that will be the location for changed/new templates. One or two people use the ODS PATH statement with UPDATE mode and everybody else in a department or shop will use PERMLIB with READ access like this:

[pre]
ods path permlib.mytmplt(read)
sasuser.templat(read)
sashelp.tmplmst(read);
[/pre]

cynthia
Frequent Contributor
Posts: 97

Re: How do I create new web page style in EG for a stored proc?

Thanks Cynthia

I will now go by your advice.
N/A
Posts: 0

Re: How do I create new web page style in EG for a stored proc?

I remember you identifying the (Read) and (Update) parameters when you taught me ODS in Long Beach (?), some years ago Cynthia.

In the context of a dinosaur SAS user, I saw that as a means to get around a locked catalog in a concatenated catalog group. Being fairly well experienced with SAS System catalogs since V6, I knew they were not able to be updated and assumed the same situation existed here.

Then someone on SAS/L recently said she had a bad entry for a standard SAS template and I began casting around for another explanation other than the entry having been corrupted by her own mistake. I was surprised to find that you can alter, delete and replace entries in SAS ODS template catalogs and was alarmed at the implications.

I wonder if there is any intention in the future to lock these from update, much like the SAS/Graph and printer drivers (and others) are fixed. It seems to me to be a better solution than having them open to unwanted change.

Kind regards

David
N/A
Posts: 0

Re: How do I create new web page style in EG for a stored proc?

The default settings in ODSpath do perform a lot of protection of the ODS itemstores. However, when a user program needs to use the ODSpath statement the risk escalates.
Since (at the invocation of a SAS session) we can concatenate user-updateable catalog paths before the installed SAS paths (see the setting and use of !sascfg ), it might make sense for a standard install to set an op.sys. read-only attribute on all the installed SASHELP objects ( tables, catalogs, itemstores etc.). The packaging of hotfix installation already performs checks at object level, so would easily cope with removal and reinstatement of the attrib where needed, for objects to be hot-fix-ed.
Would we expect non-administrators to need to make updates to SAShelp objects?

PeterC
Ask a Question
Discussion stats
  • 5 replies
  • 119 views
  • 0 likes
  • 3 in conversation