Portal | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref

Author Message
anatol

Active User

Joined: 20 May 2010
Posts: 121

Posted: Mon Oct 17, 2016 10:10 pm    Post subject: abend sort based on count records in group

Hi,

I have file ( need just idea, so let it FB=80):

 Code: 111111 111111 111111 111111 111111 111111 111111 111111 111111 111111 222222 222222 222222 222222 222222 222222

group is in position 1-6.
Is it possible to abend sort if records in any group is more than 7 ... Based on the file in example - abend, because group 111111 have more than 7 records

Rohit Umarjikar

Senior Member

Joined: 21 Sep 2010
Posts: 2466
Location: NY,USA

 Posted: Mon Oct 17, 2016 10:28 pm    Post subject:
anatol

Active User

Joined: 20 May 2010
Posts: 121

 Posted: Mon Oct 17, 2016 11:21 pm    Post subject: Reply to: abend sort based on count records in group Thank you ... I will try to check if I can use NULLOFL for my task... kind of doubt
Bill Woodger

DFSORT Moderator

Joined: 09 Mar 2011
Posts: 7312

Posted: Tue Oct 18, 2016 12:20 am    Post subject: Reply to: abend sort based on count records in group

Well, you can very easily get an RC=4 if there are no groups with more than seven records (or any arbitrary known value). Have a subsequent step which abends when you get RC=0 in the step. Or deal with the RC=4 as good RC=0 as bad in your JCL, or your Scheduler.

Here's an OVERLAY. Put this under an IFTHEN=(WHEN=(logicalexpression) for your required condition,

If you desperately, desperately want a fake abend, that should do it.
anatol

Active User

Joined: 20 May 2010
Posts: 121

 Posted: Tue Oct 18, 2016 12:29 am    Post subject: Reply to: abend sort based on count records in group Thank you, Bill .. I think it is better to work with RC, than force to abend . So include to output only records with more than 7 in group and RC=4 if output is empty, right?
Bill Woodger

DFSORT Moderator

Joined: 09 Mar 2011
Posts: 7312

 Posted: Tue Oct 18, 2016 2:08 am    Post subject: Reply to: abend sort based on count records in group Yes.
 All times are GMT + 6 Hours
 Page 1 of 1

Search our Forum:

 Topic Author Forum Replies Posted Similar Topics Parsing more than 1000 columns in a s... ssuthagar SYNCSORT 10 Tue Sep 22, 2020 12:23 am Group selective VB records - Trailer ... Premnath_TJ DFSORT/ICETOOL 12 Sun Sep 13, 2020 3:38 am How to process dependent file based o... HithaSri JCL & VSAM 8 Sun Sep 06, 2020 12:42 pm Handling abend to prevent termination seanroger CICS 0 Thu Sep 03, 2020 10:25 pm Abend deletes last record written julietspringsteen ABENDS & Debugging 10 Fri Aug 21, 2020 7:45 pm

 © 2003-2020 IBM MAINFRAME Software Support Division
 Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us