Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 7314

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: 7314

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 add sequence number for duplicate rec... SRUTHI DRAVIDAMANI COBOL Programming 11 Thu Feb 22, 2018 5:37 pm
No new posts how to add the amount for duplicate r... SRUTHI DRAVIDAMANI COBOL Programming 6 Wed Feb 21, 2018 7:21 pm
No new posts Merging records, but not all the time prino DFSORT/ICETOOL 17 Sat Feb 17, 2018 4:20 pm
No new posts Need to identify top 10 costly or tim... ashek15 DB2 4 Wed Feb 14, 2018 3:20 am
No new posts Need all records with high key kalidasvs SYNCSORT 15 Fri Feb 09, 2018 10:38 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us