View previous topic :: View next topic
|
Author |
Message |
Rupesh.Kothari
Member of the Month

Joined: 27 Apr 2005 Posts: 463
|
|
|
|
I have two record set A and B
I want record set C whcih contain only records which ar in A but not in B.
Is it possible through any Utility. If yes , How?
Please let me know. |
|
Back to top |
|
 |
somasundaran_k
Active User
.jpg)
Joined: 03 Jun 2003 Posts: 134
|
|
|
|
Rupesh.Kothari
This may be possible using SORT.
Please provide the following details. So that some body will be able to help you.
1. Sort Utility name: DFSORT/SYNCSORT
2.File Type and LRECL
3.Key field position and length.
4.Whether the files have duplicates etc..
5.Sample Input and expected output.
Regds
-Som |
|
Back to top |
|
 |
Frank Yaeger
DFSORT Developer

Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Rupesh,
I think this "Smart DFSORT Trick" will show you how to do what you want to do using DFSORT's ICETOOL. It covers the cases where there are no duplicates within each file and where there are duplicates within each file:
www.ibm.com/servers/storage/support/software/sort/mvs/tricks/srtmst02.html#t05
If you need more specific help, answer Som's questions so we know exactly what you're trying to do. |
|
Back to top |
|
 |
Rupesh.Kothari
Member of the Month

Joined: 27 Apr 2005 Posts: 463
|
|
|
|
Hi Soms
Thanks for your responce
1. Sort Utility name: DFSORT/SYNCSORT
Any utility
2.File Type and LRECL
Filetype = FB and LRECL= 80
3.Key field position and length.
Total record length means 80
4.Whether the files have duplicates etc..
File may contain duplictaes
5.Sample Input and expected output.
Record in File A
Vickey
Harry
Mogtel
Chikki
Bippu
Records in B
Harry
Marry
Expect
Vickey
Expected Records in C
Mogtel
Chikki
Bippu
let me know if you want more info. |
|
Back to top |
|
 |
somasundaran_k
Active User
.jpg)
Joined: 03 Jun 2003 Posts: 134
|
|
|
|
Rupesh,
Did you check the link provided by Frank(He is the DFSORT guru) ?
That will give exactly what you are looking for.
It has two jobs one wihout duplicates and the other with duplicates.
Check the file OUT1 mentioned in these jobs. This will give you the unmatched records present in File A.
Regds
-Som |
|
Back to top |
|
 |
Rupesh.Kothari
Member of the Month

Joined: 27 Apr 2005 Posts: 463
|
|
|
|
Hi,
I checked the link but the JCL provided there is not working. as I m new in mainframe Could you guide me?
Thanks
Rupesh Kothari |
|
Back to top |
|
 |
Frank Yaeger
DFSORT Developer

Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
I checked the link but the JCL provided there is not working. as I m new in mainframe Could you guide me? |
I wrote "the JCL there" and it certainly does work with DFSORT/ICETOOL. If it does not work for you, then there's some difference in what you did. In order for us to actually help you, you have to give us the appropriate information so we can see what you did and what the result was.
Post the actual JCL and control statements YOU used and the //TOOLMSG and //DFSMSG messages YOU received. |
|
Back to top |
|
 |
prasaad_rao
New User
Joined: 26 Apr 2005 Posts: 2
|
|
|
|
File A
SORT FIELDS = COPY
OUTREC FIELDS = (1,80,C'1')
File B
SORT FIELDS = COPY
OUTREC FIELDS = (1,80,C'2')
Now concatenate the tWo files
SORT FIELDS = (1,8,CH,A) /* the name field position
SUM FIELDS = (81,1,ZD)
OUTFILE FILES = 01,
INCLUDE = (81,1,CH,EQ,C'1')
OUTREC FIELDS = (1,80)
OUTFILE FILES = 02,
INCLUDE = (81,1,CH,EQ,C'2')
OUTREC FIELDS = (1,80
OUTFILE FILES = 03,
INCLUDE = (81,1,CH,EQ,C'3')
OUTREC FIELDS = (1,80
File 1 contains the records of file A not in file B |
|
Back to top |
|
 |
notonly4u
New User
.jpg)
Joined: 26 Apr 2005 Posts: 87 Location: Hyderabad
|
|
|
|
Hi Prasaad,
Could you explain your sort more clearly...
Thanks
Tanden |
|
Back to top |
|
 |
prasaad_rao
New User
Joined: 26 Apr 2005 Posts: 2
|
|
|
|
Hi Rupesh,
i think u can get the desired records by Using Syncsort.But as shown below u have to u Sort utility 3 times,
File A
SORT FIELDS = COPY
OUTREC FIELDS = (1,80,C'1')
File B
SORT FIELDS = COPY
OUTREC FIELDS = (1,80,C'2')
Now concatenate the tWo files
SORT FIELDS = (1,8,CH,A) /* the name field position
SUM FIELDS = (81,1,ZD)
OUTFILE FILES = 01,
INCLUDE = (81,1,CH,EQ,C'1')
OUTREC FIELDS = (1,80)
OUTFILE FILES = 02,
INCLUDE = (81,1,CH,EQ,C'2')
OUTREC FIELDS = (1,80
OUTFILE FILES = 03,
INCLUDE = (81,1,CH,EQ,C'3')
OUTREC FIELDS = (1,80
Regards
Satya |
|
Back to top |
|
 |
|