BookmarkSubscribeRSS Feed
deleted_user
Not applicable
If I create a Stored Proc using Enterprise Guide then EG adds in the 'special' SP code for me e.g. the %stpbegin statement.

Say I want to override any user choice of ODS style, the documentation provides an example whereby if I code in the line "%let _odsstyle = sasweb;" then the SP uses this value. I tried this but it wont't work and I think the reason is because in the SP code the %stpbegin is placed before my %let statement by EG. How can I edit the code within EG and ensure the correct statement order? Is there a way of preventing EG from generating the SP header and footer code so I can type it in myself?

Thanks.
2 REPLIES 2
deleted_user
Not applicable
You don't have to prevent EG from generating the STPBegin/End since you should be able to edit the code quite esily. When you create a Stored Process, the resulting code in generated and saved in the location that you specify in the "Source File Path on Execution Server" - if you find your generated code, you should be able to pull it into EG and edit it however you need to. You can then save it and rerun the stored process and it should pick up any changes. We played around with the same thing (overriding the ODS style) and were able to edit the Stored Process Code. Hope that helps (and makes sense).
Vince_SAS
Rhodochrosite | Level 12
The preferred way to control the behavior of the STPBEGIN/STPEND macros is by use of input parameters, not by hard coding values with a %LET statement.

For example, if you want to control the ODS style that is used, register a parameter named _ODSSTYLE and give it a default value. At run-time, users will be able to specify the value they want to use. If you don't want the user to change the value at run-time, clear the "Modifiable" and "Visible" check boxes for this parameter.

A list of parameter names can be found at:

http://support.sas.com/rnd/itech/doc9/dev_guide/stprocess/reserved.html

Parameters that are specific to the STPBEGIN/STPEND macros will have "%STPBEGIN/%STPEND" in the "Used by" column.

Vince DelGobbo
SAS R&D

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
  • 2 replies
  • 863 views
  • 0 likes
  • 2 in conversation