BookmarkSubscribeRSS Feed
DonH
Lapis Lazuli | Level 10
I understand that one can register parameters for a stored process using either EG or the Management Console. The stored process will reference those as macro variables.

What are the pros/cons of using eithe EG or the Management console for such registration.
17 REPLIES 17
Vince_SAS
Rhodochrosite | Level 12
Don-

Starting in SAS 9, one copy of Enterprise Guide (EG) is included with each PC SAS license. If a user does not have Enterprise Guide, then their only option is to use the SAS Management Console plug-in to register their stored processes.

At the time of this writing, EG supports a more robust user interface for specifying parameter constraints. Suppose you wish to supply a list of valid values for a parameter. With EG, you can specify both a value to be displayed to the user and a value to be returned to the SAS server. With the management console you can only specify the return value; the display value matches the return value.

EG also allows you to populate the parameter constraints from a text file or SAS table. This is convenient in that you can save yourself a lot of typing, AND you can refresh the list of values at a later date with the click of a button.

Although this is not directly related to your original question, it is worth mentioning. If you register a stored process that creates streaming output, an additional option is available to you: "Create HTML user interface". If you select this option, EG will create a static Web page that can be used to execute your stored process from a Web browser. It is fully functional and contains all your parameters modeled as standard HTML widgets. You can hand-edit the HTML file to change the appearance to suit your needs, or use it as is.

Vince DelGobbo
SAS R&D
deleted_user
Not applicable
A few more features in EG that aren't accessible via SMC:

1) EG moves your SAS program to the server file location as you publish. SMC assumes you have manually done this save.

2) EG allows you to execute your stored process as soon as the publish is complete.

3) EG automatically can detect if the source for a stored process has changed and asks you if you would like to synchronize the new local version with the code. This occurs each time you open the EG project from which you published the SP from when you manually open the stored process for editing.

4) The next release of EG (4.1- due out late this month) adds the ability to parameterize your SAS program, SAS Tasks, and EG Queries in your project as you build it. When you publish from the process flow in EG we will automatically pass through these parameters to the stored process model making it possible to have your EG project behave very similarly to your stored process!

5) The 4.1 release also enables you to leverage the new reporting technologies of the SAS BI Server directly from EG. By executing stored processes in EG and using the new report control, you can create parameterized side by side and multi-output reports that you publish to Web Report Studio 3.1. These reports can be rerun at will from the web.
deleted_user
Not applicable
In response to Vince. Does the ability to base parameters on values in existing tables only come in version 4 of EG? I can't see how you can achieve this in version 3.

Okay, upon rereading the help I see how you do it.
Also, is there any enhancement in the pipeline that will allow parameters to be resused between stored processes?
Message was edited by: AliG at Mar 17, 2006 5:43 AM
Vince_SAS
Rhodochrosite | Level 12
AliG-

Reusable parameters are very much on the drawing board for a future release, but I don't have a date for you. We are in the early stages of this project.

Vince DelGobbo
SAS R&D
tim_bi
Calcite | Level 5
Hi Vince,

Regarding you're reply to AliG, by 'reuse' does this refer to the scope of a macro variable within a flow or project? So, if a global macro variable is created within a stored process, using Proc SQL (select into), then that variable will resolve to subsequent step(s)? This is my current dilemna with EG 4.1.

Thank you,
Tim (HASUG)
Message was edited by: tim@bi at Dec 28, 2006 10:53 AM
Vince_SAS
Rhodochrosite | Level 12
Tim-

It was good seeing you at HASUG.

With regard to reusable prompts, what we mean is that you can define a prompt and, well, reuse it in any of your stored process definitions. For example, suppose you always want to restrict users to a few ODS styles. You can define an "ODS Style" prompt, enter the few valid styles and save it. Whenever you make a stored process, you can simply include, or "reuse" this prompt, instead of having to define it from scratch in each stored process.

Your question regarding Enterprise Guide seems to be a question of maintaining "state". I don't know whether or not that is possible with EG, but in streaming stored processes, you can do it via SAS sessions. In EG you can try to maintain state by writing the information to permanent SAS table or flat file, but there might be better ways. I suggest you pose the question in the Enterprise Guide forum, if you have not already done so:

http://support.sas.com/forums/forum.jspa?forumID=10&start=0

Vince
SAS R&D
schering
Calcite | Level 5
For my project my users will be accessing SP's through SAS Add-in to Word and some of the stored process parameter constraints are populated based table values from an Oracle repository. The repository gets refreshed overnight and I need to update the parameter constraints based on the changes.

The technical help has indicated that there is currently no feature or mechanism to accomplish but they will be researching further for any other solution.

Even though as Vince mentioned you can update the parameter constraints using EG but unfortunately this requires a manual intervention which was not an acceptable work around.

Here is the approach I am planning to implement. It seems to be working but for some reason even though the constructed XML string variable has the control character when using metadata_setattr method to update the stored text the control character is stripped.

