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

JCL Syntex reqd to get only duplicate records from a file


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Tarun Deep
Warnings : 1

New User


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

PostPosted: Fri Jun 10, 2005 1:54 pm
Reply with quote

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 icon_smile.gif

Tarun
Back to top
View user's profile Send private message
sangiah

New User


Joined: 10 Jun 2005
Posts: 62

PostPosted: Fri Jun 10, 2005 2:22 pm
Reply with quote

you may check ICETOOL
Back to top
View user's profile Send private message
Alain Benveniste

New User


Joined: 14 Feb 2005
Posts: 88

PostPosted: Fri Jun 10, 2005 2:22 pm
Reply with quote

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
View user's profile Send private message
Tarun Deep
Warnings : 1

New User


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

PostPosted: Fri Jun 10, 2005 2:47 pm
Reply with quote

Thanks a lot Alain !!
It worked absolutely fine. icon_biggrin.gif
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top