convert password like ‘******’ in RPGLE

3790 pts.
Tags:
Rpgle - display file
how do i show the password field as some symbols like(*****)..i tried it...but it shows only blank....

Software/Hardware used:
as400 v4r5

Answer Wiki

Thanks. We'll let you know when a new response is added.

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

Discuss This Question: 11  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Splat
    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.
    7,635 pointsBadges:
    report
  • pdsathishkumar
    can i use XLATE operation to convert character to asterisk.... is this possible or not?????
    3,790 pointsBadges:
    report
  • TomLiotta
    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. Tom
    125,585 pointsBadges:
    report
  • pdsathishkumar
    i want convert my password as asterisk, when i login.....
    3,790 pointsBadges:
    report
  • TomLiotta
    when i login….. If you haven't logged in yet, how are you planning to run your programming to mask your password? Tom
    125,585 pointsBadges:
    report
  • philpl1jb
    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
    51,355 pointsBadges:
    report
  • pdsathishkumar
    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..
    3,790 pointsBadges:
    report
  • TomLiotta
    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
    125,585 pointsBadges:
    report
  • philpl1jb
    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
    51,355 pointsBadges:
    report
  • pdsathishkumar
    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....
    3,790 pointsBadges:
    report
  • philpl1jb
    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
    51,355 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following