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

Problem in Sort Utility


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

Member of the Month


Joined: 27 Apr 2005
Posts: 463

PostPosted: Wed Apr 27, 2005 6:07 pm
Reply with quote

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
View user's profile Send private message
somasundaran_k

Active User


Joined: 03 Jun 2003
Posts: 134

PostPosted: Wed Apr 27, 2005 7:13 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Wed Apr 27, 2005 8:12 pm
Reply with quote

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
View user's profile Send private message
Rupesh.Kothari

Member of the Month


Joined: 27 Apr 2005
Posts: 463

PostPosted: Wed Apr 27, 2005 10:53 pm
Reply with quote

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
View user's profile Send private message
somasundaran_k

Active User


Joined: 03 Jun 2003
Posts: 134

PostPosted: Wed Apr 27, 2005 11:28 pm
Reply with quote

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
View user's profile Send private message
Rupesh.Kothari

Member of the Month


Joined: 27 Apr 2005
Posts: 463

PostPosted: Thu Apr 28, 2005 11:03 am
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Thu Apr 28, 2005 9:07 pm
Reply with quote

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
View user's profile Send private message
prasaad_rao

New User


Joined: 26 Apr 2005
Posts: 2

PostPosted: Fri May 06, 2005 3:55 pm
Reply with quote

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
View user's profile Send private message
notonly4u

New User


Joined: 26 Apr 2005
Posts: 87
Location: Hyderabad

PostPosted: Fri May 06, 2005 4:09 pm
Reply with quote

Hi Prasaad,

Could you explain your sort more clearly...

Thanks
Tanden
Back to top
View user's profile Send private message
prasaad_rao

New User


Joined: 26 Apr 2005
Posts: 2

PostPosted: Fri May 06, 2005 4:13 pm
Reply with quote

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
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 How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts REASON 00D70014 in load utility DB2 6
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top