- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I am writing a code to read off a zip file using 7zip. I have successfully done the same. However, the code makes the command prompt to open and doesn't generate the dataset entirely unless I manually close the command prompt. Is there any way in which the command prompt can be closed automatically?
libname Orders "D:\Gautham\ISB\Ram\BSE Project\Data\Orders\SAS\Temp"; filename zipfile PIPE '7za e "D:\...\OISBHHY_060513.zip" "OISBHHY_060513" -y -so'; /*Code for reading File from Zip File*/ data Orders.Raw_Data; infile zipfile dlm = '|' dsd lrecl = 1024 truncover obs = 10; input tradesession symbol tmc cmc:$12.
cat:$8. bors:$1. ordtype:$1. lp vo vd
timestamp:$50. retention acttype:$1. orno:$30. actionid:$30.; run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
https://blogs.sas.com/content/sasdummy/2015/05/11/using-filename-zip-to-unzip-and-read-data-files-in...
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Yes, I have tried it. These are files that have been generate on Unix so they only open with 7ZIP. They are really large files as well. Hence, I don't want to unzip them, read them and delete the unzipped one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Isn't your current process unzipping and reading it, but using the OS instead of SAS?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
What are you settings for the XWAIT and XSYNC options?
Also is 7za an actual executable program or some type of shell script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
7za is an executable program. It's the command line version of 7zip. I have tried the code with the following addition as well:
options noxsync noxwait;
The program still does not work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I don't know what version of 7zip you have. The version 9.20 I have does not include a 7za.exe file.
If I try to use the 7z.exe to extract a file to std output like your command line then 7Z complains.
C:\>"C:\Program Files\7-Zip\7z.exe" e "c:\downloads\7ztest.zip" "class.txt" -y -so 7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18 Error: I won't write data and program's messages to same terminal C:\>
Perhaps that is the difference between 7za and 7z commands?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content