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
 

 

Getting duplicate records after file comparison

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

New User


Joined: 19 Oct 2006
Posts: 4

PostPosted: Wed Oct 29, 2008 7:11 pm    Post subject: Getting duplicate records after file comparison
Reply with quote

Hi,

could you please help me in solving the below stated issue

Inputfile1 (lrecl=159) contains some duplicate records, inputfile2 (lrecl=7) contain unique records,
My requirement like as follows

file2 (UNIQUE record)need to be compared with file1(Duplicates) all matched records are need to be written
in to output file


Ex

File 1

Code:

                  AAA1111
                  AAA1111
                  BBB2222
                  CCC3333
                  CCC3333


File 2

Code:

AAA1111
CCC3333


Expected output

Code:

                  AAA1111
                  AAA1111
                  CCC3333
                  CCC3333


many thanks in advance
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 Oct 29, 2008 9:17 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=*
//IN1 DD DSN=...  input file1 (FB/159)
//IN2 DD DSN=...  input file2 (FB/7)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT DD DSN=...  output file (FB/159)
//TOOLIN DD *
COPY FROM(IN2) TO(T1) USING(CTL1)
COPY FROM(IN1) TO(T1) USING(CTL2)
SPLICE FROM(T1) TO(OUT) ON(19,7,CH) WITHALL -
 WITH(1,160) USING(CTL3)
/*
//CTL1CNTL DD *
  INREC BUILD=(19:1,7,160:C'BB')
/*
//CTL2CNTL DD *
  INREC OVERLAY=(160:C'VV')
/*
//CTL3CNTL DD *
  OUTFIL FNAMES=OUT,INCLUDE=(160,2,CH,EQ,C'VB'),
    BUILD=(1,159)
/*
Back to top
View user's profile Send private message
venugopala

New User


Joined: 19 Oct 2006
Posts: 4

PostPosted: Thu Oct 30, 2008 5:15 pm    Post subject:
Reply with quote

Dear Frank Yaeger,

Its working fine,
Thanks ,Thanks a lot
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    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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Using ICETOOL, how we can seperate th... bshkris SYNCSORT 5 Tue May 09, 2017 8:33 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am


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