Portal | Manuals | 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: 2343
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 Include Group record based on detail ... guptae DFSORT/ICETOOL 11 Thu Mar 12, 2020 1:54 pm Recovery Routine/Abend exit to releas... Siva NKK Kothamasu PL/I & Assembler 14 Tue Feb 25, 2020 4:43 pm Help with IF THEN and GROUP prynks91 SYNCSORT 23 Thu Feb 20, 2020 7:22 pm To extract the records after the firs... saikarthik94 JCL & VSAM 5 Thu Feb 20, 2020 7:00 pm Conditional step execution based on P... Lccole10 JCL & VSAM 9 Wed Feb 19, 2020 10:07 pm

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