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

Error in BMC ADUUMAIN Unload utility


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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
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: 792
Location: Chennai, India

PostPosted: Mon Apr 30, 2012 11:45 am
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Remote Unload of CLOB Columns DB2 6
Search our Forums:

Back to Top