<?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: Refer to all files in a path in SAS with &amp;quot;path/*.xlsx&amp;quot; in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Refer-to-all-files-in-a-path-in-SAS-with-quot-path-xlsx-quot/m-p/799325#M33159</link>
    <description>&lt;P&gt;It seems that the macro no longer gives me errors, but nevertheless these errors appear, could you tell me what they are due to? thank you very much in advance for everything&lt;/P&gt;
&lt;PRE&gt;NOTE: Table WORK.DATA2 se ha suprimido.
2         + 
%mp_dirlist(path=/modelo140_202112_i2.sas7bdat,outds=work.MC2a2c57b982f308489bce3ee8061974,getattrs=NOXX,level=1,maxdepth=MAX)
NOTE: PROCEDURE| _DISARM|         STOP| _DISARM| 2022-03-01T15:54:53,749+01:00| _DISARM| WorkspaceServer| _DISARM| SAS| _DISARM| | 
      _DISARM| 25858048| _DISARM| 25591808| _DISARM| 12| _DISARM| 12| _DISARM| 0| _DISARM| 33312| _DISARM| 0.000000| _DISARM| 
      0.001318| _DISARM| 1961765693.748172| _DISARM| 1961765693.749490| _DISARM| 0.000000| _DISARM| | _ENDDISARM 
NOTE: PROCEDIMIENTO SQL used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

NOTE: La compresión del conjunto de datos WORK.DATA3  está deshabilitada porque aumentaría el tamaño del  conjunto de datos.
NOTE: The data set WORK.DATA3 has 1 observations and 0 variables.
NOTE: MVA_DSIO.OPEN_CLOSE| _DISARM|         STOP| _DISARM| 2022-03-01T15:54:53,752+01:00| _DISARM| WorkspaceServer| _DISARM| SAS| 
      _DISARM| | _DISARM| 1| _DISARM| 25591808| _DISARM| 12| _DISARM| 12| _DISARM| 136| _DISARM| 33456| _DISARM| 0.000000| _DISARM| 
      0.000871| _DISARM| 1961765693.751364| _DISARM| 1961765693.752235| _DISARM| 0.000000| _DISARM| | _ENDDISARM 
NOTE: PROCEDURE| _DISARM|         STOP| _DISARM| 2022-03-01T15:54:53,752+01:00| _DISARM| WorkspaceServer| _DISARM| SAS| _DISARM| | 
      _DISARM| 25858048| _DISARM| 25591808| _DISARM| 12| _DISARM| 12| _DISARM| 136| _DISARM| 33456| _DISARM| 0.000000| _DISARM| 
      0.001962| _DISARM| 1961765693.750455| _DISARM| 1961765693.752417| _DISARM| 0.000000| _DISARM| | _ENDDISARM 
NOTE: Sentencia DATA used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      


NOTE: Argument 1 to function DOPTNUM(0) at línea 24859 columna 63 is invalid.
ERROR: Invalid DO loop control information, either the INITIAL or TO expression is missing or the BY expression is missing, zero, 
       or invalid.
directory=  filepath=  fref=#LN00022 fref2=  file_or_folder=  filename=  ext=  msg=  foption=  level=1 rc=0 did=0 numopts=. i=1
dnum=. midd=. dmsg=  midf=. fmsg=  _ERROR_=1 _N_=1
NOTE: Mathematical operations could not be performed at the following places. The results of the operations have been set to 
      missing values.
      Each place is given by: (Number of times) at (Line):(Column).
      1 en 24859:63   
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.DATA3 may be incomplete.  When this step was stopped there were 0 observations and 7 variables.
NOTE: MVA_DSIO.OPEN_CLOSE| _DISARM|         STOP| _DISARM| 2022-03-01T15:54:53,756+01:00| _DISARM| WorkspaceServer| _DISARM| SAS| 
      _DISARM| | _DISARM| 0| _DISARM| 25591808| _DISARM| 12| _DISARM| 12| _DISARM| 8| _DISARM| 33464| _DISARM| 0.000000| _DISARM| 
      0.000909| _DISARM| 1961765693.755347| _DISARM| 1961765693.756256| _DISARM| 0.000000| _DISARM| | _ENDDISARM 
WARNING: El conjunto de datos WORK.DATA3 no se ha reemplazado porque este paso se ha parado.
NOTE: PROCEDURE| _DISARM|         STOP| _DISARM| 2022-03-01T15:54:53,756+01:00| _DISARM| WorkspaceServer| _DISARM| SAS| _DISARM| | 
      _DISARM| 25858048| _DISARM| 25591808| _DISARM| 12| _DISARM| 12| _DISARM| 8| _DISARM| 33464| _DISARM| 0.000000| _DISARM| 
      0.003239| _DISARM| 1961765693.753233| _DISARM| 1961765693.756472| _DISARM| 0.000000| _DISARM| | _ENDDISARM 
NOTE: Sentencia DATA used (Total process time):
      real time           0.00 seconds
      cpu time            0.01 seconds
      

NOTE: MVA_DSIO.OPEN_CLOSE| _DISARM|         STOP| _DISARM| 2022-03-01T15:54:53,758+01:00| _DISARM| WorkspaceServer| _DISARM| SAS| 
      _DISARM| | _DISARM| -1| _DISARM| 25591808| _DISARM| 12| _DISARM| 12| _DISARM| 0| _DISARM| 33464| _DISARM| 0.000000| _DISARM| 
      0.000191| _DISARM| 1961765693.758225| _DISARM| 1961765693.758416| _DISARM| 0.000000| _DISARM| | _ENDDISARM 
ERROR: La variable filepath no está en el archivo WORK.DATA3.

NOTE: La compresión del conjunto de datos WORK.DATA3  está deshabilitada porque aumentaría el tamaño del  conjunto de datos.
17                                                          Sistema SAS                                 15:54 Tuesday, March 1, 2022

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.DATA3 may be incomplete.  When this step was stopped there were 0 observations and 0 variables.
NOTE: MVA_DSIO.OPEN_CLOSE| _DISARM|         STOP| _DISARM| 2022-03-01T15:54:53,759+01:00| _DISARM| WorkspaceServer| _DISARM| SAS| 
      _DISARM| | _DISARM| 0| _DISARM| 25591808| _DISARM| 12| _DISARM| 12| _DISARM| 8| _DISARM| 33472| _DISARM| 0.000000| _DISARM| 
      0.000561| _DISARM| 1961765693.758878| _DISARM| 1961765693.759439| _DISARM| 0.000000| _DISARM| | _ENDDISARM 
WARNING: El conjunto de datos WORK.DATA3 no se ha reemplazado porque este paso se ha parado.
NOTE: PROCEDURE| _DISARM|         STOP| _DISARM| 2022-03-01T15:54:53,759+01:00| _DISARM| WorkspaceServer| _DISARM| SAS| _DISARM| | 
      _DISARM| 25858048| _DISARM| 25591808| _DISARM| 12| _DISARM| 12| _DISARM| 8| _DISARM| 33472| _DISARM| 0.000000| _DISARM| 
      0.002108| _DISARM| 1961765693.757494| _DISARM| 1961765693.759602| _DISARM| 0.000000| _DISARM| | _ENDDISARM 
NOTE: Sentencia DATA used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

NOTE: MVA_DSIO.OPEN_CLOSE| _DISARM|         STOP| _DISARM| 2022-03-01T15:54:53,762+01:00| _DISARM| WorkspaceServer| _DISARM| SAS| 
      _DISARM| | _DISARM| 326| _DISARM| 25591808| _DISARM| 12| _DISARM| 12| _DISARM| 0| _DISARM| 33472| _DISARM| 0.000000| _DISARM| 
      0.001293| _DISARM| 1961765693.760850| _DISARM| 1961765693.762143| _DISARM| 0.000000| _DISARM| | _ENDDISARM 
NOTE: MVA_DSIO.OPEN_CLOSE| _DISARM|         STOP| _DISARM| 2022-03-01T15:54:53,762+01:00| _DISARM| WorkspaceServer| _DISARM| SAS| 
      _DISARM| | _DISARM| 1| _DISARM| 25591808| _DISARM| 12| _DISARM| 12| _DISARM| 0| _DISARM| 33480| _DISARM| 0.000000| _DISARM| 
      0.000314| _DISARM| 1961765693.762674| _DISARM| 1961765693.762988| _DISARM| 0.000000| _DISARM| | _ENDDISARM 
base string (str1)=
compare string (str2) = directory filepath file_or_folder filename ext msg level

NOTE: Appending WORK.DATA3 a WORK.MC2A2C57B982F308489BCE3EE8061974.
NOTE: There were 1 observations read from the data set WORK.DATA3.
NOTE: 1 observations added.
NOTE: The data set WORK.MC2A2C57B982F308489BCE3EE8061974 has 327 observations and 7 variables.
NOTE: MVA_DSIO.OPEN_CLOSE| _DISARM|         STOP| _DISARM| 2022-03-01T15:54:53,765+01:00| _DISARM| WorkspaceServer| _DISARM| SAS| 
      _DISARM| | _DISARM| 327| _DISARM| 25591808| _DISARM| 12| _DISARM| 12| _DISARM| 8| _DISARM| 33488| _DISARM| 0.000000| _DISARM| 
      0.001154| _DISARM| 1961765693.764380| _DISARM| 1961765693.765534| _DISARM| 0.000000| _DISARM| | _ENDDISARM 
NOTE: MVA_DSIO.OPEN_CLOSE| _DISARM|         STOP| _DISARM| 2022-03-01T15:54:53,765+01:00| _DISARM| WorkspaceServer| _DISARM| SAS| 
      _DISARM| | _DISARM| 1| _DISARM| 25591808| _DISARM| 12| _DISARM| 12| _DISARM| 8| _DISARM| 33488| _DISARM| 0.000000| _DISARM| 
      0.001123| _DISARM| 1961765693.764753| _DISARM| 1961765693.765876| _DISARM| 0.000000| _DISARM| | _ENDDISARM 
NOTE: PROCEDIMIENTO APPEND used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      
NOTE: PROCEDURE| _DISARM|         STOP| _DISARM| 2022-03-01T15:54:53,766+01:00| _DISARM| WorkspaceServer| _DISARM| SAS| _DISARM| | 
      _DISARM| 25858048| _DISARM| 25591808| _DISARM| 12| _DISARM| 12| _DISARM| 8| _DISARM| 33488| _DISARM| 0.000000| _DISARM| 
      0.002249| _DISARM| 1961765693.763805| _DISARM| 1961765693.766054| _DISARM| 0.000000| _DISARM| | _ENDDISARM 

ERROR: La variable file_or_folder no está en el archivo WORK.DATA3.&lt;/PRE&gt;</description>
    <pubDate>Tue, 01 Mar 2022 14:59:57 GMT</pubDate>
    <dc:creator>Abelp9</dc:creator>
    <dc:date>2022-03-01T14:59:57Z</dc:date>
    <item>
      <title>Refer to all files in a path in SAS with "path/*.xlsx"</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Refer-to-all-files-in-a-path-in-SAS-with-quot-path-xlsx-quot/m-p/799130#M33128</link>
      <description>&lt;P&gt;Hello everyone, I am trying to automate a process and one of my programs generates about 50 files with different excel names in a specific folder within SAS. What I want to do is move those .xlsx from the folder where they are created, to another one inside SAS (That folder is my bridge between sas and windows).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How could I do this? I have been testing with the following code:&lt;/P&gt;&lt;PRE&gt;filename in "/opt/sas/data/xx/xx/xx/xx/FinalFolder/*.xlsx";
filename out "/opt/sas/data/xx/xx/xx/xx/BridgeFolder/*.xlsx";

            * copy the file byte-for-byte;
            data _null_;
             length filein 8 fileid 8;
             filein = fopen('in','I',1,'B');
             fileid = fopen('out','O',1,'B');
             rec = '20'x;
             do while(fread(filein)=0);
                rc = fget(filein,rec,1);
                rc = fput(fileid, rec);
                rc =fwrite(fileid);
             end;
             rc = fclose(filein);
             rc = fclose(fileid);
            run;

            filename in clear;
            filename out clear;&lt;/PRE&gt;&lt;P&gt;But it returns me many notes of this type:&lt;/P&gt;&lt;PRE&gt;NOTE: Argument 1 to function FPUT(0,'&amp;#24;') at línea 35 columna 22 is invalid.
NOTE: Argument 1 to function FPUT(0,' ') at línea 35 columna 22 is invalid.
NOTE: Argument 1 to function FPUT(0,' ') at línea 35 columna 22 is invalid.
NOTE: Argument 1 to function FPUT(0,' ') at línea 35 columna 22 is invalid.
NOTE: Argument 1 to function FPUT(0,'x') at línea 35 columna 22 is invalid.
NOTE: Argument 1 to function FPUT(0,'l') at línea 35 columna 22 is invalid.
NOTE: Argument 1 to function FPUT(0,'/') at línea 35 columna 22 is invalid.
NOTE: Argument 1 to function FPUT(0,'w') at línea 35 columna 22 is invalid.
NOTE: Argument 1 to function FPUT(0,'o') at línea 35 columna 22 is invalid.
NOTE: Argument 1 to function FPUT(0,'r') at línea 35 columna 22 is invalid.
NOTE: Argument 1 to function FPUT(0,'k') at línea 35 columna 22 is invalid.&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think the problem is in the asterisk that I use to refer to all the files in the folder (since they are called differently and I want to automate it) because when I put the specific name of a file it works for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone give me a hand with this? Thank you very much in advance, greetings&lt;/P&gt;</description>
      <pubDate>Mon, 28 Feb 2022 14:37:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Refer-to-all-files-in-a-path-in-SAS-with-quot-path-xlsx-quot/m-p/799130#M33128</guid>
      <dc:creator>Abelp9</dc:creator>
      <dc:date>2022-02-28T14:37:57Z</dc:date>
    </item>
    <item>
      <title>Re: Refer to all files in a path in SAS with "path/*.xlsx"</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Refer-to-all-files-in-a-path-in-SAS-with-quot-path-xlsx-quot/m-p/799139#M33129</link>
      <description>&lt;P&gt;Wouldn't be easier to use OS comamnds to this?&lt;/P&gt;
&lt;P&gt;Then you could use FILENAME PIPE, X statement or CALL SYSTEM.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Feb 2022 15:03:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Refer-to-all-files-in-a-path-in-SAS-with-quot-path-xlsx-quot/m-p/799139#M33129</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2022-02-28T15:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: Refer to all files in a path in SAS with "path/*.xlsx"</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Refer-to-all-files-in-a-path-in-SAS-with-quot-path-xlsx-quot/m-p/799147#M33130</link>
      <description>&lt;P&gt;how could i do that?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Feb 2022 15:34:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Refer-to-all-files-in-a-path-in-SAS-with-quot-path-xlsx-quot/m-p/799147#M33130</guid>
      <dc:creator>Abelp9</dc:creator>
      <dc:date>2022-02-28T15:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: Refer to all files in a path in SAS with "path/*.xlsx"</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Refer-to-all-files-in-a-path-in-SAS-with-quot-path-xlsx-quot/m-p/799148#M33131</link>
      <description>&lt;P&gt;Wildcards do not work in file references.&lt;/P&gt;
&lt;P&gt;Simplest method: use the UNIX mv command:&lt;/P&gt;
&lt;PRE&gt;cd /opt/sas/data/xx/xx/xx/xx/FinalFolder
mv *.xlsx /opt/sas/data/xx/xx/xx/xx/BridgeFolder&lt;/PRE&gt;
&lt;P&gt;With pure SAS means, read all .xlsx filenames into a dataset (FILENAME, FOPEN, DNUM, DREAD, FCLOSE functions), and then run a data _null_ step from that where you use the FCOPY and FDELETE functions to perform the move for every single file.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Feb 2022 15:45:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Refer-to-all-files-in-a-path-in-SAS-with-quot-path-xlsx-quot/m-p/799148#M33131</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-02-28T15:45:41Z</dc:date>
    </item>
    <item>
      <title>Re: Refer to all files in a path in SAS with "path/*.xlsx"</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Refer-to-all-files-in-a-path-in-SAS-with-quot-path-xlsx-quot/m-p/799150#M33132</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/415512"&gt;@Abelp9&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;how could i do that?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
infile "cd /opt/sas/data/xx/xx/xx/xx/FinalFolder; mv *.xlsx /opt/sas/data/xx/xx/xx/xx/BridgeFolder 2&amp;amp;1" pipe;
input;
put _infile_;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Feb 2022 15:49:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Refer-to-all-files-in-a-path-in-SAS-with-quot-path-xlsx-quot/m-p/799150#M33132</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-02-28T15:49:02Z</dc:date>
    </item>
    <item>
      <title>Re: Refer to all files in a path in SAS with "path/*.xlsx"</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Refer-to-all-files-in-a-path-in-SAS-with-quot-path-xlsx-quot/m-p/799155#M33133</link>
      <description>Do you have any kind of documentation handy where I can read more about this? I am new programming in sas and it is the first time that I see those functions</description>
      <pubDate>Mon, 28 Feb 2022 15:59:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Refer-to-all-files-in-a-path-in-SAS-with-quot-path-xlsx-quot/m-p/799155#M33133</guid>
      <dc:creator>Abelp9</dc:creator>
      <dc:date>2022-02-28T15:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: Refer to all files in a path in SAS with "path/*.xlsx"</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Refer-to-all-files-in-a-path-in-SAS-with-quot-path-xlsx-quot/m-p/799157#M33134</link>
      <description>why it returns to me this error? "ERROR: Insufficient authorization to access PIPE."</description>
      <pubDate>Mon, 28 Feb 2022 16:06:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Refer-to-all-files-in-a-path-in-SAS-with-quot-path-xlsx-quot/m-p/799157#M33134</guid>
      <dc:creator>Abelp9</dc:creator>
      <dc:date>2022-02-28T16:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: Refer to all files in a path in SAS with "path/*.xlsx"</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Refer-to-all-files-in-a-path-in-SAS-with-quot-path-xlsx-quot/m-p/799169#M33135</link>
      <description>Why not change the program to write directly to that location?</description>
      <pubDate>Mon, 28 Feb 2022 16:35:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Refer-to-all-files-in-a-path-in-SAS-with-quot-path-xlsx-quot/m-p/799169#M33135</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-02-28T16:35:29Z</dc:date>
    </item>
    <item>
      <title>Re: Refer to all files in a path in SAS with "path/*.xlsx"</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Refer-to-all-files-in-a-path-in-SAS-with-quot-path-xlsx-quot/m-p/799184#M33136</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/415512"&gt;@Abelp9&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;why it returns to me this error? "ERROR: Insufficient authorization to access PIPE."&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This means that the capability to run external commands has been disabled in your SAS environment (NOXCMD system option).&lt;/P&gt;</description>
      <pubDate>Mon, 28 Feb 2022 18:07:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Refer-to-all-files-in-a-path-in-SAS-with-quot-path-xlsx-quot/m-p/799184#M33136</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-02-28T18:07:06Z</dc:date>
    </item>
    <item>
      <title>Re: Refer to all files in a path in SAS with "path/*.xlsx"</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Refer-to-all-files-in-a-path-in-SAS-with-quot-path-xlsx-quot/m-p/799186#M33137</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/415512"&gt;@Abelp9&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Do you have any kind of documentation handy where I can read more about this? I am new programming in sas and it is the first time that I see those functions&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Start here:&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lefunctionsref/p1q8bq2v0o11n6n1gpij335fqpph.htm" target="_blank" rel="noopener"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lefunctionsref/p1q8bq2v0o11n6n1gpij335fqpph.htm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You first need the FILENAME function to create file references, as those are needed later for the DOPEN, FCOPY and FDELETE functions.&lt;/P&gt;
&lt;P&gt;DOPEN creates a handle for the directory, which is needed for the DNUM (number of directory entries) and DREAD (retrieves a single entry) function. Use DCLOSE to remove the handle.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Feb 2022 18:20:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Refer-to-all-files-in-a-path-in-SAS-with-quot-path-xlsx-quot/m-p/799186#M33137</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-02-28T18:20:40Z</dc:date>
    </item>
    <item>
      <title>Re: Refer to all files in a path in SAS with "path/*.xlsx"</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Refer-to-all-files-in-a-path-in-SAS-with-quot-path-xlsx-quot/m-p/799189#M33139</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/415512"&gt;@Abelp9&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Do you have any kind of documentation handy where I can read more about this? I am new programming in sas and it is the first time that I see those functions&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Those are not SAS functions. They're Operating System commands, literally a different language.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In a Windows box that would be either PowerShell or CMD commands that you can use SAS to execute.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In a Unix/Mac system that would be unix commands.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS can pass commands to the operating system to execute, things that you would do either via command line or clicks for example.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS Documentation seems down for me, but this page should illustrate the issue.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/hostunx/9.4/p0w085btd5r0a4n1km4bcdpgqibt.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/hostunx/9.4/p0w085btd5r0a4n1km4bcdpgqibt.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Feb 2022 18:27:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Refer-to-all-files-in-a-path-in-SAS-with-quot-path-xlsx-quot/m-p/799189#M33139</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-02-28T18:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: Refer to all files in a path in SAS with "path/*.xlsx"</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Refer-to-all-files-in-a-path-in-SAS-with-quot-path-xlsx-quot/m-p/799278#M33147</link>
      <description>&lt;P&gt;You could copy the entire folder without the need for X command using this macro:&amp;nbsp;&amp;nbsp;&lt;A href="https://core.sasjs.io/mp__copyfolder_8sas.html" target="_blank"&gt;https://core.sasjs.io/mp__copyfolder_8sas.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2022 11:08:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Refer-to-all-files-in-a-path-in-SAS-with-quot-path-xlsx-quot/m-p/799278#M33147</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2022-03-01T11:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: Refer to all files in a path in SAS with "path/*.xlsx"</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Refer-to-all-files-in-a-path-in-SAS-with-quot-path-xlsx-quot/m-p/799293#M33148</link>
      <description>I have tried to save the 5 macros that macro uses (6 in total) and to put my source and destination path as arguments of the last macro but it does not work for me</description>
      <pubDate>Tue, 01 Mar 2022 12:00:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Refer-to-all-files-in-a-path-in-SAS-with-quot-path-xlsx-quot/m-p/799293#M33148</guid>
      <dc:creator>Abelp9</dc:creator>
      <dc:date>2022-03-01T12:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: Refer to all files in a path in SAS with "path/*.xlsx"</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Refer-to-all-files-in-a-path-in-SAS-with-quot-path-xlsx-quot/m-p/799303#M33149</link>
      <description>How do you mean "does not work" - can you share the relevant part of the log?  Or describe what does happen?</description>
      <pubDate>Tue, 01 Mar 2022 13:11:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Refer-to-all-files-in-a-path-in-SAS-with-quot-path-xlsx-quot/m-p/799303#M33149</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2022-03-01T13:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: Refer to all files in a path in SAS with "path/*.xlsx"</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Refer-to-all-files-in-a-path-in-SAS-with-quot-path-xlsx-quot/m-p/799314#M33152</link>
      <description>&lt;P&gt;This is the code I entered:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro mp_copyfolder(source,target);
 
  %mp_abort(iftrue=(%mf_isdir(&amp;amp;source)=0)
    ,mac=&amp;amp;sysmacroname
    ,msg=%str(Source dir does not exist (&amp;amp;source))
  )
 
  %mf_mkdir(&amp;amp;target)
 
  %mp_abort(iftrue=(%mf_isdir(&amp;amp;target)=0)
    ,mac=&amp;amp;sysmacroname
    ,msg=%str(Target dir could not be created (&amp;amp;target))
  )
 
  /* prep temp table */
  %local tempds;
  %let tempds=%mf_getuniquename();
 
  /* recursive directory listing */
  %mp_dirlist(path=&amp;amp;source,outds=work.&amp;amp;tempds, maxdepth=MAX)
 
  /* create folders and copy content */
  data _null_;
    length msg $200;
    call missing(msg);
    set work.&amp;amp;tempds;
    if _n_ = 1 then dpos+sum(length(directory),2);
    filepath2="&amp;amp;target/"!!substr(filepath,dpos);
    if file_or_folder='folder' then call execute('%mf_mkdir('!!filepath2!!')');
    else do;
      length fref1 fref2 $8;
      rc1=filename(fref1,filepath,'disk','recfm=n');
      rc2=filename(fref2,filepath2,'disk','recfm=n');
      if fcopy(fref1,fref2) ne 0 then do;
        msg=sysmsg();
        putlog "%str(ERR)OR: Unable to copy " filepath " to " filepath2;
        putlog msg=;
      end;
    end;
    rc=filename(fref1);
    rc=filename(fref2);
  run;
 
  /* tidy up */
  proc sql;
  drop table work.&amp;amp;tempds;
 
