<?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: infile multiple file by common file with date and no file extension in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/infile-multiple-file-by-common-file-with-date-and-no-file/m-p/408530#M99752</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/134236"&gt;@sagulolo&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi KurtBremser,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just clarification, &lt;SPAN&gt;IWA &lt;/SPAN&gt;means&amp;nbsp;Integrated Windows Authentication?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yes.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;BR /&gt;
&lt;P&gt;Actually&amp;nbsp;I'm able to access the share folder, but SAS session is not necessary able to access, right?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yes, Windows can be tricky on how permissions are propagated over different environments (client/server, batch/interactive) for a given user.&lt;/P&gt;
&lt;P&gt;A SAS workspace server runs as "batch", while a cmd window is "interactive".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If IWA is actually the culprit needs to be determined, but it often was the reason when similar questions were posted here.&lt;/P&gt;
&lt;P&gt;Disclaimer: I'm a UNIX expert, so I'm not versed at all in the intricacies of Windows authorization/permissions.&lt;/P&gt;</description>
    <pubDate>Mon, 30 Oct 2017 09:16:00 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2017-10-30T09:16:00Z</dc:date>
    <item>
      <title>infile multiple file by common file with date and no file extension</title>
      <link>https://communities.sas.com/t5/SAS-Programming/infile-multiple-file-by-common-file-with-date-and-no-file/m-p/408502#M99743</link>
      <description>&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Need advice from your all, I have a raw file from sharefolder with a common name and follow by date(yymmdd), the file have no extension something like below:-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;name_171030&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;have a difficulty to import a range of file into SAS Dataset. How do i import file range from name_171001 till name_171031?&lt;/P&gt;&lt;P&gt;How to infile common file like [name1_171001 till &lt;SPAN&gt;name1_&lt;/SPAN&gt;171031] and [name2_171001 till name2_171031]?&lt;/P&gt;&lt;P&gt;I have code infile as per below:-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;infile 'dir \\sharefolder\* /s /b' pipe truncover;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try below but not success&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;infile 'dir \\sharefolder\name_1710* /s /b' pipe truncover; &amp;nbsp; &amp;nbsp;***no record was retrieved&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;infile 'dir \\sharefolder\name_1710*.* /s /b' pipe truncover; &amp;nbsp; ***no record was retrieved&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you in advance&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2017 07:47:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/infile-multiple-file-by-common-file-with-date-and-no-file/m-p/408502#M99743</guid>
      <dc:creator>sagulolo</dc:creator>
      <dc:date>2017-10-30T07:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: infile multiple file by common file with date and no file extension</title>
      <link>https://communities.sas.com/t5/SAS-Programming/infile-multiple-file-by-common-file-with-date-and-no-file/m-p/408507#M99744</link>
      <description>&lt;P&gt;Does the same directory listing provide a result when run from the commandline?&lt;/P&gt;
&lt;P&gt;Also try the following:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename oscmd pipe "dir \\sharefolder\name_1710* /s /b 2&amp;gt;&amp;amp;1";

data _null_;
infile oscmd;
input;
put _infile_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;to see if you get &lt;EM&gt;any&lt;/EM&gt; result from the command in the SAS log.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2017 08:05:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/infile-multiple-file-by-common-file-with-date-and-no-file/m-p/408507#M99744</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-10-30T08:05:53Z</dc:date>
    </item>
    <item>
      <title>Re: infile multiple file by common file with date and no file extension</title>
      <link>https://communities.sas.com/t5/SAS-Programming/infile-multiple-file-by-common-file-with-date-and-no-file/m-p/408511#M99745</link>
      <description>&lt;P&gt;Hi KurtBremser,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;no record was retrieved.&lt;/P&gt;&lt;P&gt;Checked the log and I get below:-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: The infile OSCMD is:&lt;BR /&gt;Unnamed Pipe Access Device,&lt;BR /&gt;PROCESS=dir \\sharefolder\name_1710* /s /b 2&amp;gt;&amp;amp;1,&lt;BR /&gt;RECFM=V,LRECL=32767&lt;/P&gt;&lt;P&gt;NOTE: 1 record was read from the infile OSCMD.&lt;BR /&gt;The minimum record length was 17.&lt;BR /&gt;The maximum record length was 17.&lt;BR /&gt;NOTE: SAS went to a new line when INPUT statement reached past the end of a line.&lt;BR /&gt;NOTE: The data set WORK.MULTIPLE_CMC_FITAS has 0 observations and 33 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.21 seconds&lt;BR /&gt;cpu time 0.03 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2017 08:21:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/infile-multiple-file-by-common-file-with-date-and-no-file/m-p/408511#M99745</guid>
      <dc:creator>sagulolo</dc:creator>
      <dc:date>2017-10-30T08:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: infile multiple file by common file with date and no file extension</title>
      <link>https://communities.sas.com/t5/SAS-Programming/infile-multiple-file-by-common-file-with-date-and-no-file/m-p/408513#M99746</link>
      <description>&lt;P&gt;You obvioulsy did not run my code as posted. My code does NOT produce a dataset, but it writes &lt;EM&gt;everything&lt;/EM&gt; that it receives from the external command to the log. Please RUN MY CODE AS POSTED, and look at the log. Since 1 record was read from the infile, I guess it's the error message that we're looking for.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2017 08:24:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/infile-multiple-file-by-common-file-with-date-and-no-file/m-p/408513#M99746</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-10-30T08:24:17Z</dc:date>
    </item>
    <item>
      <title>Re: infile multiple file by common file with date and no file extension</title>
      <link>https://communities.sas.com/t5/SAS-Programming/infile-multiple-file-by-common-file-with-date-and-no-file/m-p/408515#M99747</link>
      <description>&lt;P&gt;Hi KurtBremser,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Apologize as i posted my version log to you.&lt;/P&gt;&lt;P&gt;FYI, dir address was amended.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please refer below:-&lt;/P&gt;&lt;P&gt;NOTE: The infile OSCMD is:&lt;BR /&gt;Unnamed Pipe Access Device,&lt;BR /&gt;PROCESS=dir \\sharefolder\NAME_1710* /s /b 2&amp;gt;&amp;amp;1,&lt;BR /&gt;RECFM=V,LRECL=32767&lt;/P&gt;&lt;P&gt;Access is denied.&lt;BR /&gt;NOTE: 1 record was read from the infile OSCMD.&lt;BR /&gt;The minimum record length was 17.&lt;BR /&gt;The maximum record length was 17.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.33 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please advice.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2017 08:28:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/infile-multiple-file-by-common-file-with-date-and-no-file/m-p/408515#M99747</guid>
      <dc:creator>sagulolo</dc:creator>
      <dc:date>2017-10-30T08:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: infile multiple file by common file with date and no file extension</title>
      <link>https://communities.sas.com/t5/SAS-Programming/infile-multiple-file-by-common-file-with-date-and-no-file/m-p/408520#M99749</link>
      <description>&lt;PRE&gt;Access is denied.&lt;/PRE&gt;
&lt;P&gt;This is what we were aiming for. In the context of your SAS session, you do not have access to the resource in question. Since you seem to be on a Windows server, this might have to be fixed on the IWA side.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2017 08:42:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/infile-multiple-file-by-common-file-with-date-and-no-file/m-p/408520#M99749</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-10-30T08:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: infile multiple file by common file with date and no file extension</title>
      <link>https://communities.sas.com/t5/SAS-Programming/infile-multiple-file-by-common-file-with-date-and-no-file/m-p/408527#M99750</link>
      <description>&lt;P&gt;Hi KurtBremser,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just clarification, &lt;SPAN&gt;IWA &lt;/SPAN&gt;means&amp;nbsp;Integrated Windows Authentication? Means i need to refer to folder owner?&lt;/P&gt;&lt;P&gt;Actually&amp;nbsp;I'm able to access the share folder, but SAS session is not necessary able to access, right?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2017 09:01:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/infile-multiple-file-by-common-file-with-date-and-no-file/m-p/408527#M99750</guid>
      <dc:creator>sagulolo</dc:creator>
      <dc:date>2017-10-30T09:01:55Z</dc:date>
    </item>
    <item>
      <title>Re: infile multiple file by common file with date and no file extension</title>
      <link>https://communities.sas.com/t5/SAS-Programming/infile-multiple-file-by-common-file-with-date-and-no-file/m-p/408530#M99752</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/134236"&gt;@sagulolo&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi KurtBremser,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just clarification, &lt;SPAN&gt;IWA &lt;/SPAN&gt;means&amp;nbsp;Integrated Windows Authentication?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yes.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;BR /&gt;
&lt;P&gt;Actually&amp;nbsp;I'm able to access the share folder, but SAS session is not necessary able to access, right?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yes, Windows can be tricky on how permissions are propagated over different environments (client/server, batch/interactive) for a given user.&lt;/P&gt;
&lt;P&gt;A SAS workspace server runs as "batch", while a cmd window is "interactive".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If IWA is actually the culprit needs to be determined, but it often was the reason when similar questions were posted here.&lt;/P&gt;
&lt;P&gt;Disclaimer: I'm a UNIX expert, so I'm not versed at all in the intricacies of Windows authorization/permissions.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2017 09:16:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/infile-multiple-file-by-common-file-with-date-and-no-file/m-p/408530#M99752</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-10-30T09:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: infile multiple file by common file with date and no file extension</title>
      <link>https://communities.sas.com/t5/SAS-Programming/infile-multiple-file-by-common-file-with-date-and-no-file/m-p/408542#M99756</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/134236"&gt;@sagulolo&lt;/a&gt;:&lt;/P&gt;&lt;P&gt;I am not sure that you need to use an operating system command to get the file names. Just use wildcards in a file name:&lt;/P&gt;&lt;PRE&gt;data want;
  infile '\\sharefolder\name_1710??.';&lt;BR /&gt;  input....&lt;/PRE&gt;&lt;P&gt;If you need to know which data came from which file, you can use the FILENAME= option on your infile statement.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2017 10:04:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/infile-multiple-file-by-common-file-with-date-and-no-file/m-p/408542#M99756</guid>
      <dc:creator>s_lassen</dc:creator>
      <dc:date>2017-10-30T10:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: infile multiple file by common file with date and no file extension</title>
      <link>https://communities.sas.com/t5/SAS-Programming/infile-multiple-file-by-common-file-with-date-and-no-file/m-p/408729#M99815</link>
      <description>&lt;P&gt;Try using WildCards and the concepts here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-do-I-write-a-macro-to-import-multiple-text-files-that-have/ta-p/223627" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-do-I-write-a-macro-to-import-multiple-text-files-that-have/ta-p/223627&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2017 15:09:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/infile-multiple-file-by-common-file-with-date-and-no-file/m-p/408729#M99815</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-10-30T15:09:15Z</dc:date>
    </item>
    <item>
      <title>Re: infile multiple file by common file with date and no file extension</title>
      <link>https://communities.sas.com/t5/SAS-Programming/infile-multiple-file-by-common-file-with-date-and-no-file/m-p/408977#M99886</link>
      <description>&lt;P&gt;Hi s_lassen,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;tried the code and no record was retrieved.&lt;/P&gt;&lt;P&gt;checked the log and saw message below:-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Stderr output:&lt;BR /&gt;Access is denied.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2017 04:13:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/infile-multiple-file-by-common-file-with-date-and-no-file/m-p/408977#M99886</guid>
      <dc:creator>sagulolo</dc:creator>
      <dc:date>2017-10-31T04:13:54Z</dc:date>
    </item>
    <item>
      <title>Re: infile multiple file by common file with date and no file extension</title>
      <link>https://communities.sas.com/t5/SAS-Programming/infile-multiple-file-by-common-file-with-date-and-no-file/m-p/408979#M99887</link>
      <description>&lt;P&gt;Hi Reeza,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank for the sample, but my issue is unable to read from sharefolder(as describe by KurtBremser).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2017 04:49:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/infile-multiple-file-by-common-file-with-date-and-no-file/m-p/408979#M99887</guid>
      <dc:creator>sagulolo</dc:creator>
      <dc:date>2017-10-31T04:49:32Z</dc:date>
    </item>
  </channel>
</rss>

