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

Counting the keys thta occur more than once


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
revdpoel

New User


Joined: 01 Nov 2006
Posts: 56

PostPosted: Wed Apr 08, 2009 4:44 pm
Reply with quote

I have an input dataset, FB 80, with 6 million rows
it has a header-record (recordcode 0), a datarecord (recordcode 1) and a trailerrecord (recordcode 9)
The datarecords contain om position 2-5 a code. I have to list the codes that are present in more then one record

input
0
11267
13456
11267
18989
9

output (in a dataset or just sysout)

1267

Who can help me?
Thnx
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Apr 08, 2009 8:06 pm
Reply with quote

Here's a DFSORT/ICETOOL job that will do what you asked for:

Code:

//S1   EXEC  PGM=ICETOOL                                     
//TOOLMSG   DD  SYSOUT=*                                     
//DFSMSG    DD  SYSOUT=*                                     
//IN DD DSN=...  input file (FB/80)                                                     
//OUT DD DSN=...  output file (FB/80)                                           
//TOOLIN DD *                                                 
SELECT FROM(IN) TO(OUT) ON(2,4,CH) FIRSTDUP USING(CTL1)       
/*                                                           
//CTL1CNTL DD *                                               
  INCLUDE COND=(1,1,CH,EQ,C'1')                               
  OUTFIL FNAMES=OUT,BUILD=(2,4)       
/*                       
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Use input file with OMIT rcd keys? DFSORT/ICETOOL 15
No new posts Any JCL or VSAM Utility to get number... JCL & VSAM 1
No new posts Complex counting and grouping DFSORT/ICETOOL 8
No new posts Join the keys via JCL DFSORT/ICETOOL 14
No new posts Process only last key record in a fil... DFSORT/ICETOOL 8
Search our Forums:

Back to Top