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
 

 

abend sort based on count records in group

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

New User


Joined: 20 May 2010
Posts: 99
Location: canada

PostPosted: Mon Oct 17, 2016 10:10 pm    Post subject: abend sort based on count records in group
Reply with quote

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
Back to top
View user's profile Send private message

Rohit Umarjikar

Senior Member


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

PostPosted: Mon Oct 17, 2016 10:28 pm    Post subject:
Reply with quote

Hint-
http://www.ibmmainframeforum.com/dfsort-icetool-icegener/topic5837.html
Back to top
View user's profile Send private message
anatol

New User


Joined: 20 May 2010
Posts: 99
Location: canada

PostPosted: Mon Oct 17, 2016 11:21 pm    Post subject: Reply to: abend sort based on count records in group
Reply with quote

Thank you ... I will try to check if I can use NULLOFL for my task... kind of doubt
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7228

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

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,

Code:
OVERLAY=(5:Z,5:1,1,PD,ADD,+1,TO=PD,LENGTH=1)


If you desperately, desperately want a fake abend, that should do it.
Back to top
View user's profile Send private message
anatol

New User


Joined: 20 May 2010
Posts: 99
Location: canada

PostPosted: Tue Oct 18, 2016 12:29 am    Post subject: Reply to: abend sort based on count records in group
Reply with quote

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?
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7228

PostPosted: Tue Oct 18, 2016 2:08 am    Post subject: Reply to: abend sort based on count records in group
Reply with quote

Yes.
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 IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm


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