• 2200 UCS C Question

    From Kira Ash@hpeintegrity@gmail.com to comp.sys.unisys on Thu Sep 8 09:44:02 2022
    From Newsgroup: comp.sys.unisys

    Hi all,
    I'm fairly new to the OS 2200 environment. I noticed that when I invoke newly compiled UCS C programs with @XQT, access to stdin works as expected - the user is prompted for input by getchar(), for instance. However, when invoking the program directly (via @programname), the program immediately completes without prompting for input, and garbage is present in the input buffers. I'm probably missing something obvious, but I would very much appreciate any suggestions as to why this is!!
    Kira
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Andrew@Doug@hyperspace.vogon.gov to comp.sys.unisys on Thu Sep 8 20:49:25 2022
    From Newsgroup: comp.sys.unisys

    Kira Ash wrote:
    Hi all,

    I'm fairly new to the OS 2200 environment. I noticed that when I invoke newly compiled UCS C programs with @XQT, access to stdin works as expected - the user is prompted for input by getchar(), for instance. However, when invoking the program directly (via @programname), the program immediately completes without prompting for input, and garbage is present in the input buffers. I'm probably missing something obvious, but I would very much appreciate any suggestions as to why this is!!

    Kira


    If you call a program as a processor, the first thing you get to read is
    the fields on the processor call. As an example,
    @UC,opts file.input-elt,file2.output-om
    The normal procedure is to call RINF$ (SYSLIB) to move all this
    information to an internal buffer, RINF$ uses some form of ER READ$ or
    ER SYMB$ to do this. Once you have read the command line you can start
    using getchar() normally.

    If you call a program using @xqt you don't have anything RINF$
    understands so you can move straight to user-input.
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Kira Ash@hpeintegrity@gmail.com to comp.sys.unisys on Thu Sep 8 12:23:25 2022
    From Newsgroup: comp.sys.unisys

    On Thursday, September 8, 2022 at 11:49:32 AM UTC-7, Andrew wrote:
    Kira Ash wrote:
    Hi all,

    I'm fairly new to the OS 2200 environment. I noticed that when I invoke newly compiled UCS C programs with @XQT, access to stdin works as expected - the user is prompted for input by getchar(), for instance. However, when invoking the program directly (via @programname), the program immediately completes without prompting for input, and garbage is present in the input buffers. I'm probably missing something obvious, but I would very much appreciate any suggestions as to why this is!!

    Kira

    If you call a program as a processor, the first thing you get to read is
    the fields on the processor call. As an example,
    @UC,opts file.input-elt,file2.output-om
    The normal procedure is to call RINF$ (SYSLIB) to move all this
    information to an internal buffer, RINF$ uses some form of ER READ$ or
    ER SYMB$ to do this. Once you have read the command line you can start
    using getchar() normally.

    If you call a program using @xqt you don't have anything RINF$
    understands so you can move straight to user-input.
    Thank you so much! That explains it.
    --- Synchronet 3.21d-Linux NewsLink 1.2