MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Can we check DB2 table in sort

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
shyamsaravan
Beginner


Joined: 12 May 2010
Posts: 44
Topics: 12
Location: India

PostPosted: Thu Apr 12, 2012 7:40 am    Post subject: Can we check DB2 table in sort Reply with quote

Hi;

I have a question like..

We have to match two PS files and the unmatching records should be wriiten in another file,before that we have to check the data existence in the DB2 table..
Is it possible to check DB2 data existence in the SORT process..

I will describe the detail in the next post,if the answer is YES..
Thanks;
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Thu Apr 12, 2012 8:59 am    Post subject: Reply with quote

syncsort allows for embedded sql in the control cards.
i do not believe dfsort has the sql type option.

what i would do, anyway, (i would refrain from db SELECTs to validate) is:
1. dump the db2 table (only the columns necessary for matching and validation.
2. use the dump as a third ps file for the sort.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
Sqlcode
Intermediate


Joined: 15 Dec 2006
Posts: 157
Topics: 38

PostPosted: Thu Apr 12, 2012 9:31 am    Post subject: Reply with quote

shyamsaravan,
It may be possible if you are willing to code DFSort user exit. I personally haven't coded one to check for dB2 existence but it may be possible.

Refer to link below for more information.
http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/ice1ca50/4.8.3?ACTION=MATCHES&REQUEST=e35&TYPE=FUZZY&SHELF=&DT=20100630155256&CASE=&searchTopic=TOPIC&searchText=TEXT&searchIndex=INDEX&rank=RANK&ScrollTOP=FIRSTHIT#FIRSTHIT

Thanks,
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Apr 12, 2012 10:31 am    Post subject: Reply with quote

shyamsaravan,

You have 2 options.

1. Unload the DB2 table to a file and then perform the matching using JOINKEYS.

2. If for some reason you canNOT unload the table, then you can code an EXIT and validate the existence of the table in there. The exit would be like any other subroutine you code.
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Apr 12, 2012 10:34 am    Post subject: Reply with quote

dbzTHEdinosauer wrote:
syncsort allows for embedded sql in the control cards.
i do not believe dfsort has the sql type option..


DFSORT does not have the SQL function as there more than a couple of DB2 Utilities which perform the Unload.

AFAIK , the sql function of syncsort lets you unload the data from tables and use sort reporting features instead of using a DB2 utility.

SAS on the other hand can perform a match treating the DB2 table as a file.
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group