Skip to main content
Frank Swarbrick
Participating Frequently
Dec 10, 2020 2:20 PM UTC

output from openssl

So this is odd.  I use OMVS as my entry to my z/OS shell.  Curl and bash and bash work fine.  Openssl mostly works fine, with one quirk.  If I try openssl before having executed bash or curl in the same shell session the output from openssl doesn't seem to be converted from ASCII to EBCDIC, and is thus unreadable.  But if, as I said, I have used curl or bash in the same session then openssl now works.

Here is an example:
IBM 
Licensed Material - Property of IBM
5650-ZOS Copyright IBM Corp. 1993, 2017
(C) Copyright Mortice Kern Systems, Inc., 1985, 1996.
(C) Copyright Software Development Group, University of Waterloo, 1989.

U.S. Government Users Restricted Rights -
Use,duplication or disclosure restricted by
GSA ADP Schedule Contract with IBM Corp.

IBM is a registered trademark of the IBM Corp.

[-sh]DVFJS:/u/dvfjs:>openssl
|øÁ>ëë<--
äáá----ë-èÇÁ-ËÑÅ>/%-ëñåñ+è-Ï/Ë-ÊÁÄÁÑÎÁÀ--
<"Control-C" entered to terminate openssl>
[-sh]DVFJS:/u/dvfjs:>
[-sh]DVFJS:/u/dvfjs:>curl
curl: try 'curl --help' for more information
[-sh]DVFJS:/u/dvfjs:>openssl
OpenSSL> quit
[-sh]DVFJS:/u/dvfjs:>
I have all of the conversion related environment variables set in my .profile:

export _BPXK_AUTOCVT=ALL 
export _CEE_RUNOPTS="FILETAG(AUTOCVT,AUTOTAG) POSIX(ON) $_CEE_RUNOPTS"
export _TAG_REDIR_ERR=txt
export _TAG_REDIR_IN=txt
export _TAG_REDIR_OUT=txt

Am I missing something?  I am using the version from openssl-1.0.2k_b004.170321.tar.gz that I downloaded on November 10.



