<?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: SAS DI Job which unzips a file in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Job-which-unzips-a-file/m-p/774853#M20127</link>
    <description>&lt;P&gt;Your solution seems to work with one detail:&lt;/P&gt;
&lt;P&gt;When using data step so as to perform a windows operation, it does not work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Despite this fact, I have used the code snippet you provided me as you can see below:&lt;/P&gt;
&lt;PRE&gt;/* Bind Input Variables to Local SAS Macro Variables */
DATA _null_;
	set &amp;amp;_INPUT1;
	call symputx('pFilepath',strip(Filepath));
	call symputx('pZipname',strip(ZIP));
	call symputx('pDrive',scan(Filepath,1,'\'));
RUN;

/* Output the Variables to Log */
%put &amp;amp;pFilepath;
%put &amp;amp;pZipname;


/* Using sysexec to execute unzip command */
%sysexec &amp;amp;pDrive;
%sysexec cd &amp;amp;pFilepath;
%sysexec "C:\Program Files\7-Zip\7z.exe" x &amp;amp;pZipname;&lt;/PRE&gt;
&lt;P&gt;The datastep provides with the filevar approach provides a good validation of the command I tried to enter and indeed I had some problems.&lt;/P&gt;
&lt;P&gt;When it comes to real execution, the approach yield no results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Therefore, I "ported" your data step code in %sysexec and it Worked!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Mon, 18 Oct 2021 10:20:20 GMT</pubDate>
    <dc:creator>vfarmak</dc:creator>
    <dc:date>2021-10-18T10:20:20Z</dc:date>
    <item>
      <title>SAS DI Job which unzips a file</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Job-which-unzips-a-file/m-p/773642#M20111</link>
      <description>&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;" lang="en-US"&gt;Dear Community,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;" lang="en-US"&gt;I am facing the following problem: given a specific folder and zip filename, I need to unzip the file using Data Integration Studio.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;" lang="en-US"&gt;In order to achieve this, I have created the following test flow as displayed below.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;" lang="en-US"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/64606i9DE394910AEFA8AD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;" lang="en-US"&gt;In the first component I have created a dataset via User Written component with three attributes:&lt;/P&gt;
&lt;OL style="margin-left: .375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: normal;" type="1"&gt;
&lt;LI lang="en-US" style="margin-top: 0; margin-bottom: 0; vertical-align: middle;" value="1"&gt;&lt;SPAN style="font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: normal;"&gt;The path of the file in which the zip file is included&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI lang="en-US" style="margin-top: 0; margin-bottom: 0; vertical-align: middle;"&gt;&lt;SPAN style="font-family: Calibri; font-size: 11.0pt;"&gt;The filename along with the path&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI lang="en-US" style="margin-top: 0; margin-bottom: 0; vertical-align: middle;"&gt;&lt;SPAN style="font-family: Calibri; font-size: 11.0pt;"&gt;And the zip file which is basically only the name of the zip file&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;SPAN style="font-family: Calibri; font-size: 11.0pt;"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/64607iCF8E7F899580D85C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;" lang="en-US"&gt;The code for your convenience is as follows:&lt;/P&gt;
&lt;PRE&gt;DATA PARAMS;
	FILEPATH = 'D:\My_Input';
	FILENAME = 'D:\My_Input\My_File_V2_20210201.zip';
	ZIP = SCAN(FILENAME, 3, '\');
RUN;

DATA &amp;amp;_OUTPUT1;
	SET WORK.PARAMS;
RUN;&lt;/PRE&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;" lang="en-US"&gt;Then I try to unzip the file via the "X" command as follows:&lt;/P&gt;
&lt;OL style="margin-left: .375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: normal;" type="1"&gt;
&lt;LI lang="en-US" style="margin-top: 0; margin-bottom: 0; vertical-align: middle;" value="1"&gt;&lt;SPAN style="font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: normal;"&gt;I create two macro variable and I bind the values of the dataset&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI lang="en-US" style="margin-top: 0; margin-bottom: 0; vertical-align: middle;"&gt;&lt;SPAN style="font-family: Calibri; font-size: 11.0pt;"&gt;I write the output in the console&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI lang="en-US" style="margin-top: 0; margin-bottom: 0; vertical-align: middle;"&gt;&lt;SPAN style="font-family: Calibri; font-size: 11.0pt;"&gt;I perform the unzip command, just as I would normally do via the command prompt&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;PRE&gt;DATA _null_;
	set &amp;amp;_INPUT1;
	call symputx('pFilepath',strip(Filepath));
	call symputx('pZipname',strip(ZIP));
RUN;

%put &amp;amp;pZipname;
%put %sysfunc(length(&amp;amp;pZipname));

x "cd &amp;amp;pFilepath";
x ' "c:\Program Files\7-Zip\7z.exe" x &amp;amp;pZipname ';&lt;/PRE&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;" lang="en-US"&gt;What I have noticed is that when I hardcoded the values and execute the flow, the unzip mechanism works.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;" lang="en-US"&gt;When I try to execute the same with the macro variables it fails.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;" lang="en-US"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;" lang="en-US"&gt;For your convenience below you will find the hardcoded script which works.&lt;/P&gt;
&lt;PRE&gt;x "cd D:\My_Input";
x '"c:\Program Files\7-Zip\7z.exe" x My_File_V2_20210201.zip';&lt;/PRE&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;" lang="en-US"&gt;Any suggestion, is highly appreciated.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;" lang="en-US"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;" lang="en-US"&gt;Best Regards,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;" lang="en-US"&gt;Vasileios&lt;/P&gt;</description>
      <pubDate>Tue, 12 Oct 2021 13:28:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Job-which-unzips-a-file/m-p/773642#M20111</guid>
      <dc:creator>vfarmak</dc:creator>
      <dc:date>2021-10-12T13:28:23Z</dc:date>
    </item>
    <item>
      <title>Re: SAS DI Job which unzips a file</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Job-which-unzips-a-file/m-p/773654#M20112</link>
      <description>&lt;P&gt;I find you get much better access to error messages if you use the PIPE filename engine to run code instead of just calling the X or SYSTEM() commands.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So build up a string that has the command you want to run and pass that string to the INFILE statement using the FILEVAR= option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What command do you need to run?&amp;nbsp; Does the 7z.exe command allow you to tell it where to right the files?&amp;nbsp; If not then you will need to change your current directory.&amp;nbsp; Unless Windows has changed how the CD command works sometime the last 20+ years you will first have to make D the default disk before changing directory to a sub directory on that disk.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So it looks like you need to run this Windows command:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;D: ; cd "D:\My_Input" ; "c:\Program Files\7-Zip\7z.exe" x "D:\My_Input\My_File_V2_20210201.zip"&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So try something like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  set &amp;amp;_INPUT1;
  length cmd $600;
  cmd=catx(' ; '
          ,scan(filepath,1,'\')
          ,catx(' ','cd',quote(trim(filepath)))
          ,catx(' ',quote("c:\Program Files\7-Zip\7z.exe"),'x',quote(trim(filename)))
  );
  infile cmd pipe filevar=cmd end=eof;
  do while (not eof);
    input;
    put _infile_;
  end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But it look like the &lt;A href="https://sevenzip.osdn.jp/chm/cmdline/switches/output_dir.htm" target="_self"&gt;-o option to 7zip&lt;/A&gt; should let you tell it the target path in the one command.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;  cmd=catx(' '
          ,quote("c:\Program Files\7-Zip\7z.exe")
          ,'x',quote(trim(filename))
          ,cats('-o',quote(trim(filepath)))
  );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Oct 2021 14:05:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Job-which-unzips-a-file/m-p/773654#M20112</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-10-12T14:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: SAS DI Job which unzips a file</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Job-which-unzips-a-file/m-p/773682#M20118</link>
      <description>&lt;P&gt;You may be able to do this without X command - here is a "pure sas" unzip macro:&amp;nbsp;&amp;nbsp;&lt;A href="https://core.sasjs.io/mp__unzip_8sas.html" target="_blank"&gt;https://core.sasjs.io/mp__unzip_8sas.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Oct 2021 15:51:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Job-which-unzips-a-file/m-p/773682#M20118</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2021-10-12T15:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: SAS DI Job which unzips a file</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Job-which-unzips-a-file/m-p/773859#M20120</link>
      <description>&lt;P&gt;Have you considered using the filename zip engine?&lt;/P&gt;
&lt;P&gt;Do you need to unzip the archive or do you just need to read a file in a zip archive. If it's the latter then have a look at this blog:&amp;nbsp;&lt;A href="https://blogs.sas.com/content/sasdummy/2015/05/11/using-filename-zip-to-unzip-and-read-data-files-in-sas/" target="_blank" rel="noopener"&gt;https://blogs.sas.com/content/sasdummy/2015/05/11/using-filename-zip-to-unzip-and-read-data-files-in-sas/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;More here:&amp;nbsp;&lt;A href="https://blogs.sas.com/content/sasdummy/tag/filename-zip/" target="_blank" rel="noopener"&gt;https://blogs.sas.com/content/sasdummy/tag/filename-zip/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2021 08:28:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Job-which-unzips-a-file/m-p/773859#M20120</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2021-10-13T08:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: SAS DI Job which unzips a file</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Job-which-unzips-a-file/m-p/774846#M20125</link>
      <description>&lt;P&gt;I just need to unzip the archive.&lt;/P&gt;
&lt;P&gt;Although the command runs perfectly in command prompt, when I execute the code via SAS DI, it does not unzip the archive.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 09:34:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Job-which-unzips-a-file/m-p/774846#M20125</guid>
      <dc:creator>vfarmak</dc:creator>
      <dc:date>2021-10-18T09:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: SAS DI Job which unzips a file</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Job-which-unzips-a-file/m-p/774850#M20126</link>
      <description>&lt;P&gt;I have followed your solution and now I can see from the logs what is being executed.&lt;/P&gt;
&lt;P&gt;However, although the command is syntactical OK (tested in Windows Command Prompt and unzips the files), when executed in SAS DI it does not work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please find below the log from SAS DI.&lt;/P&gt;
&lt;PRE&gt;NOTE: The infile CMD is:
      Unnamed Pipe Access Device,
      PROCESS=D: ; cd "D:\VF_Input" ; "c:\Program Files\7-Zip\7z.exe" x MY_DELTA_V2_20210201.zip -oD:\VF_Input,
      RECFM=V,LRECL=32767

NOTE: 0 records were read from the infile CMD.
NOTE: There were 1 observations read from the data set WORK.W91LV79I.
NOTE: PROCEDURE| _DISARM|         STOP| _DISARM| 2021-10-18T12:49:56,405+03:00| _DISARM| WorkspaceServer| _DISARM| SAS| _DISARM| | 
      _DISARM| 20025344| _DISARM| 15040512| _DISARM| 10| _DISARM| 10| _DISARM| 299520| _DISARM| 12425808| _DISARM| 0.000000| 
      _DISARM| 0.042000| _DISARM| 1950169796.363000| _DISARM| 1950169796.405000| _DISARM| 0.000000| _DISARM| | _ENDDISARM 
NOTE: DATA statement used (Total process time):
      real time           0.04 seconds
      cpu time            0.00 seconds&lt;/PRE&gt;
&lt;P&gt;Does SAS comes with a simple command so as to unzip the file?&lt;/P&gt;
&lt;P&gt;I do not want to read the contents from the zip file. I need only to unzip the archive.&lt;/P&gt;
&lt;P&gt;Thank you in advance.&lt;/P&gt;
&lt;P&gt;Vasilios&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 09:51:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Job-which-unzips-a-file/m-p/774850#M20126</guid>
      <dc:creator>vfarmak</dc:creator>
      <dc:date>2021-10-18T09:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: SAS DI Job which unzips a file</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Job-which-unzips-a-file/m-p/774853#M20127</link>
      <description>&lt;P&gt;Your solution seems to work with one detail:&lt;/P&gt;
&lt;P&gt;When using data step so as to perform a windows operation, it does not work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Despite this fact, I have used the code snippet you provided me as you can see below:&lt;/P&gt;
&lt;PRE&gt;/* Bind Input Variables to Local SAS Macro Variables */
DATA _null_;
	set &amp;amp;_INPUT1;
	call symputx('pFilepath',strip(Filepath));
	call symputx('pZipname',strip(ZIP));
	call symputx('pDrive',scan(Filepath,1,'\'));
RUN;

/* Output the Variables to Log */
%put &amp;amp;pFilepath;
%put &amp;amp;pZipname;


/* Using sysexec to execute unzip command */
%sysexec &amp;amp;pDrive;
%sysexec cd &amp;amp;pFilepath;
%sysexec "C:\Program Files\7-Zip\7z.exe" x &amp;amp;pZipname;&lt;/PRE&gt;
&lt;P&gt;The datastep provides with the filevar approach provides a good validation of the command I tried to enter and indeed I had some problems.&lt;/P&gt;
&lt;P&gt;When it comes to real execution, the approach yield no results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Therefore, I "ported" your data step code in %sysexec and it Worked!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 10:20:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Job-which-unzips-a-file/m-p/774853#M20127</guid>
      <dc:creator>vfarmak</dc:creator>
      <dc:date>2021-10-18T10:20:20Z</dc:date>
    </item>
    <item>
      <title>Re: SAS DI Job which unzips a file</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Job-which-unzips-a-file/m-p/787591#M20194</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am experiencing the following error:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Stderr output:&lt;BR /&gt;'c:\Program' is not recognized as an internal or external command,&lt;BR /&gt;operable program or batch file.&lt;/P&gt;
&lt;P&gt;It seems that the cmd inside the datastep sees the empty space in the 'Program Files' path and the command is not executed.&lt;/P&gt;
&lt;P&gt;I saw that you used the quote() function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you have any suggestions?&lt;/P&gt;
&lt;P&gt;Thank you in advance,&lt;/P&gt;
&lt;P&gt;Vasilios&lt;/P&gt;</description>
      <pubDate>Wed, 29 Dec 2021 08:43:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Job-which-unzips-a-file/m-p/787591#M20194</guid>
      <dc:creator>vfarmak</dc:creator>
      <dc:date>2021-12-29T08:43:16Z</dc:date>
    </item>
    <item>
      <title>Re: SAS DI Job which unzips a file</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Job-which-unzips-a-file/m-p/787620#M20195</link>
      <description>&lt;P&gt;Is this the same question or a new one?&amp;nbsp; What is the actual command you ran?&lt;/P&gt;
&lt;P&gt;You need to enclose the filenames with spaces in quotes for Windows/DOS to see them as one token.&lt;/P&gt;
&lt;P&gt;So you want to run something like&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;"c:\program files\somecommand"  options&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Whether or not QUOTE() helps create that depends on what exactly you are doing.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Dec 2021 14:29:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Job-which-unzips-a-file/m-p/787620#M20195</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-12-29T14:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: SAS DI Job which unzips a file</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Job-which-unzips-a-file/m-p/787799#M20196</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's the same command.&lt;/P&gt;
&lt;P&gt;However I made it work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let proc = ;

DATA _NULL_;
  length cmd $6000.;
  cmd=catx(' '
          ,quote("C:\Program Files\7-Zip\7z.exe")
          ,'x', quote(trim("&amp;amp;tfile"))
          ,cats('-o',quote(trim("&amp;amp;tpath")))
  );
  call symputx('proc', cmd);

run;

%sysexec &amp;amp;proc;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I used the outcome of your code stored in the variable cmd and passed it to a macro variable named proc.&lt;/P&gt;
&lt;P&gt;Then I used the %sysexec command.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I know that you cannot actually monitor the outcome of the process, since I sense that SAS DI simply uses the sysexec macro command to pass an instruction to the operating system.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried also to use the first example you suggested and experiment a little bit with the Return Code Check component, so as to catch the syserr exception with no luck.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Although I made it work, still it is not a very good solution...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Dec 2021 15:49:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Job-which-unzips-a-file/m-p/787799#M20196</guid>
      <dc:creator>vfarmak</dc:creator>
      <dc:date>2021-12-30T15:49:08Z</dc:date>
    </item>
    <item>
      <title>Re: SAS DI Job which unzips a file</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Job-which-unzips-a-file/m-p/787802#M20197</link>
      <description>&lt;P&gt;You probably want to add the option that stops it from displaying the progress information since there is no user to look at it.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://sevenzip.osdn.jp/chm/cmdline/switches/index.htm" target="_blank"&gt;https://sevenzip.osdn.jp/chm/cmdline/switches/index.htm&lt;/A&gt;&lt;/P&gt;
&lt;TABLE border="1" cellspacing="0" cellpadding="3"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;-bd&lt;/TD&gt;
&lt;TD&gt;Disable progress indicator&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Thu, 30 Dec 2021 16:07:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Job-which-unzips-a-file/m-p/787802#M20197</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-12-30T16:07:50Z</dc:date>
    </item>
  </channel>
</rss>

