Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Files compare thru dfsort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
mandyzzzz

New User


Joined: 04 Jul 2005
Posts: 23

PostPosted: Tue Jan 24, 2006 11:28 pm    Post subject: Files compare thru dfsort
Reply with quote

I have 2 files of same layouts.
2 fields in each say item number and amount
I need to match the item numbers and when amounts of same items mismatch write the record in a file.

Please help!
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Jan 25, 2006 12:14 am    Post subject:
Reply with quote

Please show an example of the record in each input file with all relevent fields and what you expect for the output files, and explain the "rules". Also, what is the RECFM and LRECL of the input files?
Back to top
View user's profile Send private message
mandyzzzz

New User


Joined: 04 Jul 2005
Posts: 23

PostPosted: Wed Jan 25, 2006 11:46 am    Post subject:
Reply with quote

Both are FB of 80 bytes and same layout.
there are 2 fields item number and amount in both.

Code:

File1
----
Itemno.  amount
--------------------
1        100.00
4        321.98
3        134.87
41       123.98
18        11.23



Code:

File2
----
Itemno.  amount
--------------------
1        100.00
4        111.98
3        134.87
41       123.98
18        11.23



I want record corresponding to item number 4 on output file as amounts mismatch.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Jan 25, 2006 9:46 pm    Post subject:
Reply with quote

Quote:
I want record corresponding to item number 4 on output file as amounts mismatch.


Which record with item number 4? The record from file1? The record from file2? The records from file1 and file2? That's why I asked you to show the records you expected for output.

Another question: Are you matching by key or by record number. For example, are you matching the record with item 4 in file1 to the record with item 4 in file2, or are you matching the second record in file1 with the second record in file2?
Back to top
View user's profile Send private message
mandyzzzz

New User


Joined: 04 Jul 2005
Posts: 23

PostPosted: Thu Feb 02, 2006 1:17 pm    Post subject: Re: Files compare thru dfsort
Reply with quote

Sorry for the late reply.
I want the record from both File1 and File2 into output file.
And i am matching the files thru the key i.e item number only
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Feb 02, 2006 10:17 pm    Post subject:
Reply with quote

The following DFSORT/ICETOOL job will do what you asked for:

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG   DD  SYSOUT=*
//DFSMSG    DD  SYSOUT=*
//CON DD *
1        100.00
4        321.98
3        134.87
41       123.98
18        11.23
/*
//    DD *
1        100.00
4        111.98
3        134.87
41       123.98
18        11.23
/*
//OUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//TOOLIN DD *
SELECT FROM(CON) TO(OUT) ON(1,15,CH) NODUPS
/*


OUT will have:

Code:

4        111.98
4        321.98


If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 15 Thu Dec 01, 2016 8:28 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
No new posts How to get the remainder and quotient... vnktrrd DFSORT/ICETOOL 2 Mon Oct 31, 2016 10:59 am
This topic is locked: you cannot edit posts or make replies. How to use 2 input files in control c... Gunapala CN DFSORT/ICETOOL 23 Thu Oct 13, 2016 3:42 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us