View previous topic :: View next topic
|
Author |
Message |
anatol
Active User
Joined: 20 May 2010 Posts: 121 Location: canada
|
|
|
|
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 |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3048 Location: NYC,USA
|
|
Back to top |
|
|
anatol
Active User
Joined: 20 May 2010 Posts: 121 Location: canada
|
|
|
|
Thank you ... I will try to check if I can use NULLOFL for my task... kind of doubt |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
anatol
Active User
Joined: 20 May 2010 Posts: 121 Location: canada
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Yes. |
|
Back to top |
|
|
|