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
 

 

Count of records

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

New User


Joined: 16 Apr 2009
Posts: 69
Location: Canada

PostPosted: Tue Apr 30, 2013 2:13 am    Post subject: Count of records
Reply with quote

Input file key is as below:

0101011000000000000001
0101021000000000000002
0101031000000000000003
0101041000000000000004
0101051000000000000005
0101061000000000000006
0102011000000000000007
0102021000000000000008
0102031000000000000009
0102041000000000000010
0102051000000000000011
0102061000000000000012

The first six characters can repeat as many times as they want but the next 16 characters being unique.

I need to get count of records which have

0101 at third - sixth position,
0102 at third - sixth position,
0103 at third - sixth position,
0104 at third - sixth position,
0105 at third - sixth position,
0106 at third - sixth position,
0201 at third - sixth position
-----
so on till
9906 at third - sixth position

Do let me know for further details...

Please help...
Back to top
View user's profile Send private message

Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Tue Apr 30, 2013 3:32 am    Post subject:
Reply with quote

suraaj,

use the following DFSORT JCL

Code:

//STEP0100 EXEC PGM=SORT                                       
//SYSOUT   DD SYSOUT=*                                         
//SORTIN   DD *                                               
0101011000000000000001                                         
0101021000000000000002                                         
0101031000000000000003                                         
0101041000000000000004                                         
0101051000000000000005                                         
0101061000000000000006                                         
0102011000000000000007                                         
0102021000000000000008                                         
0102031000000000000009                                         
0102041000000000000010                                         
0102051000000000000011                                         
0102061000000000000012                                         
//SORTOUT  DD SYSOUT=*                                         
//SYSIN    DD *                                               
  INREC BUILD=(3,4)                                           
  SORT FIELDS=(1,4,CH,A)                                       
  OUTFIL REMOVECC,NODETAIL,BUILD=(80X),                       
  SECTIONS=(1,4,                                               
  TRAILER3=('COUNT OF ',1,4,' AT THIRD - SIXTH POSITION IS ', 
            COUNT=(M10,LENGTH=8)))                             
//*
Back to top
View user's profile Send private message
Suraj.Nair

New User


Joined: 07 Jun 2011
Posts: 17
Location: Canada

PostPosted: Tue Apr 30, 2013 7:47 pm    Post subject: Reply to: Count of records
Reply with quote

Thanks Kolusu for the solution!!! Appreciate it!!!
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 Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Display FTP Session Count within TSO Yolanda Harvey TSO/ISPF 3 Fri Mar 10, 2017 10:31 pm
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am


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