DB2 UNLOAD utility problem

Max Scarpa

DB2 UNLOAD utility problem
Esteemed listers

We're using Db2 UNLOAD utility since long time. But I've a problem I wasn't
able to resolve with this SQL:

(some prevous DDN... process terminated OK)

UNLOAD
FROM TABLE FN0CES0T.TPRE0260P27RT013
WHEN ((P27013_0010 IN ( 3599 , 8178 , 8304 , 8807 , 8309
, 1111 , 2222 , 3333 , 4444 , 5555 ) )
AND P27013_4111 > ( CURRENT TIMESTAMP - 3 MONTHS ))
PUNCHDDN PUNCHDS
UNLDDN UNLDDS

Column P27013_4111 is a timestamp definied as CHAR(26) . Via spufi SQL
works but when used in UNLOAD stream if fails with:

UNLOAD
- FROM TABLE FN0CES0T.TPRE0260P27RT013 WHEN
- ((P27013_0010 IN
- (3599,
- 8178,
- 8304,
- 8807,
- 8309,
- 1111,
- 2222,
- 3333,
- 4444, 5555)) AND
- P27013_4111>(CURRENT TIMESTAMP - 3 MONTHS)) PUNCHDDN PUNCHDS UNLDDN
UNLDDS
- INVALID OPERAND '2006-09-11-09.34.39.352400' FOR KEYWORD 'P27013_4111'

It seems there's a problem when UNLOAD process SQL. I tried many changes in
SQL (more parenthesis, changing order, using CHAR in timestamp value ecc.)
but nope.

Is it a UNLOAD bug (I know there are many) or is like SQL in Reorg which is
a little bit 'wild' ? Any suggstion ?

Thank you in advance

Max Scarpa

2
E=DB sysprog



---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

Antonis Galaios

Re: DB2 UNLOAD utility problem
(in response to Max Scarpa)
I've run an unload with timestamp and went just fine.





________________________________

From: DB2 Data Base Discussion List [mailto:[login to unmask email] On
Behalf Of Max Scarpa
Sent: Monday, December 11, 2006 4:03 PM
To: [login to unmask email]
Subject: [DB2-L] DB2 UNLOAD utility problem



Esteemed listers

We're using Db2 UNLOAD utility since long time. But I've a problem I
wasn't able to resolve with this SQL:

(some prevous DDN... process terminated OK)

UNLOAD
FROM TABLE FN0CES0T.TPRE0260P27RT013
WHEN ((P27013_0010 IN ( 3599 , 8178 , 8304 , 8807 , 8309
, 1111 , 2222 , 3333 , 4444 , 5555 ) )
AND P27013_4111 > ( CURRENT TIMESTAMP - 3 MONTHS ))
PUNCHDDN PUNCHDS
UNLDDN UNLDDS

Column P27013_4111 is a timestamp definied as CHAR(26) . Via spufi SQL
works but when used in UNLOAD stream if fails with:

UNLOAD
- FROM TABLE FN0CES0T.TPRE0260P27RT013 WHEN
- ((P27013_0010 IN
- (3599,
- 8178,
- 8304,
- 8807,
- 8309,
- 1111,
- 2222,
- 3333,
- 4444, 5555)) AND
- P27013_4111>(CURRENT TIMESTAMP - 3 MONTHS)) PUNCHDDN PUNCHDS UNLDDN
UNLDDS
- INVALID OPERAND '2006-09-11-09.34.39.352400' FOR KEYWORD 'P27013_4111'


It seems there's a problem when UNLOAD process SQL. I tried many changes
in SQL (more parenthesis, changing order, using CHAR in timestamp value
ecc.) but nope.

Is it a UNLOAD bug (I know there are many) or is like SQL in Reorg which
is a little bit 'wild' ? Any suggstion ?

Thank you in advance

Max Scarpa

2
E=DB sysprog




------------------------------------------------------------------------
--------- Welcome to the IDUG DB2-L list. To unsubscribe, go to the
archives and home page at http://www.idugdb2-l.org/archives/db2-l.html.
From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at
http://www.idugdb2-l.org. The IDUG List Admins can be reached at
[login to unmask email] Find out the latest on IDUG conferences
at http://conferences.idug.org/index.cfm

Disclaimer:
This e-mail is confidential. If you are not the intended recipient, you should not copy it, re-transmit it, use it or disclose its contents, but should return it to the sender immediately and delete the copy from your system.
EFG Eurobank Ergasias S.A. is not responsible for, nor endorses, any opinion, recommendation, conclusion, solicitation, offer or agreement or any information contained in this communication.
EFG Eurobank Ergasias S.A. cannot accept any responsibility for the accuracy or completeness of this message as it has been transmitted over a public network. If you suspect that the message may have been intercepted or amended, please call the sender.


---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

Walter Janißen

Re: DB2 UNLOAD utility problem
(in response to Antonis Galaios)
Max

What do you mean with:

Column P27013_4111 is a timestamp definied as CHAR(26)

It's a little bit ambigious. I assume the column is defined CHAR(26), so
the column is CHAR and holds timestamp-values. Right?

So you would have to use the DATE-function, but that's not allowed in a
WHEN-clause.

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm