View previous topic :: View next topic |
Author |
Message |
vijayakumar Beginner
Joined: 28 Jul 2006 Posts: 17 Topics: 9
|
Posted: Thu Aug 06, 2009 1:44 pm Post subject: Matching Logic using ICETOOL |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Thu Aug 06, 2009 1:56 pm Post subject: |
|
|
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 |
|
|
vijayakumar Beginner
Joined: 28 Jul 2006 Posts: 17 Topics: 9
|
Posted: Fri Aug 07, 2009 4:11 am Post subject: |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Fri Aug 07, 2009 11:30 am Post subject: |
|
|
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 |
|
|
vijayakumar Beginner
Joined: 28 Jul 2006 Posts: 17 Topics: 9
|
Posted: Sun Aug 09, 2009 2:12 am Post subject: |
|
|
Hi Kolusu,
Thanks very much for your help.
I will update the staus once i complete the code testing.
Thanks
Vijayakumar |
|
Back to top |
|
|
computer Beginner
Joined: 12 Jun 2007 Posts: 64 Topics: 17 Location: Hyderabad
|
Posted: Sun Aug 09, 2009 4:49 am Post subject: |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Mon Aug 10, 2009 12:03 pm Post subject: |
|
|
computer,
Sent you an email to the address listed in your profile _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
puttu Beginner
Joined: 29 Jul 2010 Posts: 41 Topics: 9
|
Posted: Thu Sep 02, 2010 3:39 am Post subject: |
|
|
hi vijayakumar,
can u plz send me the code...
i got same require ment ,..... |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
|
|