<?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: Archiving files in SAS using UNIX in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Archiving-files-in-SAS-using-UNIX/m-p/479717#M123861</link>
    <description>&lt;P&gt;Generally along the right path.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;So far this is what I have understood:

abc="mv -f /original path" || strip (_infile_) || "/new path";--this command moves the files from the old location to the new location, creating the new location folder structure
&lt;/PRE&gt;
&lt;P&gt;Not quite but close, it assigns the TEXT of an operating system command to a text variable so that the actual command can be passed with the SYSTEM function (or CALL SYSTEM). RC then receives the return value of the SYSTEM attempting to execute that command.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;1. Instead of abc="mv -f /original path" || strip (_infile_) || "/new path";

it should be abc=mv -f "/original path" || strip (_infile_) || "/new path";
&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;The statement: abc=mv -f "/original path" || strip (_infile_) || "/new path"; would have a syntax error as it would first attempt to subtract the value of a numeric variable f from a numeric variable mv (not a problem unless you actually have those variables) but without an operation the "/original path" will generate an error like: &lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, (, *, **, +, -, /, &amp;lt;, &amp;lt;=,
              &amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;&amp;lt;, &amp;gt;=, AND, EQ, GE, GT, LE, LT, MAX, MIN, NE, NG, NL, OR, [, ^=, {, |,
              ||, ~=.
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2. The syntax for Filename is: &lt;SPAN class="xis-keyword"&gt;&lt;FONT style="background-color: rgb(252, 222, 192);"&gt;FILEEXIST&lt;/FONT&gt;&lt;/SPAN&gt;(&lt;SPAN class="xis-userSuppliedSyntaxValue"&gt;&lt;A title="Description of syntax: filename" href="http://127.0.0.1:61462/help/lefunctionsref.hlp/n06xm8hwk0t0axn10gj16lfiri43.htm#p19swl29i4pj64n1uboh9ulvc5zn" target="_blank"&gt;file-name&lt;/A&gt;&lt;/SPAN&gt;)&amp;nbsp;; Filename can be a literal or any expression that resolves to a (hopeful) filename.&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;if not fileexist("/new path where the files need to go after being archived" || strip (_infile_)

then rc=system(abc));
&lt;/PRE&gt;
&lt;P&gt;has an issue that the fileexist is not properly closed I suspect it should have been:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;if not fileexist("/new path where the files need to go after being archived" || strip (_infile_) )

then rc=system(abc);
&lt;/PRE&gt;
&lt;PRE&gt;3. Just before run, put abc=;;--I'm hoping this is a typo, why would there be 2 ; anyway?&lt;/PRE&gt;
&lt;P&gt;Why? Cannot be sure. There may have been something deleted or just a double tap on the ; key. An extra ; is a null statement as far as SAS is concerned.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;About -iname I have no clue as that looks like a Unix command.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you run code and get errors that SAS detects then post the code and error messages. Copy the bit from the log and paste into a code box opened using the forum {I} icon to preserve format of text and position of diagnostics that SAS often places in the code indicating where the error was detected.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Jul 2018 21:14:45 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-07-19T21:14:45Z</dc:date>
    <item>
      <title>Archiving files in SAS using UNIX</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Archiving-files-in-SAS-using-UNIX/m-p/479686#M123849</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a code that I'm trying to correct because I wanted to understand and learn the unix component in sas. The aim is to archive files and move them from the "original path" to the "new path". This is the code that I received:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;abc="mv -f /original path" || strip (_infile_) || "/new path";&lt;/P&gt;&lt;P&gt;if not fileexist("/n&lt;SPAN&gt;ew path" ||&amp;nbsp;strip (_infile_)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;then rc=system(abc));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;put abc=;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;abc= 'find /new path&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;-type f \( -iname "*.*" ! -iname "*.gz"&amp;nbsp; ! -iname "*.Z" !&amp;nbsp;-iname "*.tgz" ! -iname "*.zip" \) -execdir gzip {} \;';&lt;/P&gt;&lt;P&gt;rc=system(abc);&lt;/P&gt;&lt;P&gt;put&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;abc=;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far this is what I have understood:&lt;/P&gt;&lt;P&gt;abc="mv -f /original path" || strip (_infile_) || "/new path";--this command moves the files&amp;nbsp;from&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;the old location to the new location, creating the new location folder structure&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if not fileexist("/n&lt;SPAN&gt;ew path" ||&amp;nbsp;strip (_infile_)&amp;nbsp;then rc=system(abc));--if the new location directory/folder structure does not exist, then run the command abc to create the new folder structure and move the files&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;rc=system(&lt;/SPAN&gt;&lt;SPAN&gt;abc&lt;/SPAN&gt;&lt;SPAN&gt;);--return the value received after the execution of the above command abc&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;put abc=;--if successful execution, returned value is 0, else 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;abc= 'find /new path&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;-type f \( -iname "*.*" ! -iname "*.gz"&amp;nbsp; ! -iname "*.Z" !&amp;nbsp;-iname "*.tgz" ! -iname "*.zip" \) -execdir gzip {} \;';--command abc will now&amp;nbsp;switch to the new path directory and execute the specified command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;rc=system(abc);&lt;SPAN&gt;--return the value received after the execution of command abc&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;put&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;abc=;;&lt;SPAN&gt;--if successful execution, returned value is 0, else 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please suggest if my interpretation of the above code lines is correct.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, in the line&amp;nbsp;&lt;SPAN&gt;abc= 'find /new path&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;-type f \( -iname "*.*" ! -iname "*.gz"&amp;nbsp; ! -iname "*.Z" !&amp;nbsp;-iname "*.tgz" ! -iname "*.zip" \) -execdir gzip {} \;'; what does the entire iname command even mean? Is it zipping all the files irrespective of what their names and extensions are? Or are the files already zipped and it is converting that to gzip? I just cannot interpret that.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And I think these are the following syntax errors in this piece of code, please suggest if that's how unix syntax works:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1. Instead of&amp;nbsp;abc="mv -f /original path" || strip (_infile_) || "/new path";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;it should be&amp;nbsp;abc=mv -f "/original path" || strip (_infile_) || "/new path";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2. Instead of&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;if not fileexist("/n&lt;SPAN&gt;ew path where the files need to go after being archived" ||&amp;nbsp;strip (_infile_)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;then rc=system(abc));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;it should be&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;if not fileexist("/n&lt;SPAN&gt;ew path where the files need to go after being archived" ||&amp;nbsp;strip (_infile_))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;then rc=system(abc);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;but isn't filexist supposed to have only one arguement?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3. Just before run,&amp;nbsp;put&amp;nbsp;abc=;;--I'm hoping this is a typo, why would there be 2 ; anyway?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jul 2018 20:15:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Archiving-files-in-SAS-using-UNIX/m-p/479686#M123849</guid>
      <dc:creator>astha8882000</dc:creator>
      <dc:date>2018-07-19T20:15:37Z</dc:date>
    </item>
    <item>
      <title>Re: Archiving files in SAS using UNIX</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Archiving-files-in-SAS-using-UNIX/m-p/479717#M123861</link>
      <description>&lt;P&gt;Generally along the right path.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;So far this is what I have understood:

abc="mv -f /original path" || strip (_infile_) || "/new path";--this command moves the files from the old location to the new location, creating the new location folder structure
&lt;/PRE&gt;
&lt;P&gt;Not quite but close, it assigns the TEXT of an operating system command to a text variable so that the actual command can be passed with the SYSTEM function (or CALL SYSTEM). RC then receives the return value of the SYSTEM attempting to execute that command.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;1. Instead of abc="mv -f /original path" || strip (_infile_) || "/new path";

it should be abc=mv -f "/original path" || strip (_infile_) || "/new path";
&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;The statement: abc=mv -f "/original path" || strip (_infile_) || "/new path"; would have a syntax error as it would first attempt to subtract the value of a numeric variable f from a numeric variable mv (not a problem unless you actually have those variables) but without an operation the "/original path" will generate an error like: &lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, (, *, **, +, -, /, &amp;lt;, &amp;lt;=,
              &amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;&amp;lt;, &amp;gt;=, AND, EQ, GE, GT, LE, LT, MAX, MIN, NE, NG, NL, OR, [, ^=, {, |,
              ||, ~=.
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2. The syntax for Filename is: &lt;SPAN class="xis-keyword"&gt;&lt;FONT style="background-color: rgb(252, 222, 192);"&gt;FILEEXIST&lt;/FONT&gt;&lt;/SPAN&gt;(&lt;SPAN class="xis-userSuppliedSyntaxValue"&gt;&lt;A title="Description of syntax: filename" href="http://127.0.0.1:61462/help/lefunctionsref.hlp/n06xm8hwk0t0axn10gj16lfiri43.htm#p19swl29i4pj64n1uboh9ulvc5zn" target="_blank"&gt;file-name&lt;/A&gt;&lt;/SPAN&gt;)&amp;nbsp;; Filename can be a literal or any expression that resolves to a (hopeful) filename.&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;if not fileexist("/new path where the files need to go after being archived" || strip (_infile_)

then rc=system(abc));
&lt;/PRE&gt;
&lt;P&gt;has an issue that the fileexist is not properly closed I suspect it should have been:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;if not fileexist("/new path where the files need to go after being archived" || strip (_infile_) )

then rc=system(abc);
&lt;/PRE&gt;
&lt;PRE&gt;3. Just before run, put abc=;;--I'm hoping this is a typo, why would there be 2 ; anyway?&lt;/PRE&gt;
&lt;P&gt;Why? Cannot be sure. There may have been something deleted or just a double tap on the ; key. An extra ; is a null statement as far as SAS is concerned.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;About -iname I have no clue as that looks like a Unix command.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you run code and get errors that SAS detects then post the code and error messages. Copy the bit from the log and paste into a code box opened using the forum {I} icon to preserve format of text and position of diagnostics that SAS often places in the code indicating where the error was detected.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jul 2018 21:14:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Archiving-files-in-SAS-using-UNIX/m-p/479717#M123861</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-07-19T21:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: Archiving files in SAS using UNIX</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Archiving-files-in-SAS-using-UNIX/m-p/479722#M123862</link>
      <description>&lt;P&gt;-iname is an expression of the find command, see&amp;nbsp;&lt;A href="https://linux.die.net/man/1/find" target="_blank"&gt;https://linux.die.net/man/1/find&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jul 2018 21:20:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Archiving-files-in-SAS-using-UNIX/m-p/479722#M123862</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-07-19T21:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: Archiving files in SAS using UNIX</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Archiving-files-in-SAS-using-UNIX/m-p/479732#M123863</link>
      <description>&lt;P&gt;0. &lt;FONT face="courier new,courier"&gt;put abc=;&lt;/FONT&gt; lets you see the command sent, not the return code.&amp;nbsp;You need &lt;FONT face="courier new,courier"&gt;put RC=&lt;/FONT&gt;; for that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp;&lt;SPAN&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;abc=mv -f "/original path" || strip (_infile_) || "/new path";&lt;/FONT&gt; is invalid syntax.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you want to quote&amp;nbsp;the&amp;nbsp;paths use&amp;nbsp;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;abc='mv -f "/original path/' || strip (_infile_) ||&amp;nbsp;'" "/new path"';&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;2.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT face="courier new,courier"&gt;if not fileexist("/n&lt;SPAN&gt;ew path" ||&amp;nbsp;strip (_infile_))&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;then rc=system(abc);&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;is correct. Concatenating 2 strings still makes only one argument&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;3. One semicolon is enough.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jul 2018 21:54:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Archiving-files-in-SAS-using-UNIX/m-p/479732#M123863</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-07-19T21:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: Archiving files in SAS using UNIX</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Archiving-files-in-SAS-using-UNIX/m-p/479745#M123865</link>
      <description>&lt;P&gt;You seem to have left off the top of the program. It looks like you are reading from a file (or perhaps in-line) data since you are referencing the automatic variable _INFILE_.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You will have much better luck using PIPE as then you can see the messages that the operating system generates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Take advantage of SAS functions to make your code generation easier.&amp;nbsp; Look at the CATxxx series of functions. And the QUOTE() function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The last step seems to a effort to compress files. The -iname predicates to the find command are telling it ignore file extensions that normally indicate that the file is already compressed.&amp;nbsp; You should probably run that AFTER you have finished moving all of the files. Or just test the name of the file yourself and let SAS decide if it should be gzipped or not.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let indir=/source/directory/name ;
%let outdir=/target/directory/name ;

data _null_;
   input @ ;
   length from to $200 ext $10 cmd1 cmd2 $500 ;
   from = catx('/',"&amp;amp;indir",_infile_);
   to = catx('/',"&amp;amp;outdir",_infile_);
   if index(_infile_,'.') then ext = scan(_infile_,-1,'.');
  cmd1=catx(' ','mv -f',quote(strip(from)),quote(strip(to)));
  infile cmd pipe filevar=cmd1 end=eof1;
  while (not eof1);
    input;
    put _infile_;
  end;
  if ext not in ('gz','Z','tgz','zip') then do;
    cmd2=catx(' ','gzip',quote(strip(to)));
    infile cmd2 pipe filevar=cmd2 end=eof2;
    while (not eof2);
      input;
      put _infile_;
    end;
  end;
cards4;
archive_me.sas7bdat
;;;;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 19 Jul 2018 22:27:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Archiving-files-in-SAS-using-UNIX/m-p/479745#M123865</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-07-19T22:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: Archiving files in SAS using UNIX</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Archiving-files-in-SAS-using-UNIX/m-p/479879#M123930</link>
      <description>You are right, the statement below is giving the error as you mentioned:&lt;BR /&gt;&lt;BR /&gt;1. Instead of abc="mv -f /original path" || strip (_infile_) || "/new path";&lt;BR /&gt;&lt;BR /&gt;it should be abc=mv -f "/original path" || strip (_infile_) || "/new path";&lt;BR /&gt;The statement: abc=mv -f "/original path" || strip (_infile_) || "/new path"; would have a syntax error as it would first attempt to subtract the value of a numeric variable f from a numeric variable mv (not a problem unless you actually have those variables) but without an operation the "/original path" will generate an error like:&lt;BR /&gt;&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, (, *, **, +, -, /, &amp;lt;, &amp;lt;=,&lt;BR /&gt;&amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;&amp;lt;, &amp;gt;=, AND, EQ, GE, GT, LE, LT, MAX, MIN, NE, NG, NL, OR, [, ^=, {, |,&lt;BR /&gt;||, ~=.&lt;BR /&gt;&lt;BR /&gt;What should be the correct syntax for this line of code?</description>
      <pubDate>Fri, 20 Jul 2018 14:13:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Archiving-files-in-SAS-using-UNIX/m-p/479879#M123930</guid>
      <dc:creator>astha8882000</dc:creator>
      <dc:date>2018-07-20T14:13:21Z</dc:date>
    </item>
  </channel>
</rss>

