View previous topic :: View next topic
|
Author |
Message |
Mahua Mitra
New User
Joined: 26 Apr 2007 Posts: 49 Location: Delhi
|
|
|
|
Hi,
Say I have two files. File A is subset of File B.
Is there a way through which I can write the records (File B - File A) that is the non matching records of File A in File B, in a third file , File C.
I want it to be done through JCL.
Thanks in advance.
Mahua |
|
Back to top |
|
|
pingte
Active User
Joined: 03 Dec 2005 Posts: 120 Location: india
|
|
|
|
U can implement SUPERC logic in JCL ...
using EXEC PGM=SUPERC....
and in output u can specify a Dataset to store the result....
I not not sure of the job syntax... u have to try |
|
Back to top |
|
|
pingte
Active User
Joined: 03 Dec 2005 Posts: 120 Location: india
|
|
|
|
check this code...
Code: |
//SUPERC EXEC PGM=ISRSUPC,
// PARM=(DELTAL,LINECMP,'','')
//OLDDD DD DSN=data.set.one,DISP=SHR
//NEWDD DD DSN=data.set.two,DISP=SHR
//OUTDD DD DSN=data.set.output,DISP=(NEW,CATLG,DELETE),
DCB=(.....)
/*
|
SUPERC compare can be of following types:
File Compare
Summarizes differences between two files being compared
Line Compare
Record oriented. Shows matching, inserted, deleted and reformatted lines. Most useful for comparing lines of program source code. Can be used to help detect regressions and to validate appropriateness of code modifications.
Word Compare
Reveals differences in data strings delimited by spaces and punctuation marks, such as commas. Finds matching words, even when they are on different lines. Most useful for comparing two text data sets and tracking revisions in text documents.
Byte Compare
Finds differences in bytes. Best for comparing machine-readable and unformatted data. |
|
Back to top |
|
|
Devzee
Active Member
Joined: 20 Jan 2007 Posts: 684 Location: Hollywood
|
|
|
|
You can try with ICETOOL sort. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi,
If you want to use SUPERC, please go through the link:
www.ibmmainframes.com/viewtopic.php?t=21544
Hopefully above link provides the answer.
As Devzee said, if SORT can be used, search for Smart DFSORT Tricks manual, you'll get solution of problem there. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
anuj_model wrote: |
As Devzee said, if SORT can be used, search for Smart DFSORT Tricks manual, you'll get solution of problem there. |
In the attachment search for:
'Create files with matching and non-matching records'.
& yeah by search I mean search on this site not in Google or so.
by the way for current requirement attachment is enough. Thanks to Frank Yaeger for this. |
|
Back to top |
|
|
Devzee
Active Member
Joined: 20 Jan 2007 Posts: 684 Location: Hollywood
|
|
|
|
anuj_model Just a thought... You could have given the URL link and there is no need to attach the PDF. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Devzee wrote: |
anuj_model Just a thought... You could have given the URL link and there is no need to attach the PDF. |
Yeah, that's a better idea. I tried to find the URL first but search on keyword DFSORT given me a lot of results.
This PDF was handy to me, so I attached for an easy reference.
I'll take care about this in future posts. |
|
Back to top |
|
|
ahr
New User
Joined: 24 Apr 2007 Posts: 14 Location: India
|
|
|
|
I am just giving an idea to extract the non-matching records from 2 files.
If you have reasonable knowledge in Easytrieve, you can do the below solution in 2 or 3 hours.
Sort File-A, File-B on a key,
Use Easytrieve to compare both the files and write the output to File-C.
Use the below logic to extract non-matching records.
Read records from FILE-A and FILE-B
Put the below logic in a loop.
If KEY-A = KEY-B
read File-A for next record
read File-B for next record
Else
If KEY-A > KEY-B
read File-B for next record
Else
read FILE-A for next record
END-IF
END-IF.
Hope I answered your question. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
I tried to find the URL first but search on keyword DFSORT given me a lot of results.
This PDF was handy to me, so I attached for an easy reference. |
The URL for the Smart DFSORT Tricks is:
www.ibm.com/servers/storage/support/software/sort/mvs/tricks/
I've posted it many, many times on this board.
Please DO NOT attach the pdf in the future. I do revise the pdf so posting a static copy will eventually make it out-of-date. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Thanks Frank. |
|
Back to top |
|
|
|