IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Sort counter to show records combination


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
amirberner

New User


Joined: 14 Oct 2021
Posts: 2
Location: israel

PostPosted: Tue Feb 08, 2022 1:59 pm
Reply with quote

Hi,
I have a file consisting of name, date and number
I want to sort the data by name and date, and add a counter that will show how many records I have for the combination of name and date.
e.g.
name date number counter
James 14.2 50 1
James 14.2 100 2
James 14.2 70 3
James 20.2 100 1
Kevin 5.1 100 1
Kevin 14.2 50 1
Kevin 14.2 32 2

how do I do it?
thanks
Back to top
View user's profile Send private message
Joerg.Findeisen

Active Member


Joined: 15 Aug 2015
Posts: 905
Location: Bamberg, Germany

PostPosted: Tue Feb 08, 2022 5:10 pm
Reply with quote

Provide samples of Input and desired Output. Make use of code tags (button Code works as a toggle), check with preview before hitting submit. Show what you have attempted by yourself, error codes and such, if any.

PS: Real OS know Datasets but not files.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 1614

PostPosted: Tue Feb 08, 2022 6:40 pm
Reply with quote

I need to add that this task cannot be done using neither JCL, nor VSAM.
Wrong forum section.

One way to do this is, using DFSORT/SYNCSORT.

Many other ways are available, too, but no JCL/VSAM under any circumstances.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts how to keep unpaired records with REPRO. JCL & VSAM 9
No new posts WER999A - UNSUCCESSFUL SORT 8ED U Ab... SYNCSORT 5
No new posts COBOL Ascending and descending sort n... COBOL Programming 5
No new posts Dataset size increase on adding 1 byt... DFSORT/ICETOOL 8
No new posts SORT deletes the SORTOUT file DFSORT/ICETOOL 8
Search our Forums:

Back to Top