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
 

 

Error in BMC ADUUMAIN Unload utility

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
Parinathan

New User


Joined: 29 Apr 2012
Posts: 3
Location: India

PostPosted: Sun Apr 29, 2012 7:16 pm    Post subject: Error in BMC ADUUMAIN Unload utility
Reply with quote

I receive an Error while trying to execute the below query in BMC unload utility ADUUMAIN

Select * from DB2.VEMPNO_EMP
where EFF_DT >= (select current_date from sysibm.sysdummy1)

The error msg is below,

Unexpected token near
*
(Select


Does BMC unload not support sub query?
Advance thanks for your reply icon_smile.gif
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Sun Apr 29, 2012 8:01 pm    Post subject:
Reply with quote

current_date
as is current_time
and current_timestamp
are Special Registers
and can be referenced directly (without the sysibm.sysdumm1).

and obviously, insure that EFF_DT is of date char type.

now, whether BMC supports sub-queries, I don't know.
you are going to have to look at the documentation.

I do know that your sql can be improved,
and you don't need the sub-query in this instance.
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 788
Location: Chennai, India

PostPosted: Mon Apr 30, 2012 11:45 am    Post subject:
Reply with quote

BMC Unload plus supports sub-query if DIRECT NO is specified.

The below are the quotes from the manual.

Quote:
DIRECT NO supports the full range of DB2 SQL SELECT functionality and view definitions.

If you specify DIRECT NO, UNLOAD PLUS uses DB2 dynamic SQL to process the SELECT statement and read the table data. You can take advantage of the full range of functionality that the DB2 SQL SELECT statement provides. However, DIRECT NO is not a high-performance solution for unloading large volumes of data.

UNLOAD PLUS does not support the SHRLEVEL option when you specify DIRECT NO. Instead, you can use isolation levels, which are available in the DB2 SQL WITH clause, to control access to objects during the unload process. For example, to allow read-only access to the objects while using DIRECT NO, you can specify WITH RR in the SELECT statement.

However, specifying an isolation level might not result in the level of locking that SHRLEVEL REFERENCE achieves. The access path that UNLOAD PLUS uses when processing the SELECT statement can affect row locking. Rows might be locked as they are read, whereas specifying SHRLEVEL REFERENCE causes UNLOAD PLUS to lock the objects before it reads the data.

When you use DIRECT NO, you must specify the primary and secondary SPACE quantities.

Additionally, DIRECT NO does not support all options, including the
following examples:
- unloading from image copies
- user-defined types
- UNLOAD TABLESPACE command
- SHRLEVEL option
Back to top
View user's profile Send private message
Parinathan

New User


Joined: 29 Apr 2012
Posts: 3
Location: India

PostPosted: Sun May 06, 2012 8:29 pm    Post subject:
Reply with quote

Thank you... icon_smile.gif It works
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Sun May 06, 2012 10:51 pm    Post subject:
Reply with quote

Parinathan wrote:
Thank you... icon_smile.gif It works


thx for getting back to us, but what did you do to resolve your problem?
Back to top
View user's profile Send private message
Parinathan

New User


Joined: 29 Apr 2012
Posts: 3
Location: India

PostPosted: Mon May 07, 2012 12:48 pm    Post subject:
Reply with quote

I removed the SHRLEVEL clause and added DIRECT NO. It worked. I can't directly use CURRENT DATE since i have to add additional manipulations with CURRENT DATE
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 Need help with below DB2 error ashek15 DB2 3 Sat Mar 18, 2017 5:56 am
No new posts FINDREP Syntax Error seahawk789 DFSORT/ICETOOL 4 Thu Mar 09, 2017 10:11 pm
No new posts INVOKE WEBSERVICE error danik56 CICS 11 Thu Mar 09, 2017 11:52 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 Row not found Sql error GaganGarg DB2 7 Tue Mar 07, 2017 6:29 am


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