Desktop productivity for business analysts and programmers

How to output proc print to desktop from SAS EG Server?

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 81
Accepted Solution

How to output proc print to desktop from SAS EG Server?

I'm having trouble outputting a proc print table to my desktop. We have a SAS EG v6.1 license installed on a server.

 

I'm receiving the following error:

 

ERROR: Insufficient authorization to access C:\HH_Providers.pdf

 

 

when I run my code:

 

ods pdf file="C:\HH_Providers.pdf";

PROC PRINT DATA=WORK.SORTTempTableSorted style(header)={just=c}

NOOBS

LABEL

;

VAR SVC_QTR MEMBNO MEMB_NAME HH_NAME SVC_PROVIDER SVC_DATE DIAG_IND / style(data)={just=c};

BY SVC HH_NAME;

FORMAT

SVC_DATE MMDDYYS8.;

LABEL SVC_QTR="# of Qualifying Visits/Episodes"

MEMBNO="Member Number"

MEMB_NAME="Member Name"

HH_NAME="Home Health Provider"

SVC_PROVIDER="Healthcare Provider"

SVC_DATE="Visit/Episode Date"

DIAG_IND="Diagnosis Indicator";

RUN;

ods _all_ close;

 


Accepted Solutions
Solution
‎04-13-2016 08:02 AM
SAS Super FREQ
Posts: 676

Re: How to output proc print to desktop from SAS EG Server?

Hi

As already mentioned the SAS Server can not see your local drives. However Enterprise Guide has the functionality to download results to your local computer. Follow the steps below.

 

  • In the properties of your code within Enterprise Guide, you can specify the output format you want like HTML, PDF etc.
  • when you run the code you will get an icon in your processflow representing the result.
  • Using your RightMouseButton on the result choose Export as step in project. This will allow you to download the result from the SAS server to your local computer.

 

Bruno

View solution in original post


All Replies
Super User
Posts: 1,102

Re: How to output proc print to desktop from SAS EG Server?

Try writing the pdf to a different location than c:, as in a folder where you have permissions.

Generally Windows protects to write directly on c: 

Frequent Contributor
Posts: 81

Re: How to output proc print to desktop from SAS EG Server?

I tried writing to my H: drive, still no luck:

 

ERROR: Physical file does not exist, H:\HH_Providers.pdf.

 

The weird thing is that I *can* export datasets to my desktop from EG using the Export wizard. But not when using ods statements to output files from a procedure.

 

Grand Advisor
Posts: 17,474

Re: How to output proc print to desktop from SAS EG Server?

The server can't see your C or H drive. 

 

You our need to figure where it can see and where you can create files - most likely a path on the server. 

Esteemed Advisor
Posts: 6,736

Re: How to output proc print to desktop from SAS EG Server?

Your situation will look like this:

 

 

Desktop   ---------  H:  --------->   File Server

    |                                              X

    |                                              X

 via EG                                      H: mount on the SAS server does not exist, but would be needed

    |                                              X

    |                                              X

   V                                             X

SAS server ---------------------------------

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
SAS Super FREQ
Posts: 274

Re: How to output proc print to desktop from SAS EG Server?

Remember, the paths specified in code are from the context of the server.  So, when you specify "C:\HH_Providers.pdf" in your code, SAS is trying to write that file on the SAS server's host machine.  The user that you are logged into EG as is evidently not authorized to access "c:\" on the server.

Solution
‎04-13-2016 08:02 AM
SAS Super FREQ
Posts: 676

Re: How to output proc print to desktop from SAS EG Server?

Hi

As already mentioned the SAS Server can not see your local drives. However Enterprise Guide has the functionality to download results to your local computer. Follow the steps below.

 

  • In the properties of your code within Enterprise Guide, you can specify the output format you want like HTML, PDF etc.
  • when you run the code you will get an icon in your processflow representing the result.
  • Using your RightMouseButton on the result choose Export as step in project. This will allow you to download the result from the SAS server to your local computer.

 

Bruno

Frequent Contributor
Posts: 81

Re: How to output proc print to desktop from SAS EG Server?

Thank you Bruno - this is the best workaround solution for now.

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 7 replies
  • 725 views
  • 3 likes
  • 6 in conversation