Exploring, modeling, predicting and reporting with SAS Visual Analytics and SAS Visual Statistics

Stored Procedure to trigger a SAS EG Graph

Reply
Frequent Contributor
Posts: 86

Stored Procedure to trigger a SAS EG Graph


Hi Forum,

I'd like to update my SAS VA reports by running a SAS EG graph & then append the results to a table in SAS VA.

From there, I want to schedule the report to update & email the audience that the report is updated.

First up I would like to know if this is the most efficient way to update & schedule reports using EG & VA?

Next thing is I need a Stored Procedure (SP)  to schedule in VA to run a SAS EG Graph.

Does anyone have a SP that can run a SAS EG Graph with comments?

Can the append process be automated also?

If not, I would need to have the SP include script to overwrite the uploaded table.

I'm using version 7.1 for EG & VA with Windows 7.

Any suggestions/ideas?

Thanks

Contributor
Posts: 69

Re: Stored Procedure to trigger a SAS EG Graph

I guess you can only append the SAS lasr table using the SP. which is used by any VA report.

The EG graph you will create that will be static graph generated from EG and not interactive as VA.

Frequent Contributor
Posts: 86

Re: Stored Procedure to trigger a SAS EG Graph

Thanks Explore SAS,

I have been advised by SAS Support that I can run an EG Graph using an SP.

I'm looking for an example SP someone has used because my attempts so far haven't worked.

Cheers

Frequent Contributor
Posts: 86

Re: Stored Procedure to trigger a SAS EG Graph

Hi Again,

Can anyone advise if the option to trigger or run an EG Graph from VA?

Any Boffins out there that can explain why or why not?

Thanks 

Super User
Posts: 1,202

Re: Stored Procedure to trigger a SAS EG Graph

Hi,

As advised by SAS Technical Support I'd look at using a Stored Process to be able to run customized SAS code within a SAS VA report.

You mentioned in a previous post above, your attempts haven't worked so far. What have you tried? Are you able to execute a sample stored process outside of SAS VA? Does your Graph Stored Process work in Enterprise Guide? For the community to help you, it would be good to know some detail on what you've attempted and what isn't working. If you need assistance with the code, then provide the code and log (if there are errors) etc.

It would be helpful to know:

  • Does your graph code work without errors in Enterprise Guide?
  • Did you created the stored process in EG?
  • Is the stored process registered it in metadata? (I assume you only have 1 metadata environment for where you connect in EG and VA.)
  • Can you select the stored process in your SAS VA report as per the instructions in the SAS(R) Visual Analytics 7.1: User's Guide - Stored Process
  • What does the SAS VA log file say when you run it?

Some tips on how to ask the SAS Support Community questions can be found at

It would be good to know where your issue is - whether it is an server installation issue, stored process configuration issue, security related issue, coding issue, SAS Visual Analytics issue etc. As a test, select a sample stored process (assuming they have been installed or create a simple one running a proc print) and run it in EG and then within your SAS VA report. This will then confirm that you can run a stored process and then you can look at creating a stored process with the EG Graph you require. Is SAS Integration Technologies installed and part of your licensed on the SAS VA server?

If you need to know more about stored processes, I'd advise looking at the documentation, SAS(R) 9.4 Stored Processes: Developer's Guide, Third Edition and a highly recommended book, 50 Keys to learning SAS Stored Processes by Tricia and Angela.

With regards, to your original question about emailing the audience the report is ready, I'd suggest to look at creating an Alert on the report object as described at SAS(R) Visual Analytics 7.1: User's Guide - Working with Alerts for Report Objects

With some detailed information, the community may be able to provide you more tailored advice.

Kind Regards,

Michelle

Super Contributor
Posts: 268

Re: Stored Procedure to trigger a SAS EG Graph

Hi Michelle,

How do I convert a SAS eg process flow into a stored process? I am trying to create sas dataset which I need to surface in SAS VA 7.1.

Thanks,

saspert

Frequent Contributor
Posts: 86

Re: Stored Procedure to trigger a SAS EG Graph


Thanks Michelle,

I've read the articles & they have helped but I'm still stuck at the creation of an SP in EG.

I intend to build an SP In EG & then use in VA.

My steps so far are;

  • Open an existing Project in EG (7.1)
  • Go to File >> New >> Stored process
  • I name the SP & check the directory
  • I select Replace with code from 'This Project'
  • I highlight one of the Process Flows & click Next
  • I leave the other options as default until I've completed the wizard & the SP is created & runs

I'm finding that the result is a graph when it should be a table of results & even them no results actually get displayed.

So I have a chart background with nothing on it.

Can anyone advise what I've missed in this process?

Thanks

Super User
Posts: 1,202

Re: Stored Procedure to trigger a SAS EG Graph

Hi,

What is the output type that you are using streaming or packaged? https://support.sas.com/documentation/cdl/en/stpug/68399/HTML/default/viewer.htm#result.htm

Can you provide your log file? It is strange that you are not getting the results as expected, which seems to suggest that something else is happening.  Providing some log files and screenshots will help the community to diagnose what is happening and to provide suggestions. You may also consider contacting your local SAS Technical Support office who may be able to guide you, connecting to your machine. They will most likely want to see log files etc too.

Kind Regards,

Michelle

Frequent Contributor
Posts: 86

Re: Stored Procedure to trigger a SAS EG Graph

I've found the answer thanks to SAS Support & various you tube videos.

The steps are;

  • Open an existing Project in EG (7.1)
  • Go to File >> New >> Stored process (SP)
  • I name the SP & check the directory
  • I select Replace with code from 'This Project'
  • I highlight one of the Graphs & click Next so that the script drops automatically into the script area in the correct place
  • Once the SAS script drops in, remove the line "create table ...." as this why no results are shown - the script wants to create a table not a report.
  • I have both 'Streaming' & 'Package' checked before running
  • Run the Process to see the table results as a SAS Report.
  • Now go to SAS VA & create a Report using a 'Stored Process' Object from the Objects selection
  • Once the report is completed & saved, create a Report schedule by going to File >>> Distribute Reports while in the Create Reports area of SAS VA

I haven't been able to find a similar instruction to this anywhere so I hope this helps others in the same situation.

Contributor
Posts: 69

Re: Stored Procedure to trigger a SAS EG Graph

Does it create interactive report like VA or just a static report from stored process.

Frequent Contributor
Posts: 86

Re: Stored Procedure to trigger a SAS EG Graph

Hi Explore_SAS,

My needs were only for a table of data so I haven't tested that.

I would try creating this in SAS EG with Prompts & then create an SP from that Project.

Hope this helps

Post a Question
Discussion Stats
  • 10 replies
  • 668 views
  • 1 like
  • 4 in conversation