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
 
Finding Duplicats and non duplicates

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

New User


Joined: 07 Jul 2006
Posts: 2
Location: Louisville,KY, USA

PostPosted: Thu Mar 13, 2008 5:21 am    Post subject: Finding Duplicats and non duplicates
Reply with quote

infile 1
Field1 = Position(110,12,A) Field2 = Position(973,6,A) Filed3 = Position(181,2119,A)
003285966 01 AMDS530 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaa etc
005249781 01 AMDS528 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb etc
005249781 02 AMDS528 cccccccccccccccccccccccccccccccccccccccc etc
005249781 03 AMDS526 ddddddddddddddddddddddddddddddddddddddddd etc
003285967 01 AMDS528 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
005249788 01 AMDS528 ffffffffffffffffffffffffffffffffff etc
005249788 02 AMDS528 gggggggggggggggggggggggggggggggg etc
005249788 03 AMDS528 fffffffffffffffffffffffffffffffffffffffffffff
infile 2
Field1 = Position(110,12,A) Field2 = Position(973,6,A) Filed3 = Position(181,2119,A)
003285966 01 AMDS530 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaa etc
005249785 01 AMDS528 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb etc
005249786 02 AMDS528 cccccccccccccccccccccccccccccccccccccccc etc
005249790 01 AMDS526 ddddddddddddddddddddddddddddddddddddddddd etc
003285967 01 AMDS528 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
005249788 01 AMDS528 ffffffffffffffffffffffffffffffffff etc
005249788 02 AMDS528 gggggggggggggggggggggggggggggggg etc
005249788 03 AMDS528 fffffffffffffffffffffffffffffffffffffffffffff

Field1 will have unique values, Field 2 in both files can have duplicates on it.

outfile - match records
Field1 = Position(110,12,A) Field2 = Position(973,6,A) Filed3 = Position(181,2119,A)
003285966 01 AMDS530 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaa etc
003285967 01 AMDS528 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
005249788 01 AMDS528 ffffffffffffffffffffffffffffffffff etc
005249788 02 AMDS528 gggggggggggggggggggggggggggggggg etc
005249788 03 AMDS528 fffffffffffffffffffffffffffffffffffffffffffff
outfile - no match records in file1
005249781 01 AMDS528 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb etc
005249781 02 AMDS528 cccccccccccccccccccccccccccccccccccccccc etc
005249781 03 AMDS526 ddddddddddddddddddddddddddddddddddddddddd etc
outfile - no match records in file2
005249788 01 AMDS528 ffffffffffffffffffffffffffffffffff etc
005249788 02 AMDS528 gggggggggggggggggggggggggggggggg etc
005249788 03 AMDS528 fffffffffffffffffffffffffffffffffffffffffffff
005249790 01 AMDS526 ddddddddddddddddddddddddddddddddddddddddd etc


Rules:
I need to compare combination of (field1 & field2 & field3 ) from file-1,file-2
if it matched then
write output-file 1
if not matched but present in file1 only
write output-file 2
if not matched but present in file2 only
write output-file 3




1.Input file1
Format : FB
Length : 3000

field1 = Position(110,12,A) 13 character 110-Starting position 12-Length ==> Numeric
field2 = Position(973,6,A) 7 character 973-Starting position 6-Length ==> character
filed3 = Position(181,2119,A) 1938 character 181-Starting position 2120-Length ==> character


2.Input file2
Format : FB
Length : 3000

field1 = Position(110,12,A) 13 character 110-Starting position 12-Length ==> Numeric
field2 = Position(973,6,A) 7 character 973-Starting position 6-Length ==> character
filed3 = Position(181,2119,A) 1938 character 181-Starting position 2120-Length ==> character


3.Output file1
Format : FB
Length : 3000

4.Output file2
Format : FB
Length : 3000


5.Output file3
Format : FB
Length : 3000
Back to top
View user's profile Send private message

Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Fri Mar 14, 2008 1:10 am    Post subject: Reply to: Finding Duplicats and non duplicates
Reply with quote

Quote:

field1 = Position(110,12,A) 13 character 110-Starting position 12-Length ==> Numeric
field2 = Position(973,6,A) 7 character 973-Starting position 6-Length ==> character
filed3 = Position(181,2119,A) 1938 character 181-Starting position 2120-Length ==> character


isnt field3 overlaying field2?

Try this DFSORT/ICETOOL jcl

Code:

//STEP0100 EXEC PGM=ICETOOL                                     
//TOOLMSG  DD SYSOUT=*                                         
//DFSMSG   DD SYSOUT=*                                         
//IN1      DD DSN=your input file1,
//            DISP=SHR
//IN2      DD DSN=your input file2,
//            DISP=SHR                         
//T1       DD DSN=&&T1,DISP=(MOD,PASS),SPACE=(CYL,(X,Y),RLSE)   
//T2       DD DSN=&&T2,DISP=(,PASS),SPACE=(CYL,(X,Y),RLSE)     
/*
//OUT      DD DSN=YOUT MATCH FILE,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(CYL,(X,Y),RLSE)
/*
//ONLYF1   DD your only f1 records,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(CYL,(X,Y),RLSE)
/*
//ONLYF2   DD dsn=your only f2 records,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(CYL,(X,Y),RLSE)
/*
//TOOLIN   DD *                                               
  COPY FROM(IN1) TO(T1) USING(CTL1)                           
  COPY FROM(IN2) TO(T1) USING(CTL2)                           
  SELECT FROM(T1) TO(OUT)  -                                   
  ON(110,12,CH) ON(973,6,CH) ON(181,1500,CH) ON(1681,619,CH) -
  ALLDUPS DISCARD(T2) USING(CTL3)                             
  COPY FROM(T2) USING(CTL4)                                   
//CTL1CNTL DD *                                               
  INREC BUILD=(110:01,10,181:12,10,973:29,15,3001:C'1')       
//CTL2CNTL DD *                                               
  INREC BUILD=(110:01,10,181:12,10,973:29,15,3001:C'2')       
//CTL3CNTL DD *                                               
  OUTFIL FNAMES=OUT,BUILD=(01,3000)                           
//CTL4CNTL DD *                                               
  OUTFIL FNAMES=ONLYF1,BUILD=(01,3000),                       
  INCLUDE=(3001,1,CH,EQ,C'1')                                 
  OUTFIL FNAMES=ONLYF2,BUILD=(01,3000),                       
  INCLUDE=(3001,1,CH,EQ,C'2')                                 
//*
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 LMINIT problem - not finding DDNAME Danielle.Filteau CLIST & REXX 7 Tue Sep 19, 2017 9:57 pm
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 22 Sun Aug 27, 2017 10:35 pm
No new posts Finding IMS resource blocker after se... Hooman24 IMS DB/DC 1 Wed Aug 16, 2017 9:17 pm
No new posts finding delayed job/s in OPC jzhardy IBM Tools 0 Mon May 29, 2017 9:04 am
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am

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