I have to convert beloq sql query to corresponding sort so is it possible to do it?
Code:
SELECT B.name
, A.userid
, A.number
FROM name1 A
, userid1 B
, number1 C
WHERE
A.uu <> 0
AND A.char = B.char
AND A.number = B.number
AND A.aset = C.aset
Below are the unload files and corresponding offsets,
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
Rohit Umarjikar,
Your USERID file have overlapping fields. If the number field starts at pos 22 for a length of 10 bytes you cannot have the Name field start at position 30. I assumed that the name field in userid file starts at pos 35.
@Dick:
Your are correct, but I do have the unload files for these tables and the reason I am trying it to convert the SQLs to SORT is beacuse of more CPU time is being taken by these SQLs in batch.
@Skolusu:
Thanks for your support as I always get, I will try this out.
SELECT Count (Distinct B.name )
, Count (Distinct A.userid)
, Count (Distinct A.number)
FROM name1 A
, userid1 B
, number1 C
WHERE
A.uu <> 0
AND A.char = B.char
AND A.number = B.number
AND A.aset = C.aset
This is the query and the one u gave up is working fine can you suggest me to modify the SORT?
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
Rohit Umarjikar wrote:
@Skolusu,
This is the query and the one u gave up is working fine can you suggest me to modify the SORT?
Rohit Umarjikar,
Is there an end to your queries ? I provided the frame work for the matching , now YOU can/have to expand it to get to the counts. Just because I tend to provide complete solutions , doesn't mean that you can get your work done by me. Look up the reporting features TRAILER , SECTIONS and COUNT keywords.
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: