Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

BMC unload plus utility - Join Tables

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: BMC unload plus utility - Join Tables
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    Post subject: Reply to: BMC unload plus utility - Join Tables
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    Post subject: Reply to: BMC unload plus utility - Join Tables
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am
No new posts To know activities on db2 tables ashek15 DB2 4 Fri Mar 03, 2017 11:23 pm
No new posts ERM-Diagram of SysIBM-Catalog-Tables Auryn DB2 2 Fri Feb 17, 2017 6:22 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us