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
 

 

How to identify last record in each group of records

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

Active User


Joined: 06 Sep 2007
Posts: 112
Location: India

PostPosted: Thu Jun 11, 2015 9:12 pm    Post subject: How to identify last record in each group of records
Reply with quote

Hi

In the below e.g. how to identify the end of a group of records.


Record type A - appears for each customer no. in file. Record type B is the customer details.Both A and B are in position 1. The no.of times B may occur for a customer is not fixed.

A
B
B
B
A
B
B
B
B
A
B
A
B
B


Using when=group , the records are grouped, so basically the first 4 records are a group as they are details of a customer. Then the next 5 records are details of another customer. SEQNUM with RESTART doesnt seem to work when tried with INREC IFTHEN=(WHEN=GROUP) option.

Is there any way to identify the end of a group here ? i.e the last record in each group ?

The o/p should have A , the 1st B and last B in each group.

Thanks
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7272

PostPosted: Thu Jun 11, 2015 11:43 pm    Post subject: Reply to: How to identify last record in each group of records
Reply with quote

If you start with this topic, and follow the links, you should find sufficient to allow you to identify the last, and then select with OUTFIL OMIT=/INCLUDE=.
Back to top
View user's profile Send private message
Ambili S

Active User


Joined: 06 Sep 2007
Posts: 112
Location: India

PostPosted: Fri Jun 12, 2015 6:14 am    Post subject:
Reply with quote

Hi Bill
If you can share the links it will be of great help. I will go through them.


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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7272

PostPosted: Fri Jun 12, 2015 11:48 am    Post subject: Reply to: How to identify last record in each group of records
Reply with quote

Sorry about that, I've updated the original. Yesterday was not a good day for typing.
Back to top
View user's profile Send private message
Ambili S

Active User


Joined: 06 Sep 2007
Posts: 112
Location: India

PostPosted: Fri Jun 12, 2015 8:33 pm    Post subject:
Reply with quote

Thanks Bill. I read your post in the link - http://www.ibmmainframes.com/viewtopic.php?p=300686#300686 of using same input twice.
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 Matching and unmatching records scdinesh DFSORT/ICETOOL 11 Tue Feb 07, 2017 12:41 am
No new posts Sort Card to Remove Duplicate records... raj4neo SYNCSORT 2 Wed Jan 25, 2017 4:44 am
No new posts Sorting group data rajella DFSORT/ICETOOL 4 Sun Jan 22, 2017 11:32 pm
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am


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