How to pull console input with non-empty stack in REXX?

90 Views Asked by At

I want to ask for console input without disturbing the contents of the stack. However, the PULL function will always pull from the stack first if it is not empty. How can I do this?

2

There are 2 best solutions below

0
Ross Patterson On BEST ANSWER

Depending on the platform, you may be able to use PARSE EXTERNAL. Not every Rexx implementation supports it - it's not part of the ANSI standard. But, for example, IBM's TSO/E and z\VM implementations do. PARSE EXTERNAL always reads from the console, no matter what the contents of the stack.

0
cschneid On

Create a new stack prior to your PULL, delete it when you're done with the PULL.