IBM MAINFRAME HELP & SUPPORT FORUMS
Technical Forums for IBM Mainframe Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7&11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
 

JCL Syntex reqd to get only duplicate records from a file

THIS IS AN ARCHIVE FORUM: CLICK HERE TO GO TO THE ORIGINAL TOPIC

 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> DFSORT/ICETOOL
View previous topic :: View next topic  
Author Message
Tarun Deep



Joined: 10 Jun 2005
Posts: 10
Location: Hyderabad, India

Posted: Fri Jun 10, 2005 1:54 pm    Post subject: JCL Syntex reqd to get only duplicate records from a file  

Hi All
Please help me by providing the solution to the following problem.

My Input file looks like this -

AAA RECORD 1
BBB RECORD 1
BBB RECORD 2
CCC RECORD 1
DDD RECORD 1
DDD RECORD 2
DDD RECORD 3
DDD RECORD 4
EEE RECORD 1
FFF RECORD 1
GGG RECORD 1

Output file should contain only the duplicate records as following :

BBB RECORD 1
BBB RECORD 2
DDD RECORD 1
DDD RECORD 2
DDD RECORD 3
DDD RECORD 4

i.e. - I do not want those records in output file which have single entries in input file.

Please provide the syntax for this at the earliest.
Thanks in advance :)

Tarun
Back to top  
sangiah



Joined: 10 Jun 2005
Posts: 63

Posted: Fri Jun 10, 2005 2:22 pm    Post subject:  

you may check ICETOOL
Back to top  
Alain Benveniste



Joined: 14 Feb 2005
Posts: 89

Posted: Fri Jun 10, 2005 2:22 pm    Post subject: Re: JCL Syntex reqd to get only duplicate records from a fil  

Tarun,
Here is a DFSORT/ICETOOL job that does want you want
Code:
//STEP0001 EXEC PGM=ICETOOL                 
//DFSMSG   DD SYSOUT=*                       
//TOOLMSG  DD SYSOUT=*                       
//TOOLIN   DD *                             
  SELECT FROM(IN) TO(OUTX) ON(1,3,CH) ALLDUPS
/*   
//OUTX DD DSN=...   output file                                       
//IN       DD *                             
AAA RECORD 1                                 
BBB RECORD 1                                 
BBB RECORD 2                                 
CCC RECORD 1                                 
DDD RECORD 1                                 
DDD RECORD 2                                 
DDD RECORD 3                                 
DDD RECORD 4                                 
EEE RECORD 1                                 
FFF RECORD 1                                 
GGG RECORD 1                                 
/*

Alain
Back to top  
Tarun Deep



Joined: 10 Jun 2005
Posts: 10
Location: Hyderabad, India

Posted: Fri Jun 10, 2005 2:47 pm    Post subject: Re: JCL Syntex reqd to get only duplicate records from a fil  

Thanks a lot Alain !!
It worked absolutely fine. :D
Back to top  
 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> DFSORT/ICETOOL
Page 1 of 1
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM