Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Display user error message in SPOOL when abended

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 200
Location: USA

PostPosted: Wed Aug 21, 2013 3:11 am    Post subject: Display user error message in SPOOL when abended
Reply with quote

Hi,

My sort control card is as below.

Code:

//CTL2CNTL DD *                                                       
  OPTION NULLOUT=RC16                                                 
  INCLUDE COND=(1,10,CH,EQ,11,10,CH)                                 
//*


This abends fine when the o/p is EMPTY.

But when this abends, I should display user error message in SPOOL such as 'The file is empty' and then abend the step. Is it possible to do that? Let the LRECL=80,RECFM=FB and assume that we need to copy input to output.


Regards
Amar
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Aug 21, 2013 6:45 am    Post subject:
Reply with quote

Hello,

Do you get an rc16 when the file is empty?

If yes, this is NOT an abend and you can conditionally create any message you want.
Back to top
View user's profile Send private message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 200
Location: USA

PostPosted: Wed Aug 21, 2013 6:55 am    Post subject:
Reply with quote

Hi Dick,

yes I got RC16 and the step stops the process. Now, do you mean I use this step's condition code and let the next step write error message into the SPOOL?

Regards
Amar
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Wed Aug 21, 2013 1:00 pm    Post subject: Reply to: Display user error message in SPOOL when abended
Reply with quote

Yes, if the RC16 doesn't actually abend (RC not equal to zero does not indicate an abend) then you can have a subsequent conditional step.

You could also document it in the "run instructions", in your scheduler.... what is it you are trying to achieve by having a message produced as well?
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Wed Aug 21, 2013 11:20 pm    Post subject: Reply to: Display user error message in SPOOL when abended
Reply with quote

V S Amarendra Reddy,

1. Have MODE CONTINUE before your COPY step.
2. Change your CTL2CNTL to add another temp dataset(T1) which will have just the count
3. Add a COPY to your TOOLIN to copy T1 to MSG dataset using CTL3CNTL which will have IFTHEN=(when=(1,8,uff,eq,0),build=(c'THE FILE IS EMPTY ')) and when=none,build=(80x)
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Job failing with USER = 4093 REASON C... Pradeepa S ABENDS & Debugging 1 Wed May 17, 2017 3:35 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
This topic is locked: you cannot edit posts or make replies. SDSF multiple spool datasets extracte... PJAlarcon CLIST & REXX 1 Fri Apr 21, 2017 10:50 pm
No new posts IDC2902I Error tzeche ABENDS & Debugging 2 Tue Mar 28, 2017 11:39 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us