HP Unload Question re: Date Fields - Success!

Michael Dransfield

HP Unload Question re: Date Fields - Success!
Adam,

Reporting back, for the betterment of DBAkind :)

After a couple unsuccessful attempts:

COL MDT TYPE DATE NULLID NO
COL MDT TYPE DATE NULLID YES (just for fun)

I tried this:

COL MDT TYPE CHAR(10) NULLID NO

This final attempt eliminated the x'00'.


I'll have to track down where the NULLID is (apparently) set to YES
here.

Many thanks for your help.

Best,
Mike

-----Original Message-----
From: IDUG DB2-L [mailto:[login to unmask email] On Behalf Of Adam Baldwin
Sent: Wednesday, December 23, 2009 6:42 AM
To: [login to unmask email]
Subject: Re: [DB2-L] HP Unload Question re: Date Fields

Mike, if the x'00' is as result of a nullable column you can use the
NULLID or
NULL keywords in your USER block to handle that. The default for NULLID
is
NO, so you shouldn't be getting a preceding null indicator unless you've

maybe got it set to yes in your Options or elsewhere.

Regards, Adam

_____________________________________________________________________

* IDUG North America * Tampa, Florida, * May 10-14 2010 *
http://IDUG.ORG/NA *
_____________________________________________________________________

http://www.idug.org/rug/index.html - with almost 150 IDUG Regional User
Groups,
there is probably one near you!
Regional User Groups are your local connection to the Worldwide DB2 User
Community
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L
is the home of IDUG's DB2-L
_______________________________________________

This e-mail may contain information that is confidential, privileged or otherwise protected from disclosure. If you are not an intended recipient of this e-mail, do not duplicate or redistribute it by any means. Please delete it and any attachments and notify the sender that you have received it in error. Unless specifically indicated, this e-mail is not an offer to buy or sell or a solicitation to buy or sell any securities, investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Barclays. Any views or opinions presented are solely those of the author and do not necessarily represent those of Barclays. This e-mail is subject to terms available at the following link: www.barcap.com/emaildisclaimer. By messaging with Barclays you consent to the foregoing. Barclays Capital is the investment banking division of Barclays Bank PLC, a company registered in England (number 1026167) with its registered office at 1 Churchill Place, London, E14 5HP. This email may relate to or be sent from other members of the Barclays Group.
_______________________________________________

_____________________________________________________________________

* IDUG North America * Tampa, Florida, * May 10-14 2010 * http://IDUG.ORG/NA *
_____________________________________________________________________

http://www.idug.org/rug/index.html - with almost 150 IDUG Regional User Groups,
there is probably one near you!
Regional User Groups are your local connection to the Worldwide DB2 User Community
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is the home of IDUG's DB2-L

Adam Baldwin

Re: HP Unload Question re: Date Fields - Success!
(in response to Michael Dransfield)
Mike, I think that the reason that it's not working with DATE is that in this
context the DATE keyword is in correct.

Try with:

COL MDT TYPE DATE_X NULLID NO

Where the X of DATE_X is a character A - P according to the list below:

DATE_A format MM-DD-YYYY
DATE_B format MM-DD-YY
DATE_C format YYYY-MM-DD
DATE_D format YY-MM-DD
DATE_E format DD-MM-YYYY
DATE_F format DD-MM-YY
DATE_G format YYYY-DDD
DATE_H format YY-DDD
DATE_I format MMDDYYYY
DATE_J format MMDDYY
DATE_K format YYYYMMDD
DATE_L format YYMMDD
DATE_M format DDMMYYYY
DATE_N format DDMMYY
DATE_O format YYYYDDD
DATE_P format YYDDD

If CHAR(10) works for you that's great. If you want to format the output of your
date column, the above will help.

The output for all date columns can be specified in the Options block. Then
you could just code:

COL MDT NULLID NO.

Hope that helps.

Cheers, Adam

_____________________________________________________________________

* IDUG North America * Tampa, Florida, * May 10-14 2010 * http://IDUG.ORG/NA *
_____________________________________________________________________

http://www.IDUG.org membership is now free.
Do you have people in your office who are not an IDUG member?
Show them how to access the information and help train the next generation of DB2 Users!
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is the home of IDUG's DB2-L