IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to write Comparision using ICETOOL


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
lohithegde

New User


Joined: 18 May 2008
Posts: 31
Location: Chennai

PostPosted: Thu Sep 25, 2008 8:48 pm
Reply with quote

HI
How to write the Sort cord In ICETOOL for following Many to many match
(Note: '------' used to seperate to fields)
1S FULL UNLOAD(infile1)
CONT EQ ID----------- CONT ID---------ADMIN ID---------DISCRIPTION

100 --------------------- 1 -------------- 11
200 -------------------- 1 -------------- 11
300 -------------------- 1 -------------- 11

400 -------------------- 2 ----------------22
500 -------------------- 2 ----------------22

700 --------------------- 3 --------------- 33
800 --------------------- 3 --------------- 33
900 --------------------- 3 --------------- 33---2007-05-18-04.06.07.310000

1000--------------------- 4--------------- 44

1400 ---------------------6 ---------------66
1500 --------------------6 ------------- 66

3s Active File(infile2)
CONT EQ ID CONT ID ADMIN Client ID

100---------------------- 1 --------- 11
200---------------------- 1 --------- 11


400---------------------- 2 --------- 22
500---------------------- 2 --------- 22
600---------------------- 2 --------- 22

700----------------------3 --------- 33
800----------------------3 --------- 33
900----------------------3 --------- 33


1100----------------------5 --------- 55
1400----------------------6 -------- 66
1500----------------------6 -------- 66

FILC (OUTOUT)
CONT EQ ID CONT ID ADMIN Client ID

100---------------------- 1 --------- 11
200---------------------- 1 --------- 11

400---------------------- 2 --------- 22
500---------------------- 2 --------- 22
600---------------------- 2 --------- 22


700----------------------3 --------- 33
800----------------------3 --------- 33
900----------------------3 --------- 33---2007-05-18-04.06.07.310000

1100----------------------5 --------- 55

FILD (OUTOUT)
CONT EQ ID CONT ID ADMIN Client ID

100---------------------- 1 --------- 11
200---------------------- 1 --------- 11
300---------------------- 1 --------- 11

400---------------------- 2 --------- 22
500---------------------- 2 --------- 22

700----------------------3 --------- 33
800----------------------3 --------- 33
900----------------------3 --------- 33

1000-------------------- 4---------- 44
Back to top
View user's profile Send private message
lohithegde

New User


Joined: 18 May 2008
Posts: 31
Location: Chennai

PostPosted: Thu Sep 25, 2008 9:21 pm
Reply with quote

HI (sorry this is req)
How to write the Sort cord In ICETOOL for following Many to many match
(Note: '------' used to seperate to fields)
1S FULL UNLOAD(infile1)
CONT EQ ID----------- CONT ID---------ADMIN ID---------DISCRIPTION

100 --------------------- 1 -------------- 11
200 -------------------- 1 -------------- 11
300 -------------------- 1 -------------- 11

400 -------------------- 2 ----------------22
500 -------------------- 2 ----------------22

700 --------------------- 3 --------------- 33
800 --------------------- 3 --------------- 33
900 --------------------- 3 --------------- 33---2007-05-18-04.06.07.310000

1000--------------------- 4--------------- 44

1400 ---------------------6 ---------------66
1500 --------------------6 ------------- 66

3s Active File(infile2)
CONT EQ ID CONT ID ADMIN Client ID

100---------------------- 1 --------- 11
200---------------------- 1 --------- 11


400---------------------- 2 --------- 22
500---------------------- 2 --------- 22
600---------------------- 2 --------- 22

700----------------------3 --------- 33
800----------------------3 --------- 33
900----------------------3 --------- 33


1100----------------------5 --------- 55
1400----------------------6 -------- 66
1500----------------------6 -------- 66

FILC (OUTOUT)
CONT EQ ID CONT ID ADMIN Client ID

100---------------------- 1 --------- 11
200---------------------- 1 --------- 11

400---------------------- 2 --------- 22
500---------------------- 2 --------- 22
600---------------------- 2 --------- 22


700----------------------3 --------- 33
800----------------------3 --------- 33
900----------------------3 --------- 33

1100----------------------5 --------- 55

FILD (OUTOUT)
CONT EQ ID CONT ID ADMIN Client ID

100---------------------- 1 --------- 11
200---------------------- 1 --------- 11
300---------------------- 1 --------- 11

400---------------------- 2 --------- 22
500---------------------- 2 --------- 22

