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 

Matching Logic using ICETOOL

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


Joined: 28 Jul 2006
Posts: 17
Topics: 9

PostPosted: Thu Aug 06, 2009 1:44 pm    Post subject: Matching Logic using ICETOOL Reply with quote

Hi,
I have a requirement to match two input files and generate the output files in the below format. I tried using ICETOOL SPLICE but i am not getting the expected output.

Could you please help me using ICETOOL/DFSORT.

Input file1:
Code:

POL_NO  NAME-ADD
123           KDC
124           AM
125          KDC
125          CAMU
126          KDC
126          AM
126          CAMU
127          KDC
129          AM
130         CAMU

INPUT FILE2:
Code:

POL_NO  CLI-NO
123        A1242
123        B1241
124        A1249     
125        A1259
126        A1340
126        B1244
126        B2344
129        C2345

OUTPUT FILE:
Code:

POL_NO  NAME-ADD      CLI-NO
123        KDC               A1242
123        KDC               B1241
124        AM                 A1249
125        KDC               A1259
125       CAMU              A1259
126       KDC                A1350
126       KDC                A1244
126       KDC                B2344
126       AM                  A1350
126       AM                  A1244
126       AM                  B2344
126       CAMU              A1350
126       CAMU              A1244
126       CAMU              B2344
127       KDC                -----
129       AM                  C2345
130       CAMU              -----
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Thu Aug 06, 2009 1:56 pm    Post subject: Reply with quote

vijayakumar,

Assuming Policy number is the matching key you have duplicates in both files which when matched will result in a many to many match. DFSORT cannot handle such matching. If you are interested we can provide you a highly efficient cobol program for this

Provide me with the following details

1. What is the LRECL and RECFM of the input files
2. What is the position and format of the key fields to be matched?
3. What is the desired output layout ( show me all the fields you need to pick from both files )
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
vijayakumar
Beginner


Joined: 28 Jul 2006
Posts: 17
Topics: 9

PostPosted: Fri Aug 07, 2009 4:11 am    Post subject: Reply with quote

Hi Kolusu,

Please find the details below,

1) Format of the input files

Input file 1: LRECL:30 , RECFM:FB

01 INP1-REC
05 POL-NO PIC X(8)
05 NAME-ADD PIC X(22)

Input file 2: LRECL:20 , RECFM:FB

01 INP2-REC
05 POL-NO PIC X(8)
05 CLI-NO PIC X(9)
05 FILLER PIC X(3)


2) We need to match the POL-NO PIC X(8) in both the input files. Both the input files will have duplicate POL-NO.

3) In the output file we need to write the record in the below format with the CLI-NO from the input file2.

OUTPUT FILE: LRECL:40 , RECFM:FB
01 INP2-REC
05 POL-NO PIC X(8)
05 NAME-ADD PIC X(22)
05 CLI-NO PIC X(9)
05 FILLER PIC X(1)

Please let me know if any further information is required.
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Fri Aug 07, 2009 11:30 am    Post subject: Reply with quote

vijayakumar,

I sent you an email with the code. The email address is the one you have it in your profile on this board.
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
vijayakumar
Beginner


Joined: 28 Jul 2006
Posts: 17
Topics: 9

PostPosted: Sun Aug 09, 2009 2:12 am    Post subject: Reply with quote

Hi Kolusu,
Thanks very much for your help.
I will update the staus once i complete the code testing.

Thanks
Vijayakumar
Back to top
View user's profile Send private message Send e-mail
computer
Beginner


Joined: 12 Jun 2007
Posts: 64
Topics: 17
Location: Hyderabad

PostPosted: Sun Aug 09, 2009 4:49 am    Post subject: Reply with quote

Hi Kolusu,

Can you please also provide me the code.

I am very much interested to know how the program logic.

Thanks In Advance,
Computer
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Mon Aug 10, 2009 12:03 pm    Post subject: Reply with quote

computer,

Sent you an email to the address listed in your profile
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
puttu
Beginner


Joined: 29 Jul 2010
Posts: 41
Topics: 9

PostPosted: Thu Sep 02, 2010 3:39 am    Post subject: Reply with quote

hi vijayakumar,
can u plz send me the code...
i got same require ment ,.....
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Thu Sep 02, 2010 10:15 am    Post subject: Reply with quote

puttu,


Why do you need the cobol code? DFSORT can NOW handle Cartesian join with JOINKEYS.

Take a look at this example

http://www.mvsforums.com/helpboards/viewtopic.php?p=54101#54101
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