Skip to main content
Feb 9, 2018 2:55 AM UTC

Output from GIT always coming back in ASCII

I have written a REXX exec to inface to GIT.

Specifically I use BPXWUNIX to issue my commands. The issue I have is the output from the command is always in ASCII (ISO-8859-1). Forcing me the perform a conversion before I can read the results.

This doesn’t happen if I issue the command in OMVS.

I’ve tried using BPXWUNIX using redirection

eg    x=BPXWUNIX('git status >output.txt',,,,,1)  

and coding the stdout in the function call

eg   x=BPXWUNIX('git status',,'output.',,,1) 

I have my profile setup with

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

Does anyone know how I can get the system/git to perform the conversion to EBCDIC before I get the output ?

Regards,
Gary

    25 replies

    Tatiana Balaburkina
    Rocketeer
    Mar 27, 2018 3:02 AM UTC

    A colleague of mine had a very good idea. He said: Check what curl and git do to STDOUT and STDERR in terms of tagging.

    I did and found that curl changes tagging to

    STDOUT: 1047 8000
    STDERR: 1047 8000

    This is the reason that git produces readable output when calling curl first.

    When calling git without prior invocation of curl no tagging takes place that is before and after calling git we have:

    STDOUT: 0000 0000
    STDERR: 0000 0000

    Hi Manfred,

    Thanks for your participation on the forum =)

    Tatiana Balaburkina
    Rocketeer
    Mar 27, 2018 3:11 AM UTC

    Excellent Manfred.

    Is there anything I can do to change the tagging for GIT or is this an internal thing that Rocket has to do to the GIT product internally?

    Regards,
    Gary

    Hi Gary,

    This problem occurs in git version, which was released more than in 2016. cURL uses new internal library, so this problem doesn’t exist in cURL. We are working on porting new git version (2.14), it will be released soon. The best way is to wait for new version.

    Thanks,
    Tatyana

    Mar 27, 2018 4:55 AM UTC

    Hi Gary,

    This problem occurs in git version, which was released more than in 2016. cURL uses new internal library, so this problem doesn’t exist in cURL. We are working on porting new git version (2.14), it will be released soon. The best way is to wait for new version.

    Thanks,
    Tatyana

    For the time being, as a workaround I told Gary to do a

    curl --version

    before invoking git. This seems to be sufficient to get a readable output from git.

    I should add that simply tagging stdout and stderr as 1047 and text before invoking git isn’t enough to get readable output from git. Therefore, the workaround above.

    Jul 9, 2018 12:16 AM UTC

    The internal issue is opened for this case.

    Any update on this “internal issue” ?

    Sergey Rezepin
    Rocketeer
    Jul 9, 2018 2:34 AM UTC

    Any update on this “internal issue” ?

    Hi Gary,

    The fix will be available for 2.14 git version.

    Thanks,
    Sergey