How to validate data in database from cics program

I will have user name and password values in database. i create a map from cics. and i will enter user name and
password then validation should be done in COBOL program. what is COBOL logic to validate database?

Showing Answers 1 - 9 of 9 Answers

Code
  1. move usero to ws-user.

  2. move passo to ws-pass.

  3.  

  4. use sql query like

  5.  

  6. select  user , pass into ww-user , ww-pass

  7.  from table_name

  8. if sql code = 0

  9. move 'userid n password matching' to messageo

  10. else

  11. move 'missmatch' to messageo.

  Was this answer useful?  Yes

sarankumar

  • Oct 27th, 2011
 

Try this:
MOVE USERO TO WS-USER.
MOVE PWDO TO WS-PWD.
AND THEN USE THE SAME SQL QUERIES AS
SELECT USERNAME FROM EMP WHERE USERNAME LIKE '%S'
THEN validate as use the matching and move 'same value of user and pwd ' else move 'different values of user and pwd'

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions