BookmarkSubscribeRSS Feed
JohnT
Quartz | Level 8

Gday,

I'm trying to setup a job which exports a dataset to Excel on the network.

Prior to converting the job into a stored process, it exports fine to Excel.

When I convert the job into a stored process in Enterprise Guide, it also works fine.

When I try to create a SAS Web Report with a Stored Process, it executes, and I can see the work files when it's running, but the Excel file is never created.

I've tried changing the server from the Detault server (whick looks to be the workspace server) to the Stored Process server, and am not having any luck there.

Is this a limitation of SAS Web Reports?

I do not want to the Addin for Microsoft Office solution, due to licencing reasons and IT constraints we cannot do this.

The stored process doesn't ask for anything.

Essentially the code could be:

proc export

   data = sashelp.class

   outfile = "c:\class.csv"

   dbms = csv replace;

run;

Then run the create stored process option in Enterprise Guide.

I'm running SAS 9.3 using Enterprise Guide 5.1 (5.100.0.12269) Hot fix 7 (32-bit) on Windows.

Thanks.

3 REPLIES 3
Quentin
Super User

By web report you mean Web Report Studio?

I know with the SAS Stored Process Web app you can have a stored process which runs and streams a csv or xml file back to the browser, and user gets a file save/download dialog box.  You need to set html headers and be sure to send streaming results.

WRS generally does package results (not streaming), and I think generally in SASREPORT format (?)   I don't really konw much about WRS.....

The Boston Area SAS Users Group is hosting free webinars!
Next up: Bart Jablonski and I present 53 (+3) ways to do a table lookup on Wednesday Sep 18.
Register now at https://www.basug.org/events.
Cynthia_sas
SAS Super FREQ

Hi:

  When you are using SAS Web Report Studio, the primary server that is used to run stored processes is the Workspace server. It is entirely likely that code that works in a "local" environment might not continue to work when run on the Workspace server. SAS Web Report Studio is a Java Application -- it uses SAS Report XML as the report format and when you run a stored process the expectation is that you will return results to the Web Report Studio interface -- in SAS Report XML format. Usually, stored processes that execute on either the stored process server or the workspace server do *NOT* have visibility of your local C: drive. But I am confused like Quentin because you refer to stored processes, so the "SAS Web Reports" is not a term that is usually associated with stored processes. Usually, people are referring to SAS Web Report Studio.

  However, you can also use Base SAS to create "plain" HTML files, which could also be considered "Web Reports", but not necessarily have anything to do with stored processes. So your terminology and description of the issue is confusing.

cynthia

JohnT
Quartz | Level 8

Sorry, I was lazy, yes, I did mean using SAS Web Report Studio.

In in SAS Web Report Studio, I've attempted to create a SAS Web Report (usually has a suffix of .srx, what do people usually call this?).  In that SAS Web Report, I have put in a Stored Process (as opposed to a table, or graph, etc).

I want the Excel file created when the user visits this page.  They have no access to SAS Enterpride Guide.  I would be very happy to create plain HTML files, but I wouldn't know how to have a Stored Process execute?

My example of C: drive was too simplistic in hindsight, it's actually going to a place on the network.  The workspace server should have visibility of the spot that I'm attemping to export to.

It doesn't have to be a Stored Process, it can be anything, I just couldn't think of a better way of doing this.

Note, I already have a SAS Web Report, with a Stored Process that just lists all the data, the nice thing is it doesn't display thousands of records, but only the first 40.  The user in turn clicks on the export button, and they get a zip file.  They extract it, open the Excel file, and then save it as another Excel file.  I felt that this was quite a long round-about way to get a listing of data in Excel.

What I want is for a user to be able to visit something which in turns generates an Excel file (a dump of a SAS dataset) on the network.  Whilst the Addin for Microsoft Office sounds ideal, I have two issues with it, licencing and even installing it.  If licencing wasn't an issue, I would have contacted technical support for help on that.  I don't want to generate a dump of the data everyday.

Thanks.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 3 replies
  • 2334 views
  • 0 likes
  • 3 in conversation