Open-source Languages & Tools for z/OS

 View Only
  • 1.  Curl 7.52.1: Get converts EBCDIC to ASCII

    Posted 05-30-2018 10:16

    Curl put works fine using bash in BPXBATCH and puts file as desired in EBCDIC.

    //TRANS EXEC PGM=BPXBATCH
    //STDPARM DD *
    sh /shared/swp/uss/rok/bin/bash -c ’
    curl --user xxxxx:xxxxx
    –show-error --verbose -k -T ROLITES2.TXT
    https://files.admin.com/xxxx/yyyy/

    //STDOUT DD SYSOUT=*
    //STDERR DD SYSOUT=*

    Curl get converts same file into ASCII. We tried several options to avoid conversion. Nothing helped.

    //TRANS1 EXEC PGM=BPXBATCH
    //STDPARM DD *
    sh /shared/swp/uss/rok/bin/bash -c ’
    curl --user xxxxx:xxxxxx --show-error --verbose -k
    https://files.admin.com/xxxx/yyyy/ROLITES2.TXT

    /home/t7555/ROLITES2.TXT

    //STDOUT DD SYSOUT=*
    //STDERR DD SYSOUT=*

    We have moved to Curl 7.52.1 with z/os V2R3 Migration. Former Curl with z/OS V2R1
    curl 7.16.1 has no problem. With z/OS V2R3 we have to take it as a sperate Rocket product.
    It is no more integrated in z/OS.

    OMVS Profile contains
    _BPXK_AUTOCVT=“ON”
    _CEE_RUNOPTS=“FILETAG(AUTOCVT,AUTOTAG) POSIX(ON)”

    Any hints would be appreciated. Many thanks.



  • 2.  RE: Curl 7.52.1: Get converts EBCDIC to ASCII

    Posted 05-31-2018 03:49

    Hi,
    I have found the solution to get it back in EBCDIC:

    export _ENCODE_FILE_NEW=IBM-1047 ;

    //TRANS1 EXEC PGM=BPXBATCH
    //STDPARM DD *
    sh /shared/swp/uss/rok/bin/bash -c ’
    export _ENCODE_FILE_NEW=IBM-1047 ;
    curl --user xxxxx:xxxxx --show-error --verbose -k
    https://files.admin.com/xxxx/yyyy/ROLITES2.TXT

    /home/t7555/ROLITES2.TXT

    //STDOUT DD SYSOUT=*
    //STDERR DD SYSOUT=*