edtmsk in AS/400
80 pts.
0
Q:
edtmsk in AS/400
how to write a password mask program in AS400, in which user can display the character as '****' or '######'
ASKED: Sep 23 2009  6:58 AM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
6440 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
You can set the field with DSPATR(ND) for entering a password.
But with a 5250 data stream since the machine does not read the screen until you hit ENTER, you cannot key one character and display anther untile ENTER is depress.
Last Answered: Sep 23 2009  12:55 AM GMT by CharlieBrowne   6440 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

TomLiotta   7355 pts.  |   Sep 23 2009  10:30PM GMT

I’m pretty sure that there’s no good way to get this done as long as the standard 5250 interface will be used. I can imagine that the Dynamic Screen Manager (DSM) APIs could be used to construct a process, but it’d take an experienced DSM developer to be sure.

Beyond that, I’ve only seen one potentially useful way to simulate this with “normal” display file processing.

Define two fields for password handling.

One field is a 1-byte input field that is DSPATR(ND) CHECK(ER). This will be the password entry field. Each typed character will cause CHECK(ER) to input the character.

The other field is an output field as big as your passwords are allowed to be. Every time a character is typed into the first field, the program adds a ‘*’ character to the string that gets written back out to this field.

The program loops on input until some F-key signals the loop to end. The password characters are concatenated into an internal field at the same time each ‘*’ is concatenated to the output field.

Pretty ugly, but it can be made to work if absolutely required. (I credit “Murphy” with pointing out this technique in case he runs across this posting.)

 
0