View previous topic :: View next topic
|
Author |
Message |
kvkkumar
New User
Joined: 25 Mar 2010 Posts: 3 Location: hyderabad
|
|
|
|
Code: |
WHEN EIBAID = DFHPF5
PERFORM RCVMAP
IF WS-RESP = DFHRESP(NORMAL) THEN
MOVE 80 TO WS-LEN
EXEC CICS READ
FILE('VSAM142')
INTO(EMPF)
RIDFLD(EMPIDI)
LENGTH(WS-LEN)
UPDATE
END-EXEC
IF WS-RESP = DFHRESP(NORMAL) THEN
EXEC CICS DELETE
FILE('VSAM142')
RESP(WS-RES1)
END-EXEC
MOVE LOW-VALUE TO EMPVMPGO
IF WS-RES1 = DFHRESP(NORMAL) THEN
MOVE 'RECORD DELETED' TO MSGO
END-IF
ELSE
IF WS-RESP = DFHRESP(NOTFND) THEN
MOVE 'READ FAILED' TO MSGO
END-IF
END-IF [/color]
END-IF
PERFORM SENDMAP |
In the above code, I could successfully test the 'RECORD DELETED' if block..
When I am trying to delete some record which is not existing in VSAM file, then I am not getting 'READ failed' message.
After READ, I could see NOTFND exception, Eventhough I handled it in the code, it is getting abended..instead of displaying the message..
What is the error in the code?
Regards,
Kiran |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Please learn to use the Code button when posting code. I've edited your post to do so this time. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Please note that you are testing WS-RESP for a value. Where is the RESP option on the READ command? |
|
Back to top |
|
|
kvkkumar
New User
Joined: 25 Mar 2010 Posts: 3 Location: hyderabad
|
|
|
|
Thank you.. |
|
Back to top |
|
|
kvkkumar
New User
Joined: 25 Mar 2010 Posts: 3 Location: hyderabad
|
|
|
|
Thank you Robert..
It is working fine now.. Sorry for silly mistake.. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello and welcome to the forum,
Good to hear it is working - thank you for letting us know
Quote: |
It is working fine now.. Sorry for silly mistake.. |
Once we know the reason, many things seem silly, though they did not seem silly before the answer was known |
|
Back to top |
|
|
|