0

Currently i am writing a rexx program in which i need to mask password input. I use this code to get my panel displayed:

address ispexec"libdef ispplib dataset id('my.pds')
address ispexec 'display panel(member)'

This works perfectly, and returns the password to a variable, in which i perform various checks on.

After that i continue on in my rexx program. the next function that occurs, is taking in input from the user by using Rexx's 'say' 'pull' method. This is where the weird error occurs.

I have to check user input again, if its invalid it loops back to the 'pull'. However, upon returning to the 'pull' instead of allowing the user to input data, the program gets the bottom of data symbol '***'. This then of course causes an infinite loop and the user then can't put in data.

I believe the cause is displaying the panel, then using clrscrn. Cause i can take out clrscrn and it works fine but data truncates on other pages. Or i can sacrifice masking the user password by NOT displaying the ispf panel and it works. But together it fails.

I was wondering what is happening and the potential fix.

Rexx Code i use to replicate the error after displaying the panel:

do while chk <> 'N'
  clrscrn
  do i = 1 to 5
     say '-test'
  end
  pull chk
end

Result one with user input of ' '

-test
-test
-test
-test
-test
 ' '      <---- User inputs space, invalid entry, has to be 'N'
  ***      <-- for some reason hits bottom of data

Then it loops back with a result of:

-test
-test
-test
-test
-test
  ***    <---- automatically hits bottom of data

To reiterate, if i take out the clrscrn, bottom of data never occurs. but error too many times, data truncates to another page.

Put clrscrn back in, don't display an ispf panel. Code works flawlessly, bottom of data never occurs.

Panel code:

)PANEL
)ATTR
~  TYPE(INPUT) INTENS(NON) Pad(_)
!  TYPE(TEXT) COLOR(RED) SKIP(ON)
)BODY WINDOW(80,24)
!            CREATE YOUR PIN NUM
!--------------------------------------------
!
!            ENTER YOUR PIN:~INP !
!            CONFIRM PIN...:~INPT!
!
!             MUST BE 4-DIGITS
)END

Another panel I also call before similiar situations:

)PANEL
)ATTR
~  TYPE(INPUT) INTENS(NON) Pad(_)
!  TYPE(TEXT) COLOR(RED) SKIP(ON)
)BODY
!           VERIFY YOUR IDENTITY
!--------------------------------------------
!
!            ENTER YOUR PIN: ~Z   !
)INIT
&ZEDSMSG = ''
&ZEDLMSG = ''
.ZVARS = '( INP )'
.ATTR(INP)  = '&ATTRPIN'
)PROC
&RESP = .RESP
)END
jelch
  • 21
  • 4
  • https://stackoverflow.com/questions/18084599/is-it-possible-to-hide-user-typed-input-in-rexx-program I used this question for masking password – jelch Oct 13 '17 at 00:19
  • 1
    Use `ISPF panels` for data entry!!! Do not use say/pull !!!!. Its simpler and easier for the users + you can use swap commands etcf – Bruce Martin Oct 13 '17 at 00:43
  • I definitely agree, however, I had already written a lot of code. Because i only need single inputs in so many places. Is there away around this issue or once you make a panel display this will always occur? – jelch Oct 13 '17 at 00:46
  • Password masking was a final addition – jelch Oct 13 '17 at 00:52
  • Bruce, Can you at least give me a suggestion as to why this does not work. As i just taught myself rexx starting monday, and ispf panels were new to me starting today. – jelch Oct 13 '17 at 01:34
  • I do not know why it is not working, I always used ISPF panels when I could. Why not add the new field to the existing panel. – Bruce Martin Oct 13 '17 at 02:01
  • Mixing ISPF and TPUT/TGET can do strange things. In addition, if you use a session monitor or TN3270 emulator that optimizes the data stream, e.g., remembering what character was at a position and stripping that from the next outgoing stream, the display can get confused. I have seen the "***" accepted as input if the cursor position changes before the next transmit key. As suggested above, I would either use one or the other method as input, not a mix. Less chance for error, fewer gray hairs and less of a descent into insanity. :) – zarchasmpgmr Oct 14 '17 at 18:02

1 Answers1

0

The 3 asterisks indicate you have gone from full screen mode to line mode. The REXX say statement is line mode. You probably have a terminal using an alternate screen size (mod5, 62 x 160, etc). TSO VTAM will force the *** to protect against issues in changing between primary and alternate screen size. Use the following ISPF service instead of CLRSCRN

address ISPEXEC "CONTROL DISPLAY LINE START(1)"

This will put you in line mode and clear the screen. Your REXX routine works for me when I use the CONTROL DISPLAY LINE. This also tells ISPF that line mode has been entered which could also avoid screen corruption errors using CLRSCRN.

Marv Knight
  • 416
  • 2
  • 4