IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Handling abend to prevent termination


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
seanroger

New User


Joined: 03 Sep 2020
Posts: 1
Location: uk

PostPosted: Thu Sep 03, 2020 10:25 pm
Reply with quote

I am reading few VSAM files to populate few fields in DB2. In case of any issue in reading the files , i should not terminate the process. The expectation is to handle the abend so that I do not abend and populate the field with SPACES.

I have been asked to used HANDLE ABEND in this situation but not sure how to incorporate it as it behaves like a GO TO statement with no control being returned.

I am using the below approach using the RESP, wherein i move value from file if RESP code is 0 . Any other RESP code I move SPACES to the field . Do you think it will suffice?


EXEC CICS READ
FILE('FILE')
INTO(DATA-RECORD)
RIDFLD(FILE-KEY)
KEYLENGTH (LENGTH OF FILE-KEY)
RESP(WS-RESP)
END-EXEC

IF WS-RESP = 0

MOVE DATA-FLD TO WS-FLD

ELSE

MOVE SPACES TO WS-FLD

END-IF
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Call an hlasm from REXX in batch and ... CLIST & REXX 4
No new posts What is the most complex abend you've... Mainframe Interview Questions 8
No new posts ISAM and abend S03B JCL & VSAM 10
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts Abend S0C4 11 (Page Translation Excep... PL/I & Assembler 16
Search our Forums:

Back to Top