How to code for multiple WHEN conditions on Load

Ockenfels Michael

How to code for multiple WHEN conditions on Load
According to the manuals, we are supposed to be able to code multiple WHEN
conditions on the IBM load utility. After many unsucecssful attempts, I'm
looking for someone who may have a working example.

I've tried:
(COL1 = 'A') , (COL2 = 'B')

(COL1 = A, COL2 = 'B')

Also the same using positional parameters

Multiple WHEN statements


Thanks
Mike

IMPORTANT NOTICE:

IDUG is pleased to announce a series of upgrades to the DB2-L discussion listserv that are being implemented to improve reliability and the overall user experience of DB2-L. These changes are coming on November 30th. Details at http://www.idug.org

---------------------------------------------------------------------------------
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

David Seibert

Re: How to code for multiple WHEN conditions on Load
(in response to Ockenfels Michael)
Hi Mike,

My reading of the syntax diagram makes me think your first option
should work if you put another pair of parentheses around the outside of
your existing set of criteria.

I'll give it a try, but meanwhile try it yourself.

What error do you get?

Dave


The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it.

From: DB2 Data Base Discussion List [mailto:[login to unmask email] On
Behalf Of Mike Ockenfels
Sent: Tuesday, December 04, 2007 9:07 AM
To: [login to unmask email]
Subject: [DB2-L] How to code for multiple WHEN conditions on Load

According to the manuals, we are supposed to be able to code multiple
WHEN conditions on the IBM load utility. After many unsucecssful
attempts, I'm looking for someone who may have a working example.

I've tried:
(COL1 = 'A') , (COL2 = 'B')

(COL1 = A, COL2 = 'B')

Also the same using positional parameters

Multiple WHEN statements


Thanks
Mike

IMPORTANT NOTICE:

IDUG is pleased to announce a series of upgrades to the DB2-L discussion
listserv that are being implemented to improve reliability and the
overall user experience of DB2-L. These changes are coming on November
30th. Details at http://www.idug.org

------------------------------------------------------------------------
---------
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

IMPORTANT NOTICE:

IDUG is pleased to announce a series of upgrades to the DB2-L discussion listserv that are being implemented to improve reliability and the overall user experience of DB2-L. These changes are coming on November 30th. Details at http://www.idug.org

---------------------------------------------------------------------------------
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

Philip Sevetson

Re: How to code for multiple WHEN conditions on Load
(in response to David Seibert)
Mike,
That's not what it looks like to me -- the syntax diagram at
http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/dsnugj14/2.14.1.3?SH
ELF=&DT=20061211173328&CASE= seems to be saying that only one WHEN
condition ("Field Selection Criterion") is supported per INTO TABLE
statement.

If you need multiple WHEN conditions you might consider prefiltering
with a utility such as SYNCSORT/DFSORT, using the INCLUDE and OMIT
statements.

--Phil Sevetson, NYCAPS DBA Support
Financial Information Services Agency of The City of New York
450 West 33rd Street, 4th Floor
New York, NY 10001
phone: (212) 857-1688
mailto: [login to unmask email]
-----Original Message-----
From: DB2 Data Base Discussion List [mailto:[login to unmask email] On
Behalf Of Mike Ockenfels
Sent: Tuesday, December 04, 2007 9:07 AM
To: [login to unmask email]
Subject: [DB2-L] How to code for multiple WHEN conditions on Load

According to the manuals, we are supposed to be able to code multiple
WHEN
conditions on the IBM load utility. After many unsucecssful attempts,
I'm
looking for someone who may have a working example.

I've tried:
(COL1 = 'A') , (COL2 = 'B')

(COL1 = A, COL2 = 'B')

Also the same using positional parameters

Multiple WHEN statements


Thanks
Mike

IMPORTANT NOTICE:

IDUG is pleased to announce a series of upgrades to the DB2-L discussion
listserv that are being implemented to improve reliability and the
overall user experience of DB2-L. These changes are coming on November
30th. Details at http://www.idug.org

------------------------------------------------------------------------
---------
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


=========
Confidentiality Notice: This e-mail communication, and any attachments, contains confidential and privileged information for the exclusive use of the recipient(s) named above. If you are not an intended recipient, or the employee or agent responsible to deliver it to an intended recipient, you are hereby notified that you have received this communication in error and that any review, disclosure, dissemination, distribution or copying of it or its contents is prohibited. If you have received this communication in error, please notify me immediately by replying to this message and delete this communication from your computer. Thank you.

Any opinions, expressed or implied, presented are solely those of the author and do not necessarily represent the opinions of the agency or the City.
=========



IMPORTANT NOTICE:

IDUG is pleased to announce a series of upgrades to the DB2-L discussion listserv that are being implemented to improve reliability and the overall user experience of DB2-L. These changes are coming on November 30th. Details at http://www.idug.org

---------------------------------------------------------------------------------
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

David Seibert

Re: How to code for multiple WHEN conditions on Load
(in response to Philip Sevetson)
Hey Mike,

I believe Phil's right.
In all my testing I get invalid keyword or unbalanced parentheses.

I see now I was looking at the field specification in the syntax
diagram, thinking I was looking at the selection criteria.


Dave


The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it.

From: DB2 Data Base Discussion List [mailto:[login to unmask email] On
Behalf Of Sevetson, Phil
Sent: Tuesday, December 04, 2007 9:18 AM
To: [login to unmask email]
Subject: Re: [DB2-L] How to code for multiple WHEN conditions on Load

Mike,
That's not what it looks like to me -- the syntax diagram at
http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/dsnugj14/2.14.1.3?SH
ELF=&DT=20061211173328&CASE= seems to be saying that only one WHEN
condition ("Field Selection Criterion") is supported per INTO TABLE
statement.

If you need multiple WHEN conditions you might consider prefiltering
with a utility such as SYNCSORT/DFSORT, using the INCLUDE and OMIT
statements.

--Phil Sevetson, NYCAPS DBA Support
Financial Information Services Agency of The City of New York 450 West
33rd Street, 4th Floor New York, NY 10001
phone: (212) 857-1688
mailto: [login to unmask email]
-----Original Message-----
From: DB2 Data Base Discussion List [mailto:[login to unmask email] On
Behalf Of Mike Ockenfels
Sent: Tuesday, December 04, 2007 9:07 AM
To: [login to unmask email]
Subject: [DB2-L] How to code for multiple WHEN conditions on Load

According to the manuals, we are supposed to be able to code multiple
WHEN conditions on the IBM load utility. After many unsucecssful
attempts, I'm looking for someone who may have a working example.

I've tried:
(COL1 = 'A') , (COL2 = 'B')

(COL1 = A, COL2 = 'B')

Also the same using positional parameters

Multiple WHEN statements


Thanks
Mike

IMPORTANT NOTICE:

IDUG is pleased to announce a series of upgrades to the DB2-L discussion
listserv that are being implemented to improve reliability and the
overall user experience of DB2-L. These changes are coming on November
30th. Details at http://www.idug.org

------------------------------------------------------------------------
---------
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


=========
Confidentiality Notice: This e-mail communication, and any attachments,
contains confidential and privileged information for the exclusive use
of the recipient(s) named above. If you are not an intended recipient,
or the employee or agent responsible to deliver it to an intended
recipient, you are hereby notified that you have received this
communication in error and that any review, disclosure, dissemination,
distribution or copying of it or its contents is prohibited. If you have
received this communication in error, please notify me immediately by
replying to this message and delete this communication from your
computer. Thank you.

Any opinions, expressed or implied, presented are solely those of the
author and do not necessarily represent the opinions of the agency or
the City.
=========



IMPORTANT NOTICE:

IDUG is pleased to announce a series of upgrades to the DB2-L discussion
listserv that are being implemented to improve reliability and the
overall user experience of DB2-L. These changes are coming on November
30th. Details at http://www.idug.org

------------------------------------------------------------------------
---------
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

IMPORTANT NOTICE:

IDUG is pleased to announce a series of upgrades to the DB2-L discussion listserv that are being implemented to improve reliability and the overall user experience of DB2-L. These changes are coming on November 30th. Details at http://www.idug.org

---------------------------------------------------------------------------------
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

Ockenfels Michael

Re: How to code for multiple WHEN conditions on Load
(in response to David Seibert)
Thanks for pointing that out, Phil and Dave. I obviously misread the syntax
diagram confusing the field selection criteria with the field specification.
There can be only one WHEN condition.

IMPORTANT NOTICE:

IDUG is pleased to announce a series of upgrades to the DB2-L discussion listserv that are being implemented to improve reliability and the overall user experience of DB2-L. These changes are coming on November 30th. Details at http://www.idug.org

---------------------------------------------------------------------------------
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