MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Match record - records occurrence more than one

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
radkrish
Beginner


Joined: 12 Aug 2005
Posts: 102
Topics: 19

PostPosted: Wed Sep 20, 2006 4:52 am    Post subject: Match record - records occurrence more than one Reply with quote

I want to compare 2 files- 1 to 25 char.requirement is to capture match and no match records.
The record occurring more than once as we need to match only 1 to 25 character.

FILE A


Code:
 ISRBROBA  ABBBCD.TE1                                 Line       00000000 Col 001 080
 Command ===>                                                  Scroll ===> CSR 
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
********************************* Top of Data **********************************
AC-9985F-10              2001CEVP        0      0      0      0      0      0   
AC-9985F-10              2002CEVP       66      0      5     93      0      0   
AC-9985F-10              2004CEVP        0      0      0      0     44      0   
AC-9985F-10              2005CEVP        0      0      7      0      0      0   
AC-9985F-10              2006CEVP      238      0      0      0      0      0   
AC2851E4D40              2006CEVP        0      0      0      0      0      0   
AC7655-4D121             2006CEVP        0      0      0      0      0      0   
AE18628-029              2005CEVP        0      4      0     46      0      0   
AE18688-145              2006CEVP       84     27      0      0      0      0   
AN103711                 2002CEVP        0      0      0      0      0      3   
AN103711                 2006CEVP        0      2      0      0      0      0   

FILE B

Code:
 ISRBROBA  ab123.r2442                                   Line 00000000 Col 001 080
 Command ===>                                                  Scroll ===> CSR 
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
********************************* Top of Data **********************************
AC2851E4D40                                                                     
AC7655-4D121                                                                   
AE18688-145                                                                     
AN103711                                                                       
AN104608                                                                       
AN106408                                                                       
AN123171                                                                       
AN123624                                                                       
AN123625                                                                       
AN500AC8-8                                                                     
AN500A6-8                                                                       
AN814-5CL                                                                       
AN815-3J                                                                       
AN919-7J                                                                       



If I found AN103711 from file b in file a then
the the record should like the below :

Code:
AN103711                 2002CEVP        0      0      0      0      0      3   
AN103711                 2006CEVP        0      2      0      0      0      0   


I tried with firstdups.but it takes only first occurrence.can anyone help me on this one as earlier.
Back to top
View user's profile Send private message
radkrish
Beginner


Joined: 12 Aug 2005
Posts: 102
Topics: 19

PostPosted: Wed Sep 20, 2006 4:53 am    Post subject: Reply with quote

Its of 120 character size.
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Wed Sep 20, 2006 10:33 am    Post subject: Reply with quote

Quote:
requirement is to capture match and no match records.


For output, do you want only the records from file a? Do you want the records from file a that have a match in file b in output file1, and the records from file a that do not have a match in file b in output file2, or what? To clarify, please show the expected output records for the input records you showed.

Do file a and file b have RECFM=FB and LRECL=120?
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
radkrish
Beginner


Joined: 12 Aug 2005
Posts: 102
Topics: 19

PostPosted: Wed Sep 20, 2006 10:41 pm    Post subject: Reply with quote

Quote:
For output, do you want only the records from file a? Do you want the records from file a that have a match in file b in output file1, and the records from file a that do not have a match in file b in output file2, or what?


Search file b records in file a.I need the records from file a,the match in output file1 and no match in output file 2.

Quote:
Do file a and file b have RECFM=FB and LRECL=120?

Yes.
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Thu Sep 21, 2006 11:51 am    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/120)
//IN2 DD DSN=... input file2 (FB/120)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT1 DD DSN=...  output file1 (FB/120)
//OUT2 DD DSN=...  output file2 (FB/120)
//TOOLIN DD *
COPY FROM(IN2) TO(T1) USING(CTL1)
COPY FROM(IN1) TO(T1) USING(CTL2)
SPLICE FROM(T1) TO(OUT1) ON(1,25,CH) -
  KEEPNODUPS KEEPBASE -
  WITHALL WITH(1,121) USING(CTL3)
/*
//CTL1CNTL DD *
  INREC OVERLAY=(121:C'BB')
/*
//CTL2CNTL DD *
  INREC OVERLAY=(121:C'VV')
/*
//CTL3CNTL DD *
  OUTFIL FNAMES=OUT1,INCLUDE=(121,2,CH,EQ,C'VB'),
    BUILD=(1,120)
  OUTFIL FNAMES=OUT2,INCLUDE=(121,2,CH,EQ,C'VV'),
    BUILD=(1,120)
/*

_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group