View previous topic :: View next topic
|
Author |
Message |
raviprasath_kp Warnings : 1 New User
Joined: 20 Feb 2005 Posts: 65 Location: chennai
|
|
|
|
HI
my USER ID IS eg 'ram' password = ram123
i will verfy the passowrd using cobol code if used id is in password
the job will abend
how i will code for that |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Is this a requirement for an application or is this a learning exercise?
Most often password validation is included in the security rules managed by the security administration people and password validation code is not included in the actual application code.
Also, most user-id's are greater than 3 characters.
If you just want to write code to see if a particular set of characters is in another, you need to first come up with "the rules". For example, is 123ram ok or is that an error? What about bramw123? Will the uid always be 3?
To write the code you want, set up a field or an array to hold the password and using reference modification compare the uid against the pwd following the rules.
Code your solution and post your code here if you have questions. |
|
Back to top |
|
|
raviprasath_kp Warnings : 1 New User
Joined: 20 Feb 2005 Posts: 65 Location: chennai
|
|
|
|
its a interview question.
i am also thinking about using this
but SUPPORT USERID IS RAVI PASSWORD IS 1234RAVI
HOW WE WILL CHECK .....
can you suggest me some logic |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
This, from the earlier reply, is how to begin.
Quote: |
To write the code you want, set up a field or an array to hold the password and using reference modification compare the uid against the pwd following the rules.
Code your solution and post your code here if you have questions |
As suggested then, create your w-s variables, and the routine to check for the "value" in the id, and post your code and any questions/proiblems that arise. I'd suggest you create pseudo code to work thru your process. |
|
Back to top |
|
|
|