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 Wiki Answer Submitted: September 23, 2009 12:55 pm by CharlieBrowne33,730 pts.
All Answer Wiki Contributors: CharlieBrowne33,730 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.
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.)
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.)