C/C++

C/C++

C/C++

Your one-stop destination to learn and collaborate about the latest innovations in IBM C/C++ for z/OS compilers to develop high-performing C/C++ applications and system programs on z/OS while maximizing hardware use and improving application performance.

 View Only

strange behaviour when using -qascii option - is this a bug?

  • 1.  strange behaviour when using -qascii option - is this a bug?

    Posted Fri August 19, 2022 03:54 AM
    I have a hello world program, compiled with -qascii.
    If I run it in OMVS, it outputs the data in ASCII - and so is unreadable on my TSO OMVS session.

    If I run python3 --version first - it works fine.

    Using fcntl( STDOUT_FILENO...)  I can see that before Python the filedesc is 0, and afterwards is 0x0417.
    If I use
    f.cvtcmd = SETAUTOCVTON ;
    f.fccsid = 0x0417 ;
    f.pccsid = 0x0000 ; // program 333 = ascii, 0 take default
    rc =fcntl( STDOUT_FILENO,action, &f );

    My program works

    Should this be done automatically?

    I'm happy to document this - but where do I find the code page value ( x0417) to specify in the fccsid?

    Overall I think this is a bug or a documentation update

    ------------------------------
    Colin Paice
    ------------------------------