<?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 manipulate files in DS2? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-manipulate-files-in-DS2/m-p/970782#M377160</link>
    <description>&lt;UL&gt;
&lt;LI&gt;This is not HTTP, this is the SAS Viya File Service&lt;/LI&gt;
&lt;LI&gt;You would copy the file to the current working directory of your SAS process, which is (unless you change it explicitly in your code) different from WORK&lt;/LI&gt;
&lt;LI&gt;Massive parallelization of I/O can easily lead to an overload of your storage subsystem, resulting in serious overall performance degradation, and no net gain&lt;/LI&gt;
&lt;/UL&gt;</description>
    <pubDate>Tue, 15 Jul 2025 11:12:19 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2025-07-15T11:12:19Z</dc:date>
    <item>
      <title>How to manipulate files in DS2?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-manipulate-files-in-DS2/m-p/970777#M377155</link>
      <description>&lt;P&gt;I have an existing data step code to download a .sas7bdat table from http endpoint, and save it into the WORK library, and then read the data in it.&lt;/P&gt;&lt;P&gt;The code is like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="sas"&gt;filename cp_src filesrvc folderpath="/Public" name="hmeq_train.sas7bdat" recfm=N lrecl=32767;

* Save the table to work.hmeq_train;
filename cp_tgt "hmeq_train.sas7bdat" recfm=N lrecl=32767;

data _null_;
    fcopy('cp_src','cp_tgt');
run;

proc print data=work.hmeq_train;
run;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But this is in single thread. I have tens of binary .sas7bdat files needs to be downloaded at the same. I noticed that DS2 can leverage multi-thread ability to run program concurrently. But I tried fcopy() or INFILE statement, they both don't work in DS2.&lt;/P&gt;&lt;P&gt;Is there a way to do the same thing in DS2?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jul 2025 10:00:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-manipulate-files-in-DS2/m-p/970777#M377155</guid>
      <dc:creator>Jonas_Jing</dc:creator>
      <dc:date>2025-07-15T10:00:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to manipulate files in DS2?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-manipulate-files-in-DS2/m-p/970780#M377158</link>
      <description>&lt;P&gt;Since you are using&amp;nbsp;filesrvc method, it looks like your data are on your Viya server, is that right?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If those files located in a single directory?&lt;/P&gt;
&lt;P&gt;If yes you could use PROC COPY to get data from one location to another:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname a ".../Public";
proc copy in=A out=work;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If those files are in multiple locations you can create "combined" library, and also use PROC COPY:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname a (".../Public1" ".../Publuic2" ".../Public3");
proc copy in=A out=work;
run;
&lt;/CODE&gt;&lt;/PRE&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;Bart&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jul 2025 11:09:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-manipulate-files-in-DS2/m-p/970780#M377158</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2025-07-15T11:09:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to manipulate files in DS2?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-manipulate-files-in-DS2/m-p/970782#M377160</link>
      <description>&lt;UL&gt;
&lt;LI&gt;This is not HTTP, this is the SAS Viya File Service&lt;/LI&gt;
&lt;LI&gt;You would copy the file to the current working directory of your SAS process, which is (unless you change it explicitly in your code) different from WORK&lt;/LI&gt;
&lt;LI&gt;Massive parallelization of I/O can easily lead to an overload of your storage subsystem, resulting in serious overall performance degradation, and no net gain&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Tue, 15 Jul 2025 11:12:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-manipulate-files-in-DS2/m-p/970782#M377160</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2025-07-15T11:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to manipulate files in DS2?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-manipulate-files-in-DS2/m-p/970827#M377182</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/476239"&gt;@Jonas_Jing&lt;/a&gt;&amp;nbsp;- I think you have an IO issue with copying multiple files not a multi-threading restriction. I believe you could use SAS/CONNECT, which comes with Viya, and start several SAS sessions and simulaneously download multiple files that way.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jul 2025 20:52:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-manipulate-files-in-DS2/m-p/970827#M377182</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2025-07-15T20:52:15Z</dc:date>
    </item>
  </channel>
</rss>

