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

Senior Member


Joined: 15 Aug 2015
Posts: 1244
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: 2018
Location: USA

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 Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts JCL sort card - get first day and las... JCL & VSAM 9
Search our Forums:

Back to Top