700----------------------3 --------- 33
800----------------------3 --------- 33
900----------------------3 --------- 33 ---2007-05-18-04.06.07.310000

1000-------------------- 4---------- 44
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Sep 25, 2008 9:27 pm
Reply with quote

if You had made a note about an error in Your output description
I would not have deleted Your post

also why not use the code tags, it makes data easier to read
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Thu Sep 25, 2008 9:31 pm
Reply with quote

If you would setup the the colums using Notepad (with a Courier font), cut and paste to the edit box and wrap it all with CODE, the display would not need all those little dashes.......

Is the second posting different from the first?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Sep 25, 2008 9:35 pm
Reply with quote

Quote:
s the second posting different from the first?


yes, I was going to delete it when I noticed that he moved a record from FILEC to FILED

( I had already deleted one that I though a duplicate, but then I looked better )
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Thu Sep 25, 2008 10:31 pm
Reply with quote

I tried to decipher the requirement to my best ability but I could not.



File 1
Code:

 100---------------------1 -------------- 11
 200---------------------1 -------------- 11
 400-------------------- 2 -------------- 22
 500-------------------- 2 -------------- 22
 600-------------------- 2 -------------- 22
 700---------------------3 -------------- 33
 800---------------------3 -------------- 33
 900---------------------3 -------------- 33
1100---------------------5 -------------- 55
1400---------------------6 -------------- 66
1500---------------------6 -------------- 66


File 2

Code:

 100 ------------------- 1 -------------- 11                           
 200 ------------------- 1 -------------- 11                           
 300 ------------------- 1 -------------- 11                           
 400 ------------------- 2 ---------------22                           
 500 ------------------- 2 ---------------22                           
 700 ------------------- 3 ---------------33                           
 800 ------------------- 3 ---------------33                           
 900 ------------------- 3 ---------------33 2007-05-18-04.06.07.310000
1000-------------------- 4 ---------------44                           
1400 --------------------6 ---------------66                           
1500 --------------------6 -------------- 66                           


Now

1. what are the rules to match the records. what is the key field , format and its position. if possible post the cobol layout of both files.

2. what is the LRECL and RECFM of file 1 and file 2.

3. You mentioned many to many match but none of the file you have shown has duplicates. So where did this many to many match come from?
Back to top
View user's profile Send private message
lohithegde

New User


Joined: 18 May 2008
Posts: 31
Location: Chennai

PostPosted: Fri Sep 26, 2008 3:32 pm
Reply with quote

How to write the Sort cord In ICETOOL for following Many to many match
Code:
FIle 1
1Field1(10p)            1Field2(10p)     1Field3(10p)
 100                        1                     11
 200                        1                     11
 400                        2                     22
 500                        2                     22
 600                        2                     22
 700                        3                     33
 800                        3                     33
 900                        3                     33
1100                       5                      55
1400                       6                      66
1500                       6                      66
2Field1:---------------2Field2-------------2Field3-----2Field4(26 A)
100                        1                       11
 200                       1                       11
 300                       1                       11
 400                       2                       22
 500                       2                       22
 700                       3                       33                           
 800                       3                       33                           
 900                       3                       33         2007-05-18-04.06.07.310000
1000                      4                        44                           
1400                      6                        66                           
1500                      6                        66
Output files Requried FILC anf FILED
FILC will be created from file1(only file1 rec will be present here)
FILD will be created from file2(only file2 rec will be present here)
Sorted on filed3 field2 and field1
Step1:
if 1field3 = 2fielde3 and 1field2 = 2fielde2 and 1field1 = 2fielde1 2 field4 is date populated
then All records which belong to 1filed3 from file1 move to filc(700 800 900)
All records which belong to 1filed3 from file2 move to fild(700 800 900)

Step2:
if 1field3 = 2fielde3 and 1field2 = 2fielde2 and 1field1 NOT EQUAL 2fielde1 2 field4 is date Not populated
then All records which belong to 1filed3 from file1 move to filc
All records which belong to 1filed3 from file2 move to fild
Step3:if 1field3 = 2fielde3 and 1field2 = 2fielde2 and 1field1 =2fielde1 2 field4 is date Not populated
Then for every filed3 field2 then leave it( 6 66)
Step4:
if 1field3 1field2 1 filed1 cobination not present in file2
All records which belong to 1filed3 from file1 move to filc(100 200)
All records which belong to 1filed3 from file2 move to fild(100 200 300)

