Matching Logic using ICETOOL
Select messages from
# through # FAQ
[/[Print]\]

MVSFORUMS.com -> Utilities

#1: Matching Logic using ICETOOL Author: vijayakumar PostPosted: Thu Aug 06, 2009 1:44 pm
    —
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              -----

#2:  Author: kolusuLocation: San Jose PostPosted: Thu Aug 06, 2009 1:56 pm
    —
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 )

#3:  Author: vijayakumar PostPosted: Fri Aug 07, 2009 4:11 am
    —
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.

#4:  Author: kolusuLocation: San Jose PostPosted: Fri Aug 07, 2009 11:30 am
    —
vijayakumar,

I sent you an email with the code. The email address is the one you have it in your profile on this board.

#5:  Author: vijayakumar PostPosted: Sun Aug 09, 2009 2:12 am
    —
Hi Kolusu,
Thanks very much for your help.
I will update the staus once i complete the code testing.

Thanks
Vijayakumar

#6:  Author: computerLocation: Hyderabad PostPosted: Sun Aug 09, 2009 4:49 am
    —
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

#7:  Author: kolusuLocation: San Jose PostPosted: Mon Aug 10, 2009 12:03 pm
    —
computer,

Sent you an email to the address listed in your profile

#8:  Author: puttu PostPosted: Thu Sep 02, 2010 3:39 am
    —
hi vijayakumar,
can u plz send me the code...
i got same require ment ,.....

#9:  Author: kolusuLocation: San Jose PostPosted: Thu Sep 02, 2010 10:15 am
    —
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



MVSFORUMS.com -> Utilities


output generated using printer-friendly topic mod. All times are GMT - 5 Hours

Page 1 of 1

Powered by phpBB © 2001, 2005 phpBB Group