Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm
No new posts Comparing 2 Files using Current time arunsoods SYNCSORT 9 Fri Sep 22, 2017 6:00 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us