1) Retrieve the stored text value using getnass and getattr metadata methods from
/ClassifierMap/.../PrimaryPropertyGroup/.../StoredConfiguration and/or /ClassifierMap/.../PrimaryPropertyGroup/SubPropertyGroups/...StoredConfiguration
2) Save the string as an XML file.
3) Using XML libname and XML Map create tables to query for items like SelectionRange, StringLengthRange, IsOthersAllowed and Configuration Version.
4) Build a string (XML) using the values retrieved in the previous step and constructing .
5) Using metadata_setattr method update the storedText value with the constructed string from the previous step.

I may be pushing this to the max, please provide any comments or alternate suggestions. Thanks.
Message was edited by: schering at Mar 26, 2006 6:56 PM
Vince_SAS
Rhodochrosite | Level 12
schering-

In SAS 9.2 we plan to have a better solution to dynamic prompting. In the mean time, our Technical Support department can provide you with some sample code that will help with your project.

You will need to go to this Web site and open a support track:

http://support.sas.com/techsup/contact/submit_emits2.html

In the Product field, select "SAS Integration Technologies" and for the Subject field, specify "Need stored process STPDefineParameter macro". This will insure that the track gets routed to the people that can help you.

There are a couple of caveats: this is sample code, and it will NOT work in SAS 9.2, as we are making sweeping changes to the parameter model. Yet it may be useful for you now.

One way I envision you using this as follows:

* Run a SAS job to extract Oracle data into a SAS table. This table contains the constraints for the parameter.

* Run the STPDefineParameter macro, passing in the SAS table and any other required parameters (stored process name, parameter name, etc.).

This method is useful if your data does not change often.

Good luck.

Vince DelGobbo
SAS R&D
schering
Calcite | Level 5
Thanks Vince.

I got the program and documentation from technical help. I was able to make a small change to the code to do incremental update rather than cumulative update. Do you have a preview of the upcoming changes in 9.2?

As an FYI, I was told by technical help there is a defect in metadata_setattr method which strips the control character from the XML string. In any case, I was able to successfully test from both EG and Add-in. Thanks again.
Vince_SAS
Rhodochrosite | Level 12
I do not know all of the details, but the idea is that in SAS 9.2, we will have the ability to surface dynamic and cascading prompts.

By "dynamic", I mean that the values will be automatically populated at run time, possibly from metadata and/or SAS tables, stored processes, etc.

"Cascading" means that the selection in one prompt affects, or cascades to, another prompt.

A typical example showing both of these features would be a variable selector. First, a "library" prompt is dynamically populated with a list of available SAS libraries. Once you choose a library, a "table" prompt is updated to display the list of tables in the library. Finally, once a table is chosen, a "variable" prompt displays the variables in the given table.

It is a work in progress so what I said above may not be exactly correct.

Vince DelGobbo
SAS R&D
Andrew_F
Calcite | Level 5
I have found the copy and paste functionality useful to move stored process from devl to test to live Stored Process subfolders.
My biggest gripe is that the same function cannot be used between repositories as our prod environment is a separate server. Copying the whole repository to promote one stored process is a bit extreme.
If anyone knows the underlying XML query used by copy/paste I would be grateful. I might try to deduce it using iomlevel parameters on the metadata server log.
Diane_SAS
SAS Employee
In response to Andrew F:
With 9.1.3SP3, we introduced a new plug-in for the SAS Management Console called the BI Manager plug-in. This plug-in combines the functionality of the Business Report Manager and Stored Process Manager plug-ins. But, we've also added new functionality that will allow you to export BI-related objects (such as stored processes, Web Report Studio report, and information maps) and import them into another repository.

To move an individual stored process, go to the BI Manager plug-in, navigate to the stored process you would like to move, right-click to bring up the menu, and select export. A wizard will come up to guide you through the rest of the process. The nice thing about this tool is that it will also move the actual stored process code along with the metadata (including parameter definitions). The result of the export is a .spk file (SAS Package file) that is saved out to the file system.

To import the stored process to another repository, you must connect to the target repository. Once again, use BI Manager to navigate to the appropriate path location, right-click, and select import. Another wizard will come to guide you through how to reconnect the stored process to the target repository, including the name of the server and the file system path to store the stored process code.

Diane Hatcher
SAS Technology Strategy
Andrew_F
Calcite | Level 5
Very nice. I thought I had applied SP3 but one of my collegues found a SAS note refering to swdepot\client2cd\jps .
However, not everything is smooth. Our .sas files are controlled by MS Source Safe and cannot be overwritten by another process.
I am still testing but the SP seems to works OK despite the warning messages. Thanks for the tip.
zz1u
Calcite | Level 5
I am new to using SMC and I was wondering what the BI Manager plug-in. From the documentation that I have
it suggest that I use BRM aned SPM to add a stored process. Should I only be using the BI Manager?
Also, what is a good why to find out about new features.
When BI was installed it came with the new BI Manager but
the training docs do not mention it.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 17 replies
  • 2128 views
  • 0 likes
  • 9 in conversation