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