Portal | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Handling abend to prevent termination

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
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    Post subject: Handling abend to prevent termination
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    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Abend deletes last record written julietspringsteen ABENDS & Debugging 10 Fri Aug 21, 2020 7:45 pm
No new posts CICS Web services Assistant - Handlin... Kadhir A CICS 3 Thu Jun 25, 2020 6:33 pm
No new posts COBOL Student learning COBOL File Han... torrind COBOL Programming 3 Sat May 09, 2020 3:40 am
No new posts APCT Abend while running an online CI... amitc23 CICS 1 Wed May 06, 2020 9:59 am
No new posts Transaction xxxx abend D106 Andi1982 CICS 1 Fri Apr 03, 2020 1:38 pm

Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us