It's just as Splat said, not often done but possible.
this took a while to find...
http://www.as400pro.com/tipView.php?cat=RPG&key=215
Placing a 1 character input field with the keyword CHECK(ER) returns processing to the program after each character is enterd.
An ouput Field of 10A could display '*'' when the first character is entered into the input field and one more '*' as each new character is entered.
Phil
Last Wiki Answer Submitted: November 28, 2011 6:08 pm by philpl1jb44,070 pts.
All Answer Wiki Contributors: philpl1jb44,070 pts.
If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.
Unless IBM’s added new functionality to DDS since the last time I looked, there’s not an easy way to do it.
In an earlier discussion I recall Tom Liotta suggesting that on each key stroke an asterisk could be echoed back to the display, but the coding would be rather extensive for the benefit derived.
In those times I’ve needed to protect entered data I just use DSPATR(ND) and let the user have at it.
can i use XLATE operation to convert character to asterisk….
Yes, but it doesn’t help in this question. Run this in debug and see the results:
DAlpha c 'ABCDEFGHIJLKMNOPQRSTUVWXYZ'
DAstrx c '**************************'
DRes_tmp s 15 inz
DGen s 15 inz( 'ABCDEFGHI' )
C Alpha:Astrx xlate Gen Res_tmp
c eval Res_tmp = %xlate( Alpha : Astrx : Gen )
c return
It should only take a minute or two to realize that it doesn’t affect input on the screen.
LOGIN, you didn’t say LOGIN
.. this won’t work for login
.. Don’ ned no stinkin login..
Sorry, there is a limited range of things that can be done with the AS/400 login screen and this isn’t amoung them.
The masking process that I mentioned was intended for other hidden values such as application passwords.
Phil
Phil
In that case, the only real choice you have is to input each character one at a time. As each character is entered, output a field of asterisks back out to the screen. Add one more asterisk each time.
That’s the only choice you have. It’s due to the technology used in workstation terminal output — ‘block mode’.
In short, you have to write it all yourself. (That’s one reason none of us ever use such a technique.)
Mr. Phil, i used your link… but i can’t get correct answer… the link program make some error… as well as i used the xlate function, it also gave me incorrect answer… if u have another tips, share me….
Show us your code, the display file and program and the error.
We will teach you how to debug it.
The XLATE isn’t necessary to solve this problem, you just seemed attached to it.
Phil
Unless IBM’s added new functionality to DDS since the last time I looked, there’s not an easy way to do it.
In an earlier discussion I recall Tom Liotta suggesting that on each key stroke an asterisk could be echoed back to the display, but the coding would be rather extensive for the benefit derived.
In those times I’ve needed to protect entered data I just use DSPATR(ND) and let the user have at it.
can i use XLATE operation to convert character to asterisk…. is this possible or not?????
can i use XLATE operation to convert character to asterisk….
Yes, but it doesn’t help in this question. Run this in debug and see the results:
DAlpha c 'ABCDEFGHIJLKMNOPQRSTUVWXYZ' DAstrx c '**************************' DRes_tmp s 15 inz DGen s 15 inz( 'ABCDEFGHI' ) C Alpha:Astrx xlate Gen Res_tmp c eval Res_tmp = %xlate( Alpha : Astrx : Gen ) c returnIt should only take a minute or two to realize that it doesn’t affect input on the screen.
Tom
i want convert my password as asterisk, when i login…..
when i login…..
If you haven’t logged in yet, how are you planning to run your programming to mask your password?
Tom
LOGIN, you didn’t say LOGIN
.. this won’t work for login
.. Don’ ned no stinkin login..
Sorry, there is a limited range of things that can be done with the AS/400 login screen and this isn’t amoung them.
The masking process that I mentioned was intended for other hidden values such as application passwords.
Phil
Phil
i didn’t say about AS400 login screen…. i have built my own project… it have login screen.. here i want to do like that…. this s my point..
i want to do like that….
In that case, the only real choice you have is to input each character one at a time. As each character is entered, output a field of asterisks back out to the screen. Add one more asterisk each time.
That’s the only choice you have. It’s due to the technology used in workstation terminal output — ‘block mode’.
In short, you have to write it all yourself. (That’s one reason none of us ever use such a technique.)
Tom
You sure threw us a curve when you said login.
It would be nice if IBM had a display file keyword that would show an * for each charerter typed but it doesn’t.
Here, again, is the link to the code that will do what you want.
http://www.as400pro.com/tipView.php?cat=RPG&key=215
Could this code use the XLATE command, yes.
Does this code need to use the XLATE command, no.
If you’re having difficulty implmenting it please ask for further clarification.
Phil
Mr. Phil, i used your link… but i can’t get correct answer… the link program make some error… as well as i used the xlate function, it also gave me incorrect answer… if u have another tips, share me….
Show us your code, the display file and program and the error.
We will teach you how to debug it.
The XLATE isn’t necessary to solve this problem, you just seemed attached to it.
Phil