And visa versa (400 500)

step5:
Also if 1field3 1field2 not att all present in file 2 move that rec to filC(1100)

also if 2field3 2field2 not att all present in file 1 move that rec to filD(1100)



to Expain the whole process i wrote the output files

Code:
FILC (OUTOUT)    [created from file1]
1Field1(10p)            1Field2(10p)     1Field3(10p)

100                              1                   11
200                              1                   11
400                              2                   22
500                              2                   22
600                              2                   22
700                              3                   33
800                              3                   33
900                              3                   33
1100                            5                   55

FILD (OUTOUT)           [created from file2]
2Field1(10p)            2Field2(10p)     2Field3(10p)  2filed4

100                              1                     11
200                              1                     11
300                              1                     11

400                              2                     22
500                              2                     22

700                              3                     33

800                              3                     33

900                              3                     33              2007-05-18-04.06.07.310000

1000                             4                     44
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Tue Sep 30, 2008 4:20 am
Reply with quote

lohithegde,

*Sigh* you did not answer all of my questions but you came up with your own intrepration of how you want the data.

Your rules are confusing and do NOT match your requrirements

for ex:
lohitedge wrote:
if 1field3 = 2fielde3 and 1field2 = 2fielde2 and 1field1 = 2fielde1 2 field4 is date populated then All records which belong to 1filed3 from file1 move to filc(700 800 900)


Ok if all 3 fields are equal what is so special about 700, 800, 900 records that they get picked.

All these records from file 1 have all the 3 fields equal to 3 fields from file 2

Code:

 100---------------------1 -------------- 11
 200---------------------1 -------------- 11
 400-------------------- 2 -------------- 22
 500-------------------- 2 -------------- 22
 700---------------------3 -------------- 33
 800---------------------3 -------------- 33
 900---------------------3 -------------- 33
1400---------------------6 -------------- 66
1500---------------------6 -------------- 66


1. Why did you eliminate the above records?
2. What does 10P stand for? 10 byte packed decimal data?
3. post the cobol layout of input file 1 and file2.
4. What is the position and format of 1field1, 1field2, 1field3 , 2field1, 2field2 and 2field3
5. What is the LRECL and RECFM of both input files and also output files
Back to top
View user's profile Send private message
lohithegde

New User


Joined: 18 May 2008
Posts: 31
Location: Chennai

PostPosted: Wed Oct 01, 2008 8:03 am
Reply with quote

Quote:
Why did you eliminate the above records?

i Eliminated only
Code:
1400---------------------6 -------------- 66
1500---------------------6 -------------- 66

As Both have 1-1 match as well as 2Filed4 is not populated for both fields

Quote:
2. What does 10P stand for? 10 byte packed decimal data?


Yes it is Packed Decimal Data

Quote:
3. post the cobol layout of input file 1 and file2


Both have same Lay out
Code:
file1
10 1Field1        PIC S9(18)V USAGE COMP-3.
10 1filed2        PIC S9(18)V USAGE COMP-3. 
10 1field3        PIC X(20).
10 1field5        Pic  X(*)
file2
10 2Field1        PIC S9(18)V USAGE COMP-3.
10 2filed2        PIC S9(18)V USAGE COMP-3. 
10 2field3        PIC X(20).
10.2field4        PIC X(30).
10 2field5        Pic  X(*)


Quote:
5. What is the LRECL and RECFM of both input files and also output files

LRECL = 146 RECFM=FB

Additional Information:
Quote:
if 1field3 = 2fielde3 and 1field2 = 2fielde2 and 1field1 = 2fielde1 2 field4 is date populated then All records which belong to 1filed3 from file1 move to filc(700 800 900)

1.If any date is populated in that 2field4 means that record is incorrect
2.Please take 1field3 as reference.
If Anything is having unequal then Move all Records Belong to that particular 1field3 to respectieve FILC and FILD
3.Even though if it is macthing if date is populated then we have we have to Move all Records Belong to that particular 1field3/2field3 to respectieve FILC and FILD

4.Taking 1field3/fielde3 as reference
If all rec are matching and 2field4 is not populated for all rec 1field3/fielde3 , that means we can remove records which belong to that particular 1field3, 2fielde3
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Shift left VB record without x00 endi... DFSORT/ICETOOL 11
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
No new posts how to calculate SUM for VB file usin... JCL & VSAM 1
Search our Forums:

Back to Top