mvslovers / brexx370

MVS version of Vasilis Vlachoudis awesome rexx implementation
46 stars 11 forks source link

brexx interactive mode is not functional #34

Closed mgrossmann closed 4 years ago

mgrossmann commented 5 years ago

"If there is no arguments following the ‘-‘, then BRexx will wait for the user to type into STDIN the program. To end the program type Ctrl-Z ...”

As an example:

rexx - (press return, and type...)

    do x=0 to 6.28 by 0.1
        y = trunc(39*(sin(x)+1)) + 1
        say copies(' ',y) || '*'
    end

Ctlr-Z

This does not appear to be working. When attempting, by typing “[tso] r[ex]x –“ (without the quotes, of course) at TSO’s “READY” prompt or under RFE|RPF|[ISPF] , pressing return to advance to the next line to continue program entry does not work. In fact, when pressing enter, absolutely nothing happens. Entering ctlr-z (or ctlr-d) with the standard keyboard set-up using Vista’s TN3270 on TK4- under Windows 8.1 gives the same response, nothing. Needless to say, other key[combinations]s are to no avail. The session, at this point, is hung. To continue, one has to utilize the MVS console to cancel the TSO session and then return to the terminal window to login, again. Just terminating the 3270 session and restarting it to reconnect to the TSO session returns one back to the point of stasis, HUNG! So I don’t believe that it’s a problem of terminal emulation. Without this feature functioning we are limited to 1-liners under the “[TSO] r[ex]x –“ directive, a downer when doing BRexx/370 development and testing. What would be nice is allowing enter to take you to the next line and ctrl-z to end program entry and initiate execution. If this feature is not to be implemented, please advise. If anyone has run into (and hopefully, solved) this problem, any direction would be most welcome ...

mgrossmann commented 5 years ago

The problem at this point is that we read from STDIN until an EOF is found. This can be simulated under other operating systems with CTRL+Z. Unfortunately, this is not possible under MVS/TSO. (There may be a key, but I don't know it. @Juergen-Git is there any?) We will solve this problem in V2R3 by defining a keyword that will stop reading STDIN. I hope everyone is happy with this solution.

mgrossmann commented 4 years ago

as commented above, ctrl-z is not available in tso. simply use the exit instruction.