<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: how to download a directory of sas files to pc using sas studio (sas on demand) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-Download-a-directory-of-sas-files-SAS-Studio-amp-SAS-on/m-p/762810#M241553</link>
    <description>&lt;P&gt;Great suggestion,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;. I have pinned this for all users. Thanks for thinking of efficient ways to help our members!&lt;/P&gt;</description>
    <pubDate>Fri, 20 Aug 2021 11:36:00 GMT</pubDate>
    <dc:creator>ShelleySessoms</dc:creator>
    <dc:date>2021-08-20T11:36:00Z</dc:date>
    <item>
      <title>How to: Download a directory of sas files (SAS Studio &amp; SAS on demand)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Download-a-directory-of-sas-files-SAS-Studio-amp-SAS-on/m-p/761710#M241061</link>
      <description>&lt;P&gt;I have seen reference to using a zip file to download but not enough detail was included. Do I want to open up the interface or server? It opens to the same thing?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any suggestions or other ideas? Thank you.&lt;/P&gt;
&lt;P&gt;MM&lt;/P&gt;</description>
      <pubDate>Mon, 23 Aug 2021 00:40:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Download-a-directory-of-sas-files-SAS-Studio-amp-SAS-on/m-p/761710#M241061</guid>
      <dc:creator>MaryA_Marion</dc:creator>
      <dc:date>2021-08-23T00:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: how to download a directory of sas files to pc using sas studio (sas on demand)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Download-a-directory-of-sas-files-SAS-Studio-amp-SAS-on/m-p/761715#M241065</link>
      <description>&lt;P&gt;Are you using SAS studio to access SAS or Viya?&amp;nbsp; Viya does not appear to really have a file system so it will probably be harder to use a non-SAS tool to move files.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is probably easier to upload/download a lot of files using a different user interface than SAS/Studio.&lt;/P&gt;
&lt;P&gt;Do you have access to a file system that the server(s) that SAS/Studio is using to run SAS code lives on?&amp;nbsp; Perhaps you could even connect your personal computer to one of the file systems that the SAS server is using and just use your native file copy methods.&amp;nbsp; Otherwise you could use an interactive tool (like the FILEZILLA that you appear to be asking about).&amp;nbsp; Essentially you just need to know what is the path that the files have on the server where SAS is running and move the files from there.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are forced to use SAS/Studio itself to move the files then it might help to create a ZIP file first and then you only need to copy the one file.&amp;nbsp; &amp;nbsp;You you might be able to use SAS code to create a ZIP file.&amp;nbsp; For example if you had a lot of text files on your&amp;nbsp; SAS server in a particular folder you could make a SAS file that contains those files with a data step like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename in 'path to files';
filename out zip 'filename of new zip file';
data _null_;
  length fname mname $256 ;
  infile in('*') filename=fname ;
  input;
  mname = scan(fname,-1,'/\');

  file out member=mname ;
  put _infile_;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Aug 2021 00:09:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Download-a-directory-of-sas-files-SAS-Studio-amp-SAS-on/m-p/761715#M241065</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-08-16T00:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: how to download a directory of sas files to pc using sas studio (sas on demand)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Download-a-directory-of-sas-files-SAS-Studio-amp-SAS-on/m-p/761717#M241066</link>
      <description>I installed fileZilla but do not know how to complete the connection to sas studio in sas on demand. Please see enclosed file. Thank you. MM</description>
      <pubDate>Mon, 16 Aug 2021 01:00:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Download-a-directory-of-sas-files-SAS-Studio-amp-SAS-on/m-p/761717#M241066</guid>
      <dc:creator>MaryA_Marion</dc:creator>
      <dc:date>2021-08-16T01:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: how to download a directory of sas files to pc using sas studio (sas on demand)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Download-a-directory-of-sas-files-SAS-Studio-amp-SAS-on/m-p/761718#M241067</link>
      <description>&lt;P&gt;The directory of sas files I want to download is sasmacs2 in my home directory. I am getting error messages when using your code. It asks me for fname and mname. I am not certain what to enter in there?&lt;/P&gt;
&lt;P&gt;MM&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 01:25:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Download-a-directory-of-sas-files-SAS-Studio-amp-SAS-on/m-p/761718#M241067</guid>
      <dc:creator>MaryA_Marion</dc:creator>
      <dc:date>2021-08-16T01:25:02Z</dc:date>
    </item>
    <item>
      <title>Re: how to download a directory of sas files to pc using sas studio (sas on demand)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Download-a-directory-of-sas-files-SAS-Studio-amp-SAS-on/m-p/761723#M241069</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16492"&gt;@MaryA_Marion&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;I installed fileZilla but do not know how to complete the connection to sas studio in sas on demand. Please see enclosed file. Thank you. MM&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I was talking about connecting to some server in your company that you were using to run SAS.&lt;/P&gt;
&lt;P&gt;Are you sure that SAS will allow you to connect to the server where SAS runs for SAS Studio on Demand without using SAS/Studio?&amp;nbsp; I would be surprised if they did that.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 01:52:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Download-a-directory-of-sas-files-SAS-Studio-amp-SAS-on/m-p/761723#M241069</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-08-16T01:52:28Z</dc:date>
    </item>
    <item>
      <title>Re: how to download a directory of sas files to pc using sas studio (sas on demand)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Download-a-directory-of-sas-files-SAS-Studio-amp-SAS-on/m-p/761726#M241071</link>
      <description>&lt;P&gt;Filezilla requires an FTP server. Unless one has been installed, you can't use that.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 03:40:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Download-a-directory-of-sas-files-SAS-Studio-amp-SAS-on/m-p/761726#M241071</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-08-16T03:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: how to download a directory of sas files to pc using sas studio (sas on demand)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Download-a-directory-of-sas-files-SAS-Studio-amp-SAS-on/m-p/761727#M241072</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;nbsp;It asks me for fname and mname.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;What does &lt;EM&gt;ask&lt;/EM&gt; mean?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;EM&gt;fname&lt;/EM&gt; and &lt;EM&gt;mname&lt;/EM&gt; are populated&amp;nbsp;automatically&amp;nbsp;when you run the program.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Show use what you are doing.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 03:42:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Download-a-directory-of-sas-files-SAS-Studio-amp-SAS-on/m-p/761727#M241072</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-08-16T03:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: how to download a directory of sas files to pc using sas studio (sas on demand)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Download-a-directory-of-sas-files-SAS-Studio-amp-SAS-on/m-p/761817#M241122</link>
      <description>&lt;PRE&gt;filename in '/home/u.../sasmacs2';
filename out zip 'sasmacs2';
data _null_;
  length fname mname $256 ;
  infile in('*') filename=fname ;
  input;
  mname = scan(fname,-1,'/\');
  file out member=mname;
  put _infile_;
run;&lt;/PRE&gt;
&lt;P&gt;Please see log below. I am trying to keep my u number private so you&amp;nbsp;will see ... on the page. I ran the source code while in sasmacs2 directory and while in the home directory with same results.&lt;/P&gt;
&lt;PRE&gt; 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 SYMBOLGEN:  Macro variable _SASWSTEMP_ resolves to 
/home/u.../.sasstudio/.images/fefa4007-e77f-4646-84e3-e47c3f4b
23b8
 SYMBOLGEN:  Some characters in the above value which were subject to macro 
quoting have been unquoted for printing.
 SYMBOLGEN:  Macro variable GRAPHINIT resolves to GOPTIONS RESET=ALL 
GSFNAME=_GSFNAME;
 68
 69
 70
 71
 72
 73filename in '/home/u.../sasmacs2'; filename out zip 'sasmacs2';data _null_;
 74length fname mname $256 ;
 75infile in('*') filename=fname ;
 76input;
 77mname = scan(fname,-1,'/\');
 78file out member=mname;
 79put _infile_;
 80run;

 NOTE: The infile library IN is:

Directory=/home/u.../sasmacs2, Owner Name=u...,Group Name=oda, Access Permission=drwxr-xr-x,Last Modified=16Aug2021:22:42:00

 NOTE: The infile IN('*') is:

Filename=/home/u.../sasmacs2/DevianceTable.sas, File List=/home/u.../sasmacs2/*,Owner Name=u...,Group Name=oda,Access Permission=-rw-r--r--,Last Modified=25Jul2021:13:06:47,File Size (bytes)=410

 ERROR: Insufficient authorization to access sasmacs2.
 NOTE: A total of 0 records were read from the infile library IN.
 NOTE: 0 records were read from the infile IN('*').
 NOTE: The SAS System stopped processing this step because of errors.
 NOTE: DATA statement used (Total process time):
real time0.05 seconds
user cpu time0.01 seconds
system cpu time     0.02 seconds
memory578.59k
OS Memory24224.00k
Timestamp08/17/2021 01:51:55 PM
Step Count39  Switch Count  0
Page Faults0
Page Reclaims90
Page Swaps0
Voluntary Context Switches255
Involuntary Context Switches      0
Block Input Operations8
Block Output Operations8


 81
 82         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 SYMBOLGEN:  Macro variable GRAPHTERM resolves to GOPTIONS NOACCESSIBLE;
 92

&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 14:05:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Download-a-directory-of-sas-files-SAS-Studio-amp-SAS-on/m-p/761817#M241122</guid>
      <dc:creator>MaryA_Marion</dc:creator>
      <dc:date>2021-08-17T14:05:16Z</dc:date>
    </item>
    <item>
      <title>Re: how to download a directory of sas files to pc using sas studio (sas on demand)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Download-a-directory-of-sas-files-SAS-Studio-amp-SAS-on/m-p/762114#M241251</link>
      <description>I thought Filezilla was the FTP server. How do I get one? I have no experience with this except I once used CUTE ftp successfully.</description>
      <pubDate>Tue, 17 Aug 2021 16:10:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Download-a-directory-of-sas-files-SAS-Studio-amp-SAS-on/m-p/762114#M241251</guid>
      <dc:creator>MaryA_Marion</dc:creator>
      <dc:date>2021-08-17T16:10:42Z</dc:date>
    </item>
    <item>
      <title>Re: how to download a directory of sas files to pc using sas studio (sas on demand)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Download-a-directory-of-sas-files-SAS-Studio-amp-SAS-on/m-p/762181#M241279</link>
      <description>&lt;P&gt;A browser client needs to connect to a web server, just like an FTP client like Filezilla needs to connect to an FTP server.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your IT team typically manages such servers.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 21:55:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Download-a-directory-of-sas-files-SAS-Studio-amp-SAS-on/m-p/762181#M241279</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-08-17T21:55:51Z</dc:date>
    </item>
    <item>
      <title>Re: how to download a directory of sas files to pc using sas studio (sas on demand)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Download-a-directory-of-sas-files-SAS-Studio-amp-SAS-on/m-p/762195#M241290</link>
      <description>Okay let us say that I use cuteFTP as my file server. I will have to log&lt;BR /&gt;into it using a password. I don't want to purchase that software without&lt;BR /&gt;being reasonably certain that it will work with the SAS server. The big&lt;BR /&gt;question I have is how will cuteFTP interface with my online&lt;BR /&gt;directories? Will SAS make that possible?&lt;BR /&gt;MM&lt;BR /&gt;</description>
      <pubDate>Tue, 17 Aug 2021 23:11:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Download-a-directory-of-sas-files-SAS-Studio-amp-SAS-on/m-p/762195#M241290</guid>
      <dc:creator>MaryA_Marion</dc:creator>
      <dc:date>2021-08-17T23:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: how to download a directory of sas files to pc using sas studio (sas on demand)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Download-a-directory-of-sas-files-SAS-Studio-amp-SAS-on/m-p/762197#M241291</link>
      <description>&lt;P&gt;As I understand it you are using SAS on Demand which operates in a locked down state with limited user permissions. So the errors you are getting are not surprising. You would be best to talk with SAS Tech Support to find out what you can and can't do in SAS on Demand.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 23:12:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Download-a-directory-of-sas-files-SAS-Studio-amp-SAS-on/m-p/762197#M241291</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-08-17T23:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: how to download a directory of sas files to pc using sas studio (sas on demand)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Download-a-directory-of-sas-files-SAS-Studio-amp-SAS-on/m-p/762199#M241293</link>
      <description>&lt;PRE&gt;filename out zip 'sasmacs2';&lt;/PRE&gt;
&lt;P&gt;Try providing the full path, to a folder where you can write.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 23:24:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Download-a-directory-of-sas-files-SAS-Studio-amp-SAS-on/m-p/762199#M241293</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-08-17T23:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: how to download a directory of sas files to pc using sas studio (sas on demand)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Download-a-directory-of-sas-files-SAS-Studio-amp-SAS-on/m-p/762566#M241462</link>
      <description>&lt;P&gt;Thanks to all of you for your help. I've got the following response from SAS. "&lt;SPAN&gt;Since SAS OnDemand for Academics is a free learning software it does have some limitations as to it's capabilities and unfortunately, SAS OnDemand for Academics is not able to be used with FTP."&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have gotten SAS code to create a zip file. However, it is not opening properly using WinZip on my PC. I'm enclosing the code for you to see as well as the error message on my PC. There are no errors in the log. Zip file was downloaded using the download icon in SAS Studio.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SOURCE&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename in '/home/u.../sasmacs2';
filename out zip '/home/u.../sasmacs2.zip';
data _null_;
length fname mname $256 ;
infile in('*') filename=fname ;
input;
mname = scan(fname,-1,'/\');
file out member=mname;
put _infile_;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Log:&lt;/P&gt;
&lt;PRE&gt;1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK; SYMBOLGEN: Macro variable _SASWSTEMP_ resolves to /home/u.../.sasstudio/.images/be90d0a4-57bd-49ef-8e8f-e451f5e9 6f06 SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been unquoted for printing. SYMBOLGEN: Macro variable GRAPHINIT resolves to GOPTIONS RESET=ALL
78GSFNAME=_GSFNAME;filename in '/home/u.../sasmacs2'; filename out zip '/home/u.../sasmacs2.zip'; data _null_;length fname mname $256 ;infile in('*') filename=fname ;input;mname = scan(fname,-1,'/\');file out member=mname;put _infile_;run;
NOTE: The infile library IN is:
Directory=/home/u.../sasmacs2, Owner Name=u...,Group Name=oda, Access Permission=drwxr-xr-x,Last Modified=17Aug2021:15:21:32
NOTE: The infile IN('*') is:
Filename=/home/u.../sasmacs2/DevianceTable.sas, File List=/home/u.../sasmacs2/*,Owner Name=u...,Group Name=oda,Access Permission=-rw-r--r--,Last Modified=25Jul2021:13:06:47,File Size (bytes)=410
NOTE: The file OUT is:Filename=/home/u...sasmacs2.zip NOTE: The infile IN('*') is:
Filename= ... &lt;BR /&gt;&lt;BR /&gt;NOTE: 72 records were read from the infile IN('*').&lt;BR /&gt;The minimum record length was 0.&lt;BR /&gt;The maximum record length was 83.&lt;BR /&gt;NOTE: 8430 records were written to the file OUT.&lt;BR /&gt;The minimum record length was 0.&lt;BR /&gt;The maximum record length was 32767.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.17 seconds&lt;BR /&gt;user cpu time 0.01 seconds&lt;BR /&gt;system cpu time 0.04 seconds&lt;BR /&gt;memory 1083.37k&lt;BR /&gt;OS Memory 20640.00k&lt;BR /&gt;Timestamp 08/19/2021 02:37:22 PM&lt;BR /&gt;Step Count 53 Switch Count 0&lt;BR /&gt;Page Faults 0&lt;BR /&gt;Page Reclaims 249&lt;BR /&gt;Page Swaps 0&lt;BR /&gt;Voluntary Context Switches 333&lt;BR /&gt;Involuntary Context Switches 0&lt;BR /&gt;Block Input Operations 0&lt;BR /&gt;Block Output Operations 96&lt;BR /&gt;81 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;BR /&gt;SYMBOLGEN: Macro variable GRAPHTERM resolves to GOPTIONS NOACCESSIBLE;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;
&lt;P&gt;MM&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Aug 2021 15:33:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Download-a-directory-of-sas-files-SAS-Studio-amp-SAS-on/m-p/762566#M241462</guid>
      <dc:creator>MaryA_Marion</dc:creator>
      <dc:date>2021-08-19T15:33:22Z</dc:date>
    </item>
    <item>
      <title>Re: how to download a directory of sas files to pc using sas studio (sas on demand)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Download-a-directory-of-sas-files-SAS-Studio-amp-SAS-on/m-p/762572#M241466</link>
      <description>&lt;P&gt;Use MEMVAR= option, not MEMBER= option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that doesn't work then try using DOPEN() DNUM(), DREAD() to get the list of files instead.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename indir '/home/u.../sasmacs2';
filename out zip '/home/u.../sasmacs2.zip';
data _null_;
  length fname mname $256 ;
  did=dopen('indir');
  putlog did=;
  do i=1 to dnum(did) ;
     mname=dread(did,i);
     if scan(mname,-1,'.')='sas' then do;
       n+1;
       putlog n= mname= ;
       fname=catx('/',pathname('indir'),mname);
       infile dummy filevar=fname end=eof;
       file out memvar=mname;
       do while (not eof);
         input ;
         put _infile_;
       end;
     end;
  end;
  did=dclose(did);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 19 Aug 2021 15:40:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Download-a-directory-of-sas-files-SAS-Studio-amp-SAS-on/m-p/762572#M241466</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-08-19T15:40:57Z</dc:date>
    </item>
    <item>
      <title>Re: how to download a directory of sas files to pc using sas studio (sas on demand)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Download-a-directory-of-sas-files-SAS-Studio-amp-SAS-on/m-p/762588#M241470</link>
      <description>&lt;P&gt;&lt;SPAN&gt;The suggestion Use MEMVAR= option, not MEMBER= option worked just fine. Thank you. MM&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Aug 2021 16:27:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Download-a-directory-of-sas-files-SAS-Studio-amp-SAS-on/m-p/762588#M241470</guid>
      <dc:creator>MaryA_Marion</dc:creator>
      <dc:date>2021-08-19T16:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: how to download a directory of sas files to pc using sas studio (sas on demand)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Download-a-directory-of-sas-files-SAS-Studio-amp-SAS-on/m-p/762722#M241515</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/34537"&gt;@BeverlyBrown&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/14323"&gt;@ShelleySessoms&lt;/a&gt; This question comes regularly and this thread might make a good pinned topic?&lt;/P&gt;</description>
      <pubDate>Fri, 20 Aug 2021 00:27:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Download-a-directory-of-sas-files-SAS-Studio-amp-SAS-on/m-p/762722#M241515</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-08-20T00:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: how to download a directory of sas files to pc using sas studio (sas on demand)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Download-a-directory-of-sas-files-SAS-Studio-amp-SAS-on/m-p/762810#M241553</link>
      <description>&lt;P&gt;Great suggestion,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;. I have pinned this for all users. Thanks for thinking of efficient ways to help our members!&lt;/P&gt;</description>
      <pubDate>Fri, 20 Aug 2021 11:36:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Download-a-directory-of-sas-files-SAS-Studio-amp-SAS-on/m-p/762810#M241553</guid>
      <dc:creator>ShelleySessoms</dc:creator>
      <dc:date>2021-08-20T11:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to: Download a directory of sas files (SAS Studio &amp; SAS on demand)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Download-a-directory-of-sas-files-SAS-Studio-amp-SAS-on/m-p/848249#M335360</link>
      <description>&lt;P&gt;To download a directory of SAS files using SAS Studio or SAS on Demand, you can use the following steps:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Open SAS Studio or SAS on Demand in your web browser.&lt;/LI&gt;
&lt;LI&gt;Navigate to the directory that contains the SAS files you want to download.&lt;/LI&gt;
&lt;LI&gt;Select the SAS files you want to download by clicking on the checkbox next to each file.&lt;/LI&gt;
&lt;LI&gt;Click on the "Download" button in the toolbar at the top of the page.&lt;/LI&gt;
&lt;LI&gt;In the "Download" window that appears, select the "Zip" option and click on the "Download" button.&lt;/LI&gt;
&lt;LI&gt;The zip file containing the SAS files will be downloaded to your computer.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;SPAN&gt;Alternatively, you can use the "zip" command in SAS to create a zip file containing the SAS files. To do this, you will need to use the following code:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename myfiles pipe "zip -r - myfiles.zip *.sas";
data null;
infile myfiles recfm=f lrecl=32767;
input;
file myfiles;
put infile;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;Replace "myfiles" with the name of the directory that contains the SAS files you want to download. This code will create a zip file called "myfiles.zip" that contains all the SAS files in the specified directory. You can then download the zip file to your computer using the "Download" button in SAS Studio or SAS on Demand.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2022 01:06:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Download-a-directory-of-sas-files-SAS-Studio-amp-SAS-on/m-p/848249#M335360</guid>
      <dc:creator>webart999ARM</dc:creator>
      <dc:date>2022-12-07T01:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to: Download a directory of sas files (SAS Studio &amp; SAS on demand)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Download-a-directory-of-sas-files-SAS-Studio-amp-SAS-on/m-p/873827#M345234</link>
      <description>&lt;P&gt;Hey All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The solution is here for *.sas files &lt;EM&gt;but&lt;/EM&gt; sometimes there is a need for zipping a library of SAS datasets. I thought I share my solution for such task.&lt;/P&gt;
&lt;P&gt;The &lt;STRONG&gt;&lt;A href="https://github.com/SASPAC/baseplus" target="_self"&gt;BasePlus package&lt;/A&gt;&amp;nbsp;&lt;/STRONG&gt;contains two macros dedicated to zipping and unzipping a library of datasets.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to get basePlus package? I will write below, for now assume we already have it installed and loaded into our SAS session.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The zipping macro &lt;STRONG&gt;&lt;A href="https://github.com/SASPAC/baseplus/blob/main/baseplus.md#ziplibrary-macro" target="_self"&gt;%zipLibrary()&lt;/A&gt;&lt;/STRONG&gt; allows to zip all data sets (v7, v8, or v9 with indexes) from SAS library into one zip file:&lt;/P&gt;
&lt;P&gt;Lets generate some example data:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options dlcreatedir;
  libname test1 "%workpath()/test1";
  libname test2 "%workpath()/test2";
  libname test3 (test1 test2);
  libname test4 "%workpath()/test4";
options nodlcreatedir;

%put %libPath(test3);
%put %libPath(test4);

data 
  test1.A(index=(model)) 
  test1.B(where=(Origin="Asia")) 
  test2.C 
  test2.D(where=(Origin NE "Asia") index=(model make io=(invoice origin))) 
;
  set sashelp.cars;
run;

data test1.B2 / view=test1.B2;
  set test1.B;
  output;
  output;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(the &lt;A href="https://github.com/SASPAC/baseplus/blob/main/baseplus.md#libpath-macro" target="_self"&gt;%libPath()&lt;/A&gt;&amp;nbsp;and &lt;A href="https://github.com/SASPAC/baseplus/blob/main/baseplus.md#workpath-macro" target="_self"&gt;%workpath()&lt;/A&gt; are utility macros in BasePlus package).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To &lt;U&gt;zip all datasets&lt;/U&gt; from test3 library and store the zip file in test4 library just execute:&lt;/P&gt;
&lt;PRE&gt;%zipLibrary(test3, libOut=test4)&lt;/PRE&gt;
&lt;P&gt;as a result you will get test3.zip file inside the test4 library.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When the zip is ready you can just copy it whenever you want and unzip it by hand (with 7zip for example) &lt;STRONG&gt;or&lt;/STRONG&gt; you can use the &lt;STRONG&gt;&lt;A href="https://github.com/SASPAC/baseplus/blob/main/baseplus.md#unziplibrary-macro" target="_self"&gt;%unzipLibrary()&lt;/A&gt;&lt;/STRONG&gt; macro:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%unzipLibrary(%libPath(test4), zip=test3)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;As a result you will get all elements from the test3.zip extracted into the test4 library location.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS How to get BasePlus?&lt;/P&gt;
&lt;P&gt;To work with SAS Packages like &lt;A href="https://github.com/orgs/SASPAC/repositories" target="_self"&gt;BasePlus or others&lt;/A&gt; you will need &lt;STRONG&gt;&lt;A href="https://github.com/yabwon/SAS_PACKAGES" target="_self"&gt;SAS Packages Framework&lt;/A&gt;&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Lets assume your SAS session has access to the internet (if not look below).&lt;/P&gt;
&lt;P&gt;1) Create a directory where you want to store SPF and packages, for example let it be:&amp;nbsp;&lt;CODE class=" language-sas"&gt;"/home/myuserid/SASpackages"&lt;/CODE&gt;&amp;nbsp;under Linux or &lt;CODE class=" language-sas"&gt;"C:\Users\myuserid\SASpackages"&lt;/CODE&gt;&amp;nbsp;under Windows.&lt;/P&gt;
&lt;P&gt;2) Run the following code only one time to get the SPF:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename packages "/home/myuserid/SASpackages"; /* setup directory for packages */
filename SPFinit url "https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/main/SPF/SPFinit.sas";
%include SPFinit; /* enable the framework */

%installPackage(SPFinit) /* install SPF */
%installPackage(BasePlus) /* install BasePlus */&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;(installation of other packages goes the same way - by installPackage macro).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3) From now on, in this and any new SAS session, to enable SPF and BasePlus just run:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename packages "/home/myuserid/SASpackages"; /* setup directory for packages */
%include packages(SPFinit.sas); /* enable the framework */

%loadPackage(BasePlus)    /* load the package content into the SAS session */&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;4) Enjoy&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS2&lt;/P&gt;
&lt;P&gt;No access to the internet on your machine? No problem! Instead step number 2 go &lt;A href="https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF" target="_self"&gt;here&lt;/A&gt; and manually download &lt;EM&gt;SPFinit.sas&lt;/EM&gt; file. Then go to &lt;A href="https://github.com/SASPAC/baseplus" target="_self"&gt;here&lt;/A&gt; and download &lt;EM&gt;baseplus.zip&lt;/EM&gt; file. Store them in the directory from step 1 and proceed to step 3.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2023 08:42:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Download-a-directory-of-sas-files-SAS-Studio-amp-SAS-on/m-p/873827#M345234</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2023-05-04T08:42:24Z</dc:date>
    </item>
  </channel>
</rss>

