BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
turcay
Lapis Lazuli | Level 10

Hello everyone,

 

I have a sample report as below. My purpose is to download the xml or xlsx file in my local PC from the server. I found Chris Hemedinger’s blog post on the internet but I couldn’t find the “Copy Files” task on Enterprise Guide 5.1 and he also showed for “Proc Export” procedure, I’m not sure whether “ods tagsets.ExcelXP” will work or not. I export the xml file as the following path on the server. “sas9/sasdata/....../Example.xml”. I can see the file on Enterprise Guide but I can’t open or copy to my Local PC from the server. I'd like to state that I have to use the “ods tagsets.ExcelXP”.

 

Chris Hemedinger’s post : http://blogs.sas.com/content/sasdummy/2013/05/20/export-and-download-any-file-from-sas-enterprise-gu...

 

ods html(id=1) file='server path' style=htmlblue
    options(page_break='no');
ods msoffice2k(id=2) file='server path' style=htmlblue
    options(page_break='no');
ods tagsets.excelxp(id=3) file='server path' style=htmlblue
    options(embedded_titles='no' sheet_interval='none' sheet_name='AllGroups');
ods excel(id=4) file='server path' style=htmlblue
    options(embedded_titles='no' sheet_interval='none' sheet_name='AllGroups');
proc sort data=sashelp.shoes out=shoes;
  by region subsidiary product;
  where product in ('Sandal' 'Boot' 'Slipper') and
        region in ('Asia', 'Pacific', 'Canada');
run;
** starting program;
proc report data=shoes 
     style(summary) = Header;
title '1) Without extra columns';
where product in ('Sandal' 'Boot' 'Slipper');
  column region subsidiary product,(sales returns calc);
  define region /group;
  define subsidiary / group;
  define product / across;
  define sales /sum f=dollar12.;
  define returns / sum f=dollar12.;
  define calc / computed f=dollar12.;
  break after region / summarize;
  compute after region;
     region = 'Sum';
	 line ' ';
  endcomp;
  compute calc;
     _c5_ = _c3_ - _c4_;
	 _c8_ = _c6_ - _c7_;
	 _c11_ = _c9_ - _c10_;
  endcomp;
run;
ods html(id=1) close;
ods msoffice2k(id=2) close;
ods tagsets.excelxp(id=3) close;
ods excel(id=4) close;
title;
options byline;

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

The custom task you need is linked from this blog post.  A few simple steps to download, copy to a special folder on your PC, and then EG can find the task.

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

View solution in original post

8 REPLIES 8
ChrisHemedinger
Community Manager

The custom task you need is linked from this blog post.  A few simple steps to download, copy to a special folder on your PC, and then EG can find the task.

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
turcay
Lapis Lazuli | Level 10

Unfortunately, I cannot use WinSCP, MobAxterm,Fillazilla, etc. because I'm working on customer place as an end user. They don't let us.

 

I tried to do 

SASKiwi
PROC Star

What about FTP? That command is part of Windows and Unix operating systems so you don't need to install anything. Its not as friendly as @ChrisHemedinger's solution though.

turcay
Lapis Lazuli | Level 10

Do you mean FTP code in SAS like following link?

 

http://support.sas.com/kb/43/962.html 

 

Can I pull the file by using SAS code?

 

Thanks

 

 

 

SASKiwi
PROC Star

To use FTP in SAS code you would need to be able to FTP from your SAS server to your PC. You need to find out the IP address or host name of your PC as the first step. 

ChrisHemedinger
Community Manager

Then, as a next step, you would need to be able to enable/start an FTP server on your local PC.  That's an unusual thing to do on most workstations -- and might not be permitted in a tightly controlled IT environment.

 

Not that I'm rooting for my own answer here (and the Copy Files task), but I know that if you decide to go with that, you'll be in good company.  Hundreds of other users now rely on that task -- and probably many more that I haven't heard from...

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
turcay
Lapis Lazuli | Level 10

Okay, Mr. Hemedinger,

 

I'm agree with you, your method is best solution according to current circumstances.

 

Thank you very much 🙂

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

CLI in SAS Viya

Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 8 replies
  • 7344 views
  • 6 likes
  • 4 in conversation