View previous topic :: View next topic |
Author |
Message |
shyamsaravan Beginner
Joined: 12 May 2010 Posts: 44 Topics: 12 Location: India
|
Posted: Thu Apr 12, 2012 7:40 am Post subject: Can we check DB2 table in sort |
|
|
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 |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Thu Apr 12, 2012 8:59 am Post subject: |
|
|
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 |
|
 |
Sqlcode Intermediate
Joined: 15 Dec 2006 Posts: 157 Topics: 38
|
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Thu Apr 12, 2012 10:31 am Post subject: |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Thu Apr 12, 2012 10:34 am Post subject: |
|
|
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 |
|
 |
|
|