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

BMC unload plus utility - Join Tables


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vijikesavan

Active User


Joined: 04 Oct 2006
Posts: 118
Location: NJ, USA

PostPosted: Wed Nov 28, 2007 10:20 pm
Reply with quote

Hi,
We are trying to use BMC unload utility and trying to unload from 2 tables using join.
But we are getting error. The same SQL is running fine in Spufi.
Is it like we cannot use more than one table in BMC unload?
pls clarify.
Thanks,
Viji
Back to top
View user's profile Send private message
mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Thu Nov 29, 2007 1:27 pm
Reply with quote

Hi Viji,

It's not like that. U can use joins while unloading using BMC Unload Utility. Can u just paste the Unload card here, so that it will be easy to give u the solution.
Back to top
View user's profile Send private message
vijikesavan

Active User


Joined: 04 Oct 2006
Posts: 118
Location: NJ, USA

PostPosted: Thu Nov 29, 2007 9:09 pm
Reply with quote

Thanks.
we actually got is solved by using DIRECT NO option instead of Share.
But still am not sure why it gave error when used with Share. here is the SQL - the error one
Code:
UNLOAD                                           
SHRLEVEL CHANGE CONSISTENT NO QUIESCE           
SELECT                                           
      A.Field1
     ,A.Field2
     ,A.Field3
FROM  owner1.tblA A                                         
         ,owner2.tblB B
   WHERE A.Field1  BETWEEN  '1       ' AND '19999999'                 
   AND   A.Field2   = B.field2                                   
   AND A.Field3 = '9999-12-31'                                   
   AND B.Field2 = 'A'                                         

Error:
 COMMAND ===>                                                  SCROLL ===> CSR
 BMC50102I    FROM  owner1.tblA                                         
 BMC50102I         ,Owner2.tblB                                         
 BMC50102I         @                                                         
 BMC50104E UNEXPECTED TOKEN ',' ENCOUNTERED IN COMMAND                       
0BMC50013I UTILITY EXECUTION TERMINATING, RETURN CODE = 8                     


The modified one:

Code:
UNLOAD                                                             
DIRECT NO                                                           
SELECT                                           
      A.Field1
     ,A.Field2
     ,A.Field3
FROM  owner1.tblA A                                         
         ,owner2.tblB B
   WHERE A.Field1  BETWEEN  '1       ' AND '19999999'                 
   AND   A.Field2   = B.field2                                   
   AND A.Field3 = '9999-12-31'                                   
   AND B.Field2 = 'A'                                           

If anyone can tell me the difference between "Share" and "direct no"..it would be of great help.
Thanks,
Viji
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 -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Remote Unload of CLOB Columns DB2 6
No new posts Multiple table unload using INZUTILB DB2 2
No new posts REASON 00D70014 in load utility DB2 6
No new posts changing defaults in db2 admin - Unlo... DB2 0
Search our Forums:

Back to Top