Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 22 Sun Aug 27, 2017 10:35 pm
No new posts How to Use DebugTool CodeCoverage Uti... neo4u IBM Tools 0 Thu Jun 22, 2017 6:38 pm
No new posts Identify top 30 big tables or indexes... ashek15 DB2 0 Fri Jun 16, 2017 10:01 am
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us