Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 IDCAMS RENAMING VSAM FILE ALONG WITH ... upendrasri JCL & VSAM 11 Tue Apr 17, 2018 10:42 pm
No new posts VSAM file NOT Found error while proce... SumaReva CICS 5 Wed Apr 11, 2018 9:54 pm
No new posts Duplicate PARM on OUTFIL sancraig16 SYNCSORT 11 Thu Apr 05, 2018 10:25 pm
No new posts converting a mainframe file with ASA ... Lynne Schuler All Other Mainframe Topics 5 Wed Apr 04, 2018 9:44 am
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us