------------------------------
Frank Swarbrick
FirstBank
------------------------------

    7 replies

    Sergey Rezepin
    Rocketeer
    Dec 11, 2020 6:02 AM UTC
    So this is odd.  I use OMVS as my entry to my z/OS shell.  Curl and bash and bash work fine.  Openssl mostly works fine, with one quirk.  If I try openssl before having executed bash or curl in the same shell session the output from openssl doesn't seem to be converted from ASCII to EBCDIC, and is thus unreadable.  But if, as I said, I have used curl or bash in the same session then openssl now works.

    Here is an example:
    IBM 
    Licensed Material - Property of IBM
    5650-ZOS Copyright IBM Corp. 1993, 2017
    (C) Copyright Mortice Kern Systems, Inc., 1985, 1996.
    (C) Copyright Software Development Group, University of Waterloo, 1989.

    U.S. Government Users Restricted Rights -
    Use,duplication or disclosure restricted by
    GSA ADP Schedule Contract with IBM Corp.

    IBM is a registered trademark of the IBM Corp.

    [-sh]DVFJS:/u/dvfjs:>openssl
    |øÁ>ëë<--
    äáá----ë-èÇÁ-ËÑÅ>/%-ëñåñ+è-Ï/Ë-ÊÁÄÁÑÎÁÀ--
    <"Control-C" entered to terminate openssl>
    [-sh]DVFJS:/u/dvfjs:>
    [-sh]DVFJS:/u/dvfjs:>curl
    curl: try 'curl --help' for more information
    [-sh]DVFJS:/u/dvfjs:>openssl
    OpenSSL> quit
    [-sh]DVFJS:/u/dvfjs:>
    I have all of the conversion related environment variables set in my .profile:

    export _BPXK_AUTOCVT=ALL 
    export _CEE_RUNOPTS="FILETAG(AUTOCVT,AUTOTAG) POSIX(ON) $_CEE_RUNOPTS"
    export _TAG_REDIR_ERR=txt
    export _TAG_REDIR_IN=txt
    export _TAG_REDIR_OUT=txt

    Am I missing something?  I am using the version from openssl-1.0.2k_b004.170321.tar.gz that I downloaded on November 10.



    ------------------------------
    Frank Swarbrick
    FirstBank
    ------------------------------

    Hi Frank,

    Could you try to change the following variable?

    export _BPXK_AUTOCVT=ALL

    to

    export _BPXK_AUTOCVT=ON

    Thanks,

    -Sergey



    ------------------------------
    Sergey Rezepin
    Rocket Software
    ------------------------------
    Frank Swarbrick
    Participating Frequently
    Dec 11, 2020 10:37 AM UTC

    Hi Frank,

    Could you try to change the following variable?

    export _BPXK_AUTOCVT=ALL

    to

    export _BPXK_AUTOCVT=ON

    Thanks,

    -Sergey



    ------------------------------
    Sergey Rezepin
    Rocket Software
    ------------------------------
    That worked!
    Can you explain why?

    ------------------------------
    Frank Swarbrick
    FirstBank
    ------------------------------
    Vladimir Ein
    Rocketeer
    Dec 14, 2020 1:51 PM UTC
    That worked!
    Can you explain why?

    ------------------------------
    Frank Swarbrick
    FirstBank
    ------------------------------
    Hello Frank,

    In certain cases, _BPXK_AUTOCVT=ALL and _BPXK_AUTOCVT=ON work differently, that is, _BPXK_AUTOCVT=ON is not a pure subset of _BPXK_AUTOCVT=ALL. For example, when an ASCII program reads an untagged file, and the AUTOCVT option is enabled in _CEE_RUNOPTS, auto-conversion may or may not happen depending on _BPXK_AUTOCVT. That's why we request our customers to use _BPXK_AUTOCVT=ON, and try to do our best to document this requirement.

    On startup, most our tools set up text conversion for input/output streams (and sometimes, for the terminal). Looks like with _BPXK_AUTOCVT=ALL, OpenSSL was failing to do it properly, while bash and curl probably affected the environment or the conversion state.

    Just curious, was there any specific reason for you to use _BPXK_AUTOCVT=ALL ?

    Thanks,
    Vladimir

    ------------------------------
    Vladimir Ein
    Rocket Software
    ------------------------------
    Frank Swarbrick
    Participating Frequently
    Dec 14, 2020 1:56 PM UTC
    Hello Frank,

    In certain cases, _BPXK_AUTOCVT=ALL and _BPXK_AUTOCVT=ON work differently, that is, _BPXK_AUTOCVT=ON is not a pure subset of _BPXK_AUTOCVT=ALL. For example, when an ASCII program reads an untagged file, and the AUTOCVT option is enabled in _CEE_RUNOPTS, auto-conversion may or may not happen depending on _BPXK_AUTOCVT. That's why we request our customers to use _BPXK_AUTOCVT=ON, and try to do our best to document this requirement.

    On startup, most our tools set up text conversion for input/output streams (and sometimes, for the terminal). Looks like with _BPXK_AUTOCVT=ALL, OpenSSL was failing to do it properly, while bash and curl probably affected the environment or the conversion state.

    Just curious, was there any specific reason for you to use _BPXK_AUTOCVT=ALL ?

    Thanks,
    Vladimir

    ------------------------------
    Vladimir Ein
    Rocket Software
    ------------------------------
    No specific reason.  I didn't (and still don't) understand the differences, so I figured ALL would work just as well as ON.  I'll use ON for now on.  Thanks.

    ------------------------------
    Frank Swarbrick
    FirstBank
    ------------------------------
    New Participant
    Jan 28, 2021 10:08 AM UTC

    Hi Frank,

    Could you try to change the following variable?

    export _BPXK_AUTOCVT=ALL

    to

    export _BPXK_AUTOCVT=ON

    Thanks,

    -Sergey



    ------------------------------
    Sergey Rezepin
    Rocket Software
    ------------------------------
    Hi,
    We are running openssl version OpenSSL 1.0.2l-dev on z/OS version 2.4. We have the same problem. Changing _BPXK_AUTOCVT does not solve the problem.

    Best wishes,
    Anders



    ------------------------------
    Anders Westerberg
    Tech z/OS
    HCL
    ------------------------------
    Frank Swarbrick
    Participating Frequently
    Jan 28, 2021 12:19 PM UTC
    Hi,
    We are running openssl version OpenSSL 1.0.2l-dev on z/OS version 2.4. We have the same problem. Changing _BPXK_AUTOCVT does not solve the problem.

    Best wishes,
    Anders



    ------------------------------
    Anders Westerberg
    Tech z/OS
    HCL
    ------------------------------
    Looks like the following is also required:
    _CEE_RUNOPTS="FILETAG(AUTOCVT,AUTOTAG) POSIX(ON)"

    ------------------------------
    Frank Swarbrick
    FirstBank
    ------------------------------
    New Participant
    Jan 28, 2021 12:49 PM UTC
    Looks like the following is also required:
    _CEE_RUNOPTS="FILETAG(AUTOCVT,AUTOTAG) POSIX(ON)"

    ------------------------------
    Frank Swarbrick
    FirstBank
    ------------------------------
    Thanks Frank, that did the trick!
    :>)

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

    All the best,
    Anders

    ------------------------------
    Anders Westerberg
    Tech z/OS
    HCL
    ------------------------------