Reputation: 4995
I have received a CSV that has been converted/compressed/compacted into a SAV file from iSeries. Is there a way to extract the CSV file out of the SAV file using any utilities, or do I need an iSeries setup to do this?
Upvotes: 1
Views: 541
Reputation: 41198
A SAVF
is a proprietary, relatively undocumented IBM file format. By far the easiest solution will be to use the native utilities to extract it.
Many midrange shops don't realize there is a ZIP utility integrated into the system. The Java jar
utility can create and extract standard ZIP files.
It does not take much effort to copy a physical file (table) to the IFS (stream file system) in ASCII CSV format and zip it:
CPYTOIMPF FROMFILE(LIB/FILE) TOSTMF('path/file.csv') STMFCODPAG(*STDASCII) RCDDLM(*CRLF)
QSH CMD('jar cvfM path/file.zip -C path file.csv')
Upvotes: 4