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
 

 

Counting the keys thta occur more than once

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Counting the keys thta occur more than once
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 Moderator


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

PostPosted: Wed Apr 08, 2009 8:06 pm    Post subject:
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    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 PA02 - Programmtically control attent... dodithegreat IMS DB/DC 1 Thu Apr 06, 2017 8:33 pm
No new posts Joinkeys with duplicated keys juares castro SYNCSORT 19 Fri Sep 23, 2016 5:58 am
No new posts Too many edit macro's and too few PF ... don.leahy TSO/ISPF 7 Wed Feb 17, 2016 3:00 am
No new posts Join Keys and DB2 Query jackare SYNCSORT 2 Sat Feb 13, 2016 5:57 am
No new posts Join Keys to compare two files senthamizh DFSORT/ICETOOL 2 Fri Feb 05, 2016 8:28 am


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