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 sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am

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