How to write a password mask program in as400?
like the password which i type should be displayed
as '*****' r ###### which the user wishes to dispaly
if u could help me with url r the solution in written code
this will help me

Answer Posted / abhishek bajpai

The above answer is wrong. "EDTMSK" keyword can only
protect certain positions of a field (but can't replace a
character entered by the user).
To do this...

Say the actual field is PASSWD which you want to mask.
Create one more field say XYZ of attributes 1A in non
display mode(DSPATR(ND)) with CHECK(ER)keyword. Ur cursor
will remian on this field. Keep the actual field PASSWD as
protected.
Now, what will happen here is, when u enter any character
in XYZ, due to CHECK(ER) keyword the control will go back
to the program and then u can populate field PASSWD with
an '*' inside it and EXFMT the display file again with
blank XYZ and PASSWD with a '*'. Do this inside a loop.
Then in the end you can validate the actual password
entered when the user presses ENTER key. The PASSWD field
here is just to display the number of '*' as the number of
characters entered by the user as a password.

Quite long.
If u haven't understood I can send u the actual code. I
have done it previously for a client.

Abhishek

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How we will get issues on AS/400 technology ? I mean which issue/Defect Tracking tool is using in all companies when any issue comes? Can anybody explain about the work flow of AS/400 project ? plzzz

1157


what is the use of dspatr(mdt) keyword?

1451


what is the length of a variable in rpg?

967


what does the ovrdbf command do?

669


how you will find an error which is not in the first page of the subfile without using rolldown key?

562






What is a query can be displayed without saving it?

674


a multiple format logical file is also known as?

597


what is the sequence when using cursor?

607


which cl command is used to trap error messages during program execution?

866


How to convert a spool file to PDF file in AS400?

741


what is service program?

603


define the purpose of the iter operation?

1039


maximum number of subfiles that can defined in a rpg program for one display file is?

1040


What are the mandatory keywords of sub file?

748


what is the command used to invoke rlu ?

1176