z/OS Tools & Language

Expand all | Collapse all

UNZIP problems STDOUT is ascii!

  • 1.  UNZIP problems STDOUT is ascii!

    Posted 05-02-2017 14:27

    Just downloaded then ftp’d to z/OS
    -rw-rw-rw- 1 RXT025 OMVSDIS 296615 May 2 13:53 unzip-6.0_b0006.161123.tar.gz
    installed via
    /bin/cat /zusr/home/RXT025/gz/unzip-6.0_b0006.161123.tar.gz | gunzip -c | /bin/tar -C /zusr/home/RXT025/unzip -xUXovf -

    result running is

    cd /zusr/home/RXT025/unzip/bin
    RXT025@SYSS:bin, Tue May 02, 02:16 PM $ unzip -l
    í>!Ñø?à øÊÑ%Âñ>Ã?!ñ&(/Ñ>È/Ñ>ÁÀÂäëøÑÁ%ÁÊëÁ>ÀÂÍÅÊÁø?ÊÈËÍËÑ>ÅÇÈÈøÏÏÏÑ>Ã?:Ñø?ÊÅ:ÑøÂÍÅÇÈ_%ËÁÁêá à(áÃ?ÊÀÁÈ/Ñ%ËíË/ÅÁÍ>:Ñø$!)$?øÈË$?ÀÑÃÑÁÊË))ÃÑ%Á$:Ñø)$%ÑËÈ)$ÌÌ%ÑËÈ)$ÀÁÌÀÑÊ)àÁÃ/Í%È/ÄÈÑ?>ÑËÈ?ÁÌÈÊ/ÄÈÃÑ%ÁËÑ>%ÑËÈÁÌÄÁøÈÈÇ?ËÁÑ>Ì%ÑËÈÈ?ÁÌÀÑÊÃÑ%Á$:Ñø)/ÂÁ/ÏÑ%ÀÄ/ÊÀ!!Ñøñ>Ã?_?ÀÁÍ>:Ñø!Ã?ÊÍË/ÅÁøÁÌÈÊ/ÄÈÃÑ%ÁËÈ?øÑøÁ>?_ÁËË/ÅÁË%%ÑËÈÃÑ%ÁËËÇ?ÊÈÃ?Ê_/ÈÃÃÊÁËÇÁ>ÁÌÑËÈÑ>ÅÃÑ%ÁËÄÊÁ/ÈÁ>?>ÁÈÈÁËÈÄ?_øÊÁËËÁÀ/ÊÄÇÑÎÁÀ/È/ÍÍøÀ/ÈÁÃÑ%ÁËÄÊÁ/ÈÁÑÃ>ÁÄÁËË/Ê:ÀÑËø%//ÊÄÇÑÎÁÄ?__Á>È?>%Î%ÑËÈÎÁÊÂ?ËÁ%ËÇ?ÏÎÁÊËÑ?>Ñ>Ã?èÈÑ_ÁËÈ/_ø/ÊÄÇÑÎÁÈ?%/ÈÁËÈÌÁÌÄ%ÍÀÁÃÑ%ÁËÈÇ/ÈÃ?%%?ÏÑ>Ì%ÑËÈÀÁÌÈÊ/ÄÈÃÑ%ÁËÑ>È?ÁÌÀÑÊ_?ÀÑÃÑÁÊË>>ÁÎÁÊ?ÎÁÊÏÊÑÈÁÁÌÑËÈÑ>ÅÃÑ%ÁËÉÉÍÑÁÈ_?ÀÁÉÉÉÍÑÁÈÁÊ??ÎÁÊÏÊÑÈÁÃÑ%ÁËïñèç|íèøÊ?_øÈÑ>Å//ÍÈ?Ä?>ÎÁÊÈ/>ÈÁÌÈÃÑ%Á˦¦Í>,ø/ÈÇËÀ?>?È_/,ÁÀÑÊÁÄÈ?ÊÑÁË//ÈÊÁ/È <<ÃÑ%ÁË/ËÈÁÌÈä_/ÈÄÇÃÑ%Á>/ÁËÄ/ËÁÑ>ËÁ>ËÑÈÑÎÁ%<_/,ÁË?_Á>/_ÁË%?ÏÁÊÄ/ËÁìÊÁËÈ?ÊÁíñàåñàÑ>Ã?îÊÁÈ/Ñ>î(ëÎÁÊËÑ?>>Í_ÂÁÊË.,ÁÁøËÁÈÍÑÀËÁÈÅÑÀÈ/Ä,øÁÊ_ÑËËÑ?>Ë(øÑøÁÈÇÊ?ÍÅÇ?ÊÁø/ÅÁÊëÁÁÍ>:ÑøÇÇ?ÊÍ>:ÑøÈÌÈÃ?Ê_?ÊÁÇÁ%øáÌ/ø%ÁËÍ>:ÑøÀ/È/̦?ÁÁÌÈÊ/ÄÈ/%%ÃÑ%ÁËÁÌÄÁøȦ?ÁÃÊ?:ÑøÃÑ%ÁÀ/È/:ÑøÍ>:ÑøøÃ??@_?ÊÁËÁ>ÀÄ?>ÈÁ>ÈË?ÃÃ??:ÑøÎÑ/øÑøÁÑ>È?øÊ?ÅÊ/__?ÊÁÍ>:ÑøÃ?Ã??êÁ/À(ÁÉÍÑÁÈ%`ÊÁø%/ÄÁÁÌÑËÈÑ>ÅêÁ/À(ÁÑÃ/ÊÄÇÑÎÁÃÑ%Á>ÁÏÁÊRXTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTT
    bash: PuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTY: command not found
    RXT025@SYSS:bin, Tue May 02, 02:17 PM $

    Again with piping into iconv

    unzip | iconv -f ISO8859-1 -t IBM1047
    UnZip 6.00 of 20 April 2009, by Info-ZIP. Maintained by C. Spieler. Send
    bug reports using http://www.info-zip.org/zip-bug.html; see README for details.

    Usage: unzip [-Z] [-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir]
    Default action is to extract files in list, except those in xlist, to exdir;
    file[.zip] may be a wildcard. -Z => ZipInfo mode (“unzip -Z” for usage).

    -p extract files to pipe, no messages -l list files (short format)
    -f freshen existing files, create none -t test compressed archive data
    -u update files, create if necessary -z display archive comment only
    -v list verbosely/show version info -T timestamp archive to latest
    -x exclude files that follow (in xlist) -d extract files into exdir
    modifiers:
    -n never overwrite existing files -q quiet mode (-qq => quieter)
    -o overwrite files WITHOUT prompting -a auto-convert any text files
    -j junk paths (do not make directories) -aa treat ALL files as text
    -C match filenames case-insensitively -L make (some) names lowercase
    -X restore UID/GID info -V retain VMS version numbers
    -K keep setuid/setgid/tacky permissions -M pipe through “more” pager
    See “unzip -hh” or unzip.txt for more help. Examples:
    unzip data1 -x joe => extract all files except joe from zipfile data1.zip
    unzip -p foo | more => send contents of foo.zip via pipe into program more
    unzip -fo foo ReadMe => quietly replace existing ReadMe if archive file newer
    RXT025@SYSS:bin, Tue May 02, 02:24 PM $



  • 2.  RE: UNZIP problems STDOUT is ascii!

    Posted 05-02-2017 16:15

    unzip is now built using z/OS enhanced ASCII support, and it looks like we may not have used the pragma that enables auto conversion. It should work if you export the environment variable _CEE_RUNOPTS, like this:

    export _CEE_RUNOPTS="FILETAG(AUTOCVT)"
    

    I’ve opened a bug report for this.

    FWIW - I always run with:

    _BPXK_AUTOCVT=ON
    _CEE_RUNOPTS=FILETAG(AUTOCVT,AUTOTAG) POSIX(ON)
    

    As more and more tools are ported using enhanced ASCII support, this is going to ensure the best behavior.