%mend mp_copyfolder;
%mp_copyfolder(/opt/sas/data/xx/xx/xx/xx/FinalFolder/,/opt/sas/data/xx/xx/xx/BridgeFolder/)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And it returns this error:&lt;/P&gt;
&lt;PRE&gt;1          ;*';*";*/;quit;run;
2          OPTIONS PAGENO=MIN;
3          %LET _CLIENTTASKLABEL='Transferencia_archivos';
4          %LET _CLIENTPROCESSFLOWNAME='Autoexec';
5          %LET _CLIENTPROJECTPATH='C:\xx\xx\xx\xxxx\xxxx.egp';
6          %LET _CLIENTPROJECTNAME='xxxx.egp';
NOTE: The quoted string currently being processed has become more than 262 bytes long.  You might have unbalanced quotation marks.
7          %LET _SASPROGRAMFILE=;
8          
9          ODS _ALL_ CLOSE;
10         OPTIONS DEV=PNG;
1          ;*';*";*/;quit;run;
                ______________
                49
NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release.  Inserting white space 
             between a quoted string and the succeeding identifier is recommended.

11         GOPTIONS XPIXELS=0 YPIXELS=0;
12         FILENAME EGSR TEMP;
13         ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR
14             STYLE=HtmlBlue
15             STYLESHEET=(URL="file:///C:/Program%20Files%20(x86)/SASHome/x86/SASEnterpriseGuide/7.1/Styles/HtmlBlue.css")
15             STYLESHEET=(URL="file:///C:/Program%20Files%20(x86)/SASHome/x86/SASEnterpriseGuide/7.1/Styles/HtmlBlue.css"

___________________________________________________________________________________________                                         
                                                                                                                         49
15       ! )
NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release.  Inserting white space 
             between a quoted string and the succeeding identifier is recommended.

16             NOGTITLE
17             NOGFOOTNOTE
18             GPATH=&amp;amp;sasworklocation
19             ENCODING=UTF8
20             options(rolap="on")
21         ;
22         
23         GOPTIONS ACCESSIBLE;
24         %macro mp_copyfolder(source,target);
25         
26           %mp_abort(iftrue=(%mf_isdir(&amp;amp;source)=0)
27             ,mac=&amp;amp;sysmacroname
28             ,msg=%str(Source dir does not exist (&amp;amp;source))
29           )
30         
31           %mf_mkdir(&amp;amp;target)
32         
33           %mp_abort(iftrue=(%mf_isdir(&amp;amp;target)=0)
34             ,mac=&amp;amp;sysmacroname
35             ,msg=%str(Target dir could not be created (&amp;amp;target))
NOTE: The quoted string currently being processed has become more than 262 bytes long.  You might have unbalanced quotation marks.&lt;/PRE&gt;
&lt;P&gt;I don't know very well if I have to modify something inside the macro, I'm trying to copy all the contents of a folder and move it to another path inside the SAS server&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you so much for help me&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2022 14:05:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Refer-to-all-files-in-a-path-in-SAS-with-quot-path-xlsx-quot/m-p/799314#M33152</guid>
      <dc:creator>Abelp9</dc:creator>
      <dc:date>2022-03-01T14:05:22Z</dc:date>
    </item>
    <item>
      <title>Re: Refer to all files in a path in SAS with "path/*.xlsx"</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Refer-to-all-files-in-a-path-in-SAS-with-quot-path-xlsx-quot/m-p/799315#M33153</link>
      <description>&lt;P&gt;It appears you have imbalanced quotation marks.&amp;nbsp; Can you try again in a clean (new) SAS session?&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2022 14:15:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Refer-to-all-files-in-a-path-in-SAS-with-quot-path-xlsx-quot/m-p/799315#M33153</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2022-03-01T14:15:12Z</dc:date>
    </item>
    <item>
      <title>Re: Refer to all files in a path in SAS with "path/*.xlsx"</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Refer-to-all-files-in-a-path-in-SAS-with-quot-path-xlsx-quot/m-p/799316#M33154</link>
      <description>&lt;P&gt;Start a new SAS session. You had unbalanced quotes or a missing %MEND statement (or similar) further up in your submitted code.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2022 14:15:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Refer-to-all-files-in-a-path-in-SAS-with-quot-path-xlsx-quot/m-p/799316#M33154</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-03-01T14:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: Refer to all files in a path in SAS with "path/*.xlsx"</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Refer-to-all-files-in-a-path-in-SAS-with-quot-path-xlsx-quot/m-p/799319#M33155</link>
      <description>&lt;P&gt;Here is the test for the mp_copyfolder() macro:&amp;nbsp;&amp;nbsp;&lt;A href="https://core.sasjs.io/mp__copyfolder_8test_8sas_source.html" target="_blank"&gt;https://core.sasjs.io/mp__copyfolder_8test_8sas_source.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We create a folder with some content, copy it, and compare the directory listing between the old and the new folder.&amp;nbsp; The test is executed with every release of the core library.&amp;nbsp; If there's a bug in a core macro, our first action is to reproduce it with a test, then make the fix.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2022 14:25:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Refer-to-all-files-in-a-path-in-SAS-with-quot-path-xlsx-quot/m-p/799319#M33155</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2022-03-01T14:25:45Z</dc:date>
    </item>
    <item>
      <title>Re: Refer to all files in a path in SAS with "path/*.xlsx"</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Refer-to-all-files-in-a-path-in-SAS-with-quot-path-xlsx-quot/m-p/799320#M33156</link>
      <description>&lt;P&gt;It returns this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;71         %mend mp_copyfolder;
72         %mp_copyfolder(/opt/sas/data/xx/xx/xx/xx/FinalFolder/,/opt/sas/data/xx/xx/xx/xxx/BridgeFolder/)

NOTE: Compression of the WORK.DATA1 dataset is disabled because it would increase the size of the dataset.
NOTE: The data set WORK.DATA1 has 1 observations and 0 variables.
NOTE: MVA_DSIO.OPEN_CLOSE| _DISARM|         STOP| _DISARM| 2022-03-01T15:25:47,669+01:00| _DISARM| WorkspaceServer| _DISARM| SAS| 
      _DISARM| | _DISARM| 1| _DISARM| 20086784| _DISARM| 13| _DISARM| 13| _DISARM| 136| _DISARM| 2032| _DISARM| 0.000000| _DISARM| 
      0.000885| _DISARM| 1961763947.668653| _DISARM| 1961763947.669538| _DISARM| 0.000000| _DISARM| | _ENDDISARM 
NOTE: PROCEDURE| _DISARM|         STOP| _DISARM| 2022-03-01T15:25:47,669+01:00| _DISARM| WorkspaceServer| _DISARM| SAS| _DISARM| | 
      _DISARM| 21139456| _DISARM| 20086784| _DISARM| 13| _DISARM| 13| _DISARM| 144| _DISARM| 2032| _DISARM| 0.010000| _DISARM| 
      0.002187| _DISARM| 1961763947.667533| _DISARM| 1961763947.669720| _DISARM| 0.010000| _DISARM| | _ENDDISARM 
NOTE: Sentencia DATA used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72            %mp_dropmembers(%scan(&amp;amp;outds,-1,.), libref=WORK)
              _
              180
WARNING: Apparent invocation of macro MP_DROPMEMBERS not resolved.

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72                                                                                                              length directory
                                                                                                                ______
                                                                                                                180
72       ! filepath $500 fref fref2 $8 file_or_folder $6 filename $80     ext $20 msg $200 foption $16;   if _n_=1 then call
72       ! missing(of _all_);

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72            data &amp;amp;out_ds(compress=no     keep=file_or_folder filepath filename ext msg directory level   );   length directory
72       ! filepath $500 fref fref2 $8 file_or_folder $6 filename $80     ext $20 msg $200 foption $16;   if _n_=1 then call
                                                                                                          __
                                                                                                          180
72       ! missing(of _all_);
ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72            retain level &amp;amp;level;
              ______
              180
3                                                           Sistema SAS                                 15:24 Tuesday, March 1, 2022


ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72              rc = filename(fref, "&amp;amp;path");
                __
                180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72            if rc = 0 then do;
              __
              180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72                                   did = dopen(fref);
                                     ___
                                     180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72                                                               numopts=doptnum(did);
                                                                 _______
                                                                 180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72                                                                                         do i=1 to numopts;
                                                                                           __
                                                                                           180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72                                                                                                                  foption=doptname
                                                                                                                    _______
                                                                                                                    180
72       ! (did,i);       if foption=:'Directory' then i=numopts;     end;     directory=dinfo(did,foption);     if did=0 then do;

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72                if foption=:'Directory' then i=numopts;

__                                                                                                                                  

180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72              end;

4                                                           Sistema SAS                                 15:24 Tuesday, March 1, 2022

___                                                                                                                                 

180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72              directory=dinfo(did,foption);

_________                                                                                                                           

180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72              if did=0 then do;

__                                                                                                                                  

180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72            if rc = 0 then do;     did = dopen(fref);          numopts=doptnum(did);     do i=1 to numopts;
72       ! foption=doptname(did,i);       if foption=:'Directory' then i=numopts;     end;     directory=dinfo(did,foption);     if
72       ! did=0 then do;       putlog
                                ______
                                180
ERROR 180-322: Statement is not valid or it is used out of proper order.


NOTE: Line generated by the invoked macro "MP_DIRLIST".
72                                                              msg=sysmsg();
                                                                ___
                                                                180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72                                                                                  put _all_;
                                                                                    ___
                                                                                    180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72                                                                                                   stop;
                                                                                                     ____
                                                                                                     180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72                                                                                                             end;
                                                                                                               ___
                                                                                                               180
5                                                           Sistema SAS                                 15:24 Tuesday, March 1, 2022


ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72                                                                                                                      rc =
                                                                                                                        __
                                                                                                                        180
72       ! filename(fref);   end;   else do;     msg=sysmsg();     put _all_;     stop;   end;   dnum = dnum(did);   do i = 1 to

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72            end;

___                                                                                                                                 

180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72            else do;

____                                                                                                                                

180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72              msg=sysmsg();

___                                                                                                                                 

180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72              put _all_;

___                                                                                                                                 

180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72              stop;

____                                                                                                                                

180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72            end;
6                                                           Sistema SAS                                 15:24 Tuesday, March 1, 2022


___                                                                                                                                 

180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72            dnum = dnum(did);

____                                                                                                                                

180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72            do i = 1 to dnum;

__                                                                                                                                  

180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72              filename =

________                                                                                                                            

180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72                             filepath=cats(directory,'/',filename);
                               ________
                               180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72                                                                        rc = filename(fref2,filepath);
                                                                          __
                                                                          180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72                                                                                                           midd=dopen(fref2);
                                                                                                             ____
                                                                                                             180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72                                                                                                                             
72       ! dmsg=sysmsg();     if did &amp;gt; 0 then file_or_folder='folder';     rc=dclose(midd);     midf=fopen(fref2);     fmsg=sysmsg()
7                                                           Sistema SAS                                 15:24 Tuesday, March 1, 2022

           ____
           180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72              if did &amp;gt; 0 then file_or_folder='folder';

__                                                                                                                                  

180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72              rc=dclose(midd);

__                                                                                                                                  

180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72              midf=fopen(fref2);

____                                                                                                                                

180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72              fmsg=sysmsg();

____                                                                                                                                

180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72              if midf

__                                                                                                                                  

180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72                                              rc=fclose(midf);
                                                __
                                                180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
8                                                           Sistema SAS                                 15:24 Tuesday, March 1, 2022

72                                                                     if index(fmsg,'File is in use') or index(dmsg,'is not a
                                                                       __
                                                                       180
72       ! directory')       then file_or_folder='file';     else if index(fmsg,'Insufficient authorization') then

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72              else if index(fmsg,'Insufficient authorization') then file_or_folder='file';

____                                                                                                                                

180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72              else if

____                                                                                                                                

180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72                                                                if file_or_folder='file' then do;
                                                                  __
                                                                  180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72                                                                                                        ext =
                                                                                                          ___
                                                                                                          180
72       ! prxchange('s/.*\.{1,1}(.*)/$1/', 1, filename);       if filename = ext then ext = ' ';     end;     else do;       ext=''

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72                if filename = ext then ext = ' ';

__                                                                                                                                  

180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72              end;

___                                                                                                                                 

180

ERROR 180-322: Statement is not valid or it is used out of proper order.

9                                                           Sistema SAS                                 15:24 Tuesday, March 1, 2022

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72              else do;

____                                                                                                                                

180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72                ext='';

___                                                                                                                                 

180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72                file_or_folder='folder';

______________                                                                                                                      

180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72              end;
                ___
                180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72                       output;
                         ______
                         180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72                                 end;
                                   ___
                                   180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72                                        rc = dclose(did);
                                          __
                                          180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "MP_DIRLIST".
72                                                            stop;
                                                              ____
10                                                          Sistema SAS                                 15:24 Tuesday, March 1, 2022

                                                              180

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: MVA_DSIO.OPEN_CLOSE| _DISARM|         STOP| _DISARM| 2022-03-01T15:25:47,678+01:00| _DISARM| WorkspaceServer| _DISARM| SAS| 
      _DISARM| | _DISARM| -1| _DISARM| 20086784| _DISARM| 13| _DISARM| 13| _DISARM| 0| _DISARM| 2032| _DISARM| 0.000000| _DISARM| 
      0.000210| _DISARM| 1961763947.678400| _DISARM| 1961763947.678610| _DISARM| 0.000000| _DISARM| | _ENDDISARM 
ERROR: La variable filepath no está en el archivo WORK.DATA1.

NOTE: La compresión del conjunto de datos WORK.DATA1  está deshabilitada porque aumentaría el tamaño del  conjunto de datos.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.DATA1 may be incomplete.  When this step was stopped there were 0 observations and 0 variables.
NOTE: MVA_DSIO.OPEN_CLOSE| _DISARM|         STOP| _DISARM| 2022-03-01T15:25:47,679+01:00| _DISARM| WorkspaceServer| _DISARM| SAS| 
      _DISARM| | _DISARM| 0| _DISARM| 20086784| _DISARM| 13| _DISARM| 13| _DISARM| 8| _DISARM| 2048| _DISARM| 0.000000| _DISARM| 
      0.000574| _DISARM| 1961763947.679081| _DISARM| 1961763947.679655| _DISARM| 0.000000| _DISARM| | _ENDDISARM 
WARNING: El conjunto de datos WORK.DATA1 no se ha reemplazado porque este paso se ha parado.
NOTE: PROCEDURE| _DISARM|         STOP| _DISARM| 2022-03-01T15:25:47,679+01:00| _DISARM| WorkspaceServer| _DISARM| SAS| _DISARM| | 
      _DISARM| 21139456| _DISARM| 20086784| _DISARM| 13| _DISARM| 13| _DISARM| 16| _DISARM| 2048| _DISARM| 0.000000| _DISARM| 
      0.002204| _DISARM| 1961763947.677621| _DISARM| 1961763947.679825| _DISARM| 0.000000| _DISARM| | _ENDDISARM 
NOTE: Sentencia DATA used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

WARNING: Apparent invocation of macro MF_EXISTDS not resolved.
ERROR: Required operator not found in expression: %mf_existds(&amp;amp;outds) 
ERROR: The macro MP_DIRLIST will stop executing.
ERROR: El archivo WORK.MC60F77C8BAE371B48927CFA233E5F19.DATA no existe.

NOTE: Numeric values have been converted to character values at the places given by: (Line):(Column).
      2836:190   2836:238   72:149     
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE| _DISARM|         STOP| _DISARM| 2022-03-01T15:25:47,682+01:00| _DISARM| WorkspaceServer| _DISARM| SAS| _DISARM| | 
      _DISARM| 21139456| _DISARM| 20086784| _DISARM| 13| _DISARM| 13| _DISARM| 0| _DISARM| 2048| _DISARM| 0.000000| _DISARM| 
      0.001116| _DISARM| 1961763947.681176| _DISARM| 1961763947.682292| _DISARM| 0.000000| _DISARM| | _ENDDISARM 
NOTE: Sentencia DATA used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

WARNING: El archivo WORK.MC60F77C8BAE371B48927CFA233E5F19.DATA no existe.
WARNING: Table WORK.MC60F77C8BAE371B48927CFA233E5F19 no se ha suprimido.
73         
74         GOPTIONS NOACCESSIBLE;
75         %LET _CLIENTTASKLABEL=;
76         %LET _CLIENTPROCESSFLOWNAME=;
77         %LET _CLIENTPROJECTPATH=;
78         %LET _CLIENTPROJECTNAME=;
79         %LET _SASPROGRAMFILE=;
80         
81         ;*';*";*/;quit;
NOTE: PROCEDURE| _DISARM|         STOP| _DISARM| 2022-03-01T15:25:47,688+01:00| _DISARM| WorkspaceServer| _DISARM| SAS| _DISARM| | 
      _DISARM| 21139456| _DISARM| 20086784| _DISARM| 13| _DISARM| 13| _DISARM| 0| _DISARM| 2048| _DISARM| 0.000000| _DISARM| 
      0.001127| _DISARM| 1961763947.687196| _DISARM| 1961763947.688323| _DISARM| 0.000000| _DISARM| | _ENDDISARM 
NOTE: PROCEDIMIENTO SQL used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      
11                                                          Sistema SAS                                 15:24 Tuesday, March 1, 2022

81       !                run;

82         ODS _ALL_ CLOSE;
83         
84         
85         QUIT; RUN;
86         &lt;/PRE&gt;</description>
      <pubDate>Tue, 01 Mar 2022 14:28:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Refer-to-all-files-in-a-path-in-SAS-with-quot-path-xlsx-quot/m-p/799320#M33156</guid>
      <dc:creator>Abelp9</dc:creator>
      <dc:date>2022-03-01T14:28:42Z</dc:date>
    </item>
    <item>
      <title>Re: Refer to all files in a path in SAS with "path/*.xlsx"</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Refer-to-all-files-in-a-path-in-SAS-with-quot-path-xlsx-quot/m-p/799323#M33158</link>
      <description>&lt;P&gt;ok - getting there!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The sasjs/core macros are designed to work together.&amp;nbsp; There are many ways to compile the macros - probably the most straightforward (if not the most efficient) is to run the code below:&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;filename mc url "https://raw.githubusercontent.com/sasjs/core/main/all.sas";
%inc mc;&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;Alternatively, just copy paste the code from this url:&amp;nbsp;&amp;nbsp;&lt;A href="https://raw.githubusercontent.com/sasjs/core/main/all.sas" target="_blank"&gt;https://raw.githubusercontent.com/sasjs/core/main/all.sas&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then you can invoke the mp_copyfolder macro.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2022 14:33:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Refer-to-all-files-in-a-path-in-SAS-with-quot-path-xlsx-quot/m-p/799323#M33158</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2022-03-01T14:33:48Z</dc:date>
    </item>
  </channel>
</rss>

