DB2 for z/OS - error with UNLOAD utility

Jim McAlpine

DB2 for z/OS - error with UNLOAD utility
I'm getting the following -

DSNU000I 342 17:21:56.24 DSNUGUTC - OUTPUT START FOR UTILITY, UTILID =
UNLOADU
DSNU1044I 342 17:21:56.26 DSNUGTIS - PROCESSING SYSIN AS EBCDIC
DSNU050I 342 17:21:56.27 DSNUGUTC - LISTDEF UNLDLIST INCLUDE TABLE
Z30D.T*
DSNU1035I 342 17:21:56.27 DSNUILDR - LISTDEF STATEMENT PROCESSED
SUCCESSFULLY
DSNU050I 342 17:21:56.27 DSNUGUTC - TEMPLATE UNLDDS DSN
Z30D.UNLOAD.DATA.&TS. DISP(NEW, CATLG, CATLG) SPACE(
750, 750) TRK UNIT 3390 VOLUMES(VPWRAZ)
DSNU1035I 342 17:21:56.27 DSNUJTDR - TEMPLATE STATEMENT PROCESSED
SUCCESSFULLY
DSNU050I 342 17:21:56.27 DSNUGUTC - TEMPLATE PUNCHDS DSN
Z30D.UNLOAD.PARM.&TS. DISP(NEW, CATLG, CATLG) SPACE(1,
1) TRK UNIT 3390 VOLUMES(VPWRAZ)
DSNU1035I 342 17:21:56.27 DSNUJTDR - TEMPLATE STATEMENT PROCESSED
SUCCESSFULLY
DSNU050I 342 17:21:56.27 DSNUGUTC - UNLOAD LIST UNLDLIST PUNCHDDN
PUNCHDS UNLDDN UNLDDS
DSNU1033I 342 17:22:06.13 DSNUGULM - PROCESSING LIST ITEM: TABLESPACE
Z30DDA01.SAACMPY
DSNU1221I 342 17:22:06.16 DSNUUNLD - UNLDDN IS NOT SPECIFIED OR SPECIFIED
TEMPLATE UNLDDS IS INVALID FOR MULTIPLE
TABLE SPACES
DSNU012I 342 17:22:06.17 DSNUGBAC - UTILITY EXECUTION TERMINATED, HIGHEST
RETURN CODE=8
and I can't see an error with the templates.

Also, if I add PREVIEW to the job it runs to completion and the dataset
names are correctly expanded like so -

DSNUGULM - PROCESSING LIST ITEM: TABLESPACE Z30DDZ01.SZZAUDIT
DSNUGPVV - TEMPLATE UNLDDS DSN=Z30D.UNLOAD.DATA.SZZAUDIT
DSNUGPVV - TEMPLATE PUNCHDS DSN=Z30D.UNLOAD.PARM.SZZAUDIT
DSNUGULM - PROCESSING LIST ITEM: TABLESPACE Z30DDZ01.SZZCNTRL
DSNUGPVV - TEMPLATE UNLDDS DSN=Z30D.UNLOAD.DATA.SZZCNTRL
DSNUGPVV - TEMPLATE PUNCHDS DSN=Z30D.UNLOAD.PARM.SZZCNTRL
DSNUGULM - PROCESSING LIST ITEM: TABLESPACE Z30DDZ01.SZZPLAN
DSNUGPVV - TEMPLATE UNLDDS DSN=Z30D.UNLOAD.DATA.SZZPLAN
DSNUGPVV - TEMPLATE PUNCHDS DSN=Z30D.UNLOAD.PARM.SZZPLAN
DSNUGULM - PROCESSING LIST ITEM: TABLESPACE Z30DDZ01.SZZXRST
DSNUGPVV - TEMPLATE UNLDDS DSN=Z30D.UNLOAD.DATA.SZZXRST
DSNUGPVV - TEMPLATE PUNCHDS DSN=Z30D.UNLOAD.PARM.SZZXRST
DSNUGBAC - UTILITY EXECUTION COMPLETE, HIGHEST RETURN CODE=0
Any ideas ?

Jim McAlpine

_____________________________________________________________________
* IDUG North America * Anaheim, California * May 2-6 2011 * http://IDUG.ORG/NA *
* If you are going to attend only one conference this year, this is it! *
** The best DB2 technical sessions in the world
** Independent, not-for-profit, User Run - the IDUG difference!
_____________________________________________________________________

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

Mark M2 Doyle

Re: DB2 for z/OS - error with UNLOAD utility
(in response to Jim McAlpine)
My guess - and is just a guess - 2 tables each having the same TS name (in different databases).

Mark



This transmission may contain information that is privileged,
confidential, legally privileged, and/or exempt from disclosure
under applicable law. If you are not the intended recipient, you
are hereby notified that any disclosure, copying, distribution, or
use of the information contained herein (including any reliance
thereon) is STRICTLY PROHIBITED. Although this transmission and
any attachments are believed to be free of any virus or other
defect that might affect any computer system into which it is
received and opened, it is the responsibility of the recipient to
ensure that it is virus free and no responsibility is accepted by
JPMorgan Chase & Co., its subsidiaries and affiliates, as
applicable, for any loss or damage arising in any way from its use.
If you received this transmission in error, please immediately
contact the sender and destroy the material in its entirety,
whether in electronic or hard copy format. Thank you.

_____________________________________________________________________
* IDUG North America * Anaheim, California * May 2-6 2011 * http://IDUG.ORG/NA *
* If you are going to attend only one conference this year, this is it! *
** The best DB2 technical sessions in the world
** Independent, not-for-profit, User Run - the IDUG difference!
_____________________________________________________________________

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

Raymond Bell

Re: DB2 for z/OS - error with UNLOAD utility
(in response to Mark M2 Doyle)
Jim,

Just guessing but is the tablespace name unique for your Listdef? You're selecting objects by table name but the Template is using tablespace name - there may be TBs in TSs of the same name, but in different DBs. If that's the case, maybe add &DB to your Template def.

Cheers,


Raymond
PS. OMG, giving suggestions on how to run IBM utilities. Hope no one's watching...

From: IDUG DB2-L [mailto:[login to unmask email] On Behalf Of Jim McAlpine
Sent: 08 December 2010 16:31
To: [login to unmask email]
Subject: [DB2-L] DB2 for z/OS - error with UNLOAD utility

I'm getting the following -

DSNU000I 342 17:21:56.24 DSNUGUTC - OUTPUT START FOR UTILITY, UTILID = UNLOADU
DSNU1044I 342 17:21:56.26 DSNUGTIS - PROCESSING SYSIN AS EBCDIC
DSNU050I 342 17:21:56.27 DSNUGUTC - LISTDEF UNLDLIST INCLUDE TABLE Z30D.T*
DSNU1035I 342 17:21:56.27 DSNUILDR - LISTDEF STATEMENT PROCESSED SUCCESSFULLY
DSNU050I 342 17:21:56.27 DSNUGUTC - TEMPLATE UNLDDS DSN Z30D.UNLOAD.DATA.&TS. DISP(NEW, CATLG, CATLG) SPACE(
750, 750) TRK UNIT 3390 VOLUMES(VPWRAZ)
DSNU1035I 342 17:21:56.27 DSNUJTDR - TEMPLATE STATEMENT PROCESSED SUCCESSFULLY
DSNU050I 342 17:21:56.27 DSNUGUTC - TEMPLATE PUNCHDS DSN Z30D.UNLOAD.PARM.&TS. DISP(NEW, CATLG, CATLG) SPACE(1,
1) TRK UNIT 3390 VOLUMES(VPWRAZ)
DSNU1035I 342 17:21:56.27 DSNUJTDR - TEMPLATE STATEMENT PROCESSED SUCCESSFULLY
DSNU050I 342 17:21:56.27 DSNUGUTC - UNLOAD LIST UNLDLIST PUNCHDDN PUNCHDS UNLDDN UNLDDS
DSNU1033I 342 17:22:06.13 DSNUGULM - PROCESSING LIST ITEM: TABLESPACE Z30DDA01.SAACMPY
DSNU1221I 342 17:22:06.16 DSNUUNLD - UNLDDN IS NOT SPECIFIED OR SPECIFIED TEMPLATE UNLDDS IS INVALID FOR MULTIPLE
TABLE SPACES
DSNU012I 342 17:22:06.17 DSNUGBAC - UTILITY EXECUTION TERMINATED, HIGHEST RETURN CODE=8
and I can't see an error with the templates.

Also, if I add PREVIEW to the job it runs to completion and the dataset names are correctly expanded like so -

DSNUGULM - PROCESSING LIST ITEM: TABLESPACE Z30DDZ01.SZZAUDIT
DSNUGPVV - TEMPLATE UNLDDS DSN=Z30D.UNLOAD.DATA.SZZAUDIT
DSNUGPVV - TEMPLATE PUNCHDS DSN=Z30D.UNLOAD.PARM.SZZAUDIT
DSNUGULM - PROCESSING LIST ITEM: TABLESPACE Z30DDZ01.SZZCNTRL
DSNUGPVV - TEMPLATE UNLDDS DSN=Z30D.UNLOAD.DATA.SZZCNTRL
DSNUGPVV - TEMPLATE PUNCHDS DSN=Z30D.UNLOAD.PARM.SZZCNTRL
DSNUGULM - PROCESSING LIST ITEM: TABLESPACE Z30DDZ01.SZZPLAN
DSNUGPVV - TEMPLATE UNLDDS DSN=Z30D.UNLOAD.DATA.SZZPLAN
DSNUGPVV - TEMPLATE PUNCHDS DSN=Z30D.UNLOAD.PARM.SZZPLAN
DSNUGULM - PROCESSING LIST ITEM: TABLESPACE Z30DDZ01.SZZXRST
DSNUGPVV - TEMPLATE UNLDDS DSN=Z30D.UNLOAD.DATA.SZZXRST
DSNUGPVV - TEMPLATE PUNCHDS DSN=Z30D.UNLOAD.PARM.SZZXRST
DSNUGBAC - UTILITY EXECUTION COMPLETE, HIGHEST RETURN CODE=0
Any ideas ?

Jim McAlpine


________________________________

[ http://www.idug.org/images/banners/idug_2011.gif ] < http://www.idug.org >

The IDUG DB2-L Listserv is only part of your membership in IDUG. If you are not already an IDUG member, please register here. < http://www.idug.org/register >

_____________________________________________________________________
* IDUG North America * Anaheim, California * May 2-6 2011 * http://IDUG.ORG/NA *
* If you are going to attend only one conference this year, this is it! *
** The best DB2 technical sessions in the world
** Independent, not-for-profit, User Run - the IDUG difference!
_____________________________________________________________________

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

Dee Reins

Re: DB2 for z/OS - error with UNLOAD utility
(in response to Raymond Bell)
Could there be multiple tables in that tablespace? I was looking at this error.

DSNU1221I 342 17:22:06.16 DSNUUNLD - UNLDDN IS NOT SPECIFIED OR SPECIFIED TEMPLATE UNLDDS IS INVALID FOR MULTIPLE
TABLE SPACES


“Coming together is a beginning. Keeping together is progress. Working together is success"



----- Original Message -----
From: "Jim McAlpine" <[login to unmask email]>
To: [login to unmask email]
Sent: Wednesday, December 8, 2010 8:30:55 AM
Subject: [DB2-L] DB2 for z/OS - error with UNLOAD utility


I'm getting the following -

DSNU000I 342 17:21:56.24 DSNUGUTC - OUTPUT START FOR UTILITY, UTILID = UNLOADU
DSNU1044I 342 17:21:56.26 DSNUGTIS - PROCESSING SYSIN AS EBCDIC
DSNU050I 342 17:21:56.27 DSNUGUTC - LISTDEF UNLDLIST INCLUDE TABLE Z30D.T*
DSNU1035I 342 17:21:56.27 DSNUILDR - LISTDEF STATEMENT PROCESSED SUCCESSFULLY
DSNU050I 342 17:21:56.27 DSNUGUTC - TEMPLATE UNLDDS DSN Z30D.UNLOAD.DATA.&TS. DISP(NEW, CATLG, CATLG) SPACE(
750, 750) TRK UNIT 3390 VOLUMES(VPWRAZ)
DSNU1035I 342 17:21:56.27 DSNUJTDR - TEMPLATE STATEMENT PROCESSED SUCCESSFULLY
DSNU050I 342 17:21:56.27 DSNUGUTC - TEMPLATE PUNCHDS DSN Z30D.UNLOAD.PARM.&TS. DISP(NEW, CATLG, CATLG) SPACE(1,
1) TRK UNIT 3390 VOLUMES(VPWRAZ)
DSNU1035I 342 17:21:56.27 DSNUJTDR - TEMPLATE STATEMENT PROCESSED SUCCESSFULLY
DSNU050I 342 17:21:56.27 DSNUGUTC - UNLOAD LIST UNLDLIST PUNCHDDN PUNCHDS UNLDDN UNLDDS
DSNU1033I 342 17:22:06.13 DSNUGULM - PROCESSING LIST ITEM: TABLESPACE Z30DDA01.SAACMPY
DSNU1221I 342 17:22:06.16 DSNUUNLD - UNLDDN IS NOT SPECIFIED OR SPECIFIED TEMPLATE UNLDDS IS INVALID FOR MULTIPLE
TABLE SPACES
DSNU012I 342 17:22:06.17 DSNUGBAC - UTILITY EXECUTION TERMINATED, HIGHEST RETURN CODE=8

and I can't see an error with the templates.

Also, if I add PREVIEW to the job it runs to completion and the dataset names are correctly expanded like so -

DSNUGULM - PROCESSING LIST ITEM: TABLESPACE Z30DDZ01.SZZAUDIT
DSNUGPVV - TEMPLATE UNLDDS DSN=Z30D.UNLOAD.DATA.SZZAUDIT
DSNUGPVV - TEMPLATE PUNCHDS DSN=Z30D.UNLOAD.PARM.SZZAUDIT
DSNUGULM - PROCESSING LIST ITEM: TABLESPACE Z30DDZ01.SZZCNTRL
DSNUGPVV - TEMPLATE UNLDDS DSN=Z30D.UNLOAD.DATA.SZZCNTRL
DSNUGPVV - TEMPLATE PUNCHDS DSN=Z30D.UNLOAD.PARM.SZZCNTRL
DSNUGULM - PROCESSING LIST ITEM: TABLESPACE Z30DDZ01.SZZPLAN
DSNUGPVV - TEMPLATE UNLDDS DSN=Z30D.UNLOAD.DATA.SZZPLAN
DSNUGPVV - TEMPLATE PUNCHDS DSN=Z30D.UNLOAD.PARM.SZZPLAN
DSNUGULM - PROCESSING LIST ITEM: TABLESPACE Z30DDZ01.SZZXRST
DSNUGPVV - TEMPLATE UNLDDS DSN=Z30D.UNLOAD.DATA.SZZXRST
DSNUGPVV - TEMPLATE PUNCHDS DSN=Z30D.UNLOAD.PARM.SZZXRST
DSNUGBAC - UTILITY EXECUTION COMPLETE, HIGHEST RETURN CODE=0

Any ideas ?

Jim McAlpine




Independent, not-for-profit, User Run - the IDUG difference!

The IDUG DB2-L Listserv is only part of your membership in IDUG. If you are not already an IDUG member, please register here.

_____________________________________________________________________
* IDUG North America * Anaheim, California * May 2-6 2011 * http://IDUG.ORG/NA *
* If you are going to attend only one conference this year, this is it! *
** The best DB2 technical sessions in the world
** Independent, not-for-profit, User Run - the IDUG difference!
_____________________________________________________________________

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

Jim McAlpine

Re: DB2 for z/OS - error with UNLOAD utility
(in response to Dee Reins)
On Wed, Dec 8, 2010 at 4:41 PM, Bell, Raymond <[login to unmask email]> wrote:

> Jim,
>
>
>
> Just guessing but is the tablespace name unique for your Listdef? You’re
> selecting objects by table name but the Template is using tablespace name –
> there may be TBs in TSs of the same name, but in different DBs. If that’s
> the case, maybe add &DB to your Template def.
>
>
>
> Cheers,
>
>
>
>
>
> Raymond
>
> PS. OMG, giving suggestions on how to run IBM utilities. Hope no one’s
> watching...
>
>
>

There are a handful of tablespaces that contain 2 tables but the table names
are unique. Would that still cause a problem. All the rest of the
tablespaces contain only 1 table.

Jim McAlpine

_____________________________________________________________________
* IDUG North America * Anaheim, California * May 2-6 2011 * http://IDUG.ORG/NA *
* If you are going to attend only one conference this year, this is it! *
** The best DB2 technical sessions in the world
** Independent, not-for-profit, User Run - the IDUG difference!
_____________________________________________________________________

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

Raymond Bell

Re: DB2 for z/OS - error with UNLOAD utility
(in response to Jim McAlpine)
Sure would. Different triggering (i.e. table name) value, same triggered (i.e. tablespace name) value. If TB1 and TB2 are both in TS1 and you select by table name then you'll get TS1 selected twice, which means two identical dataset names. You'll need to add &DB to make the ds name unique. Soz.


Raymond

From: IDUG DB2-L [mailto:[login to unmask email] On Behalf Of Jim McAlpine
Sent: 08 December 2010 17:21
To: [login to unmask email]
Subject: Re: [DB2-L] DB2 for z/OS - error with UNLOAD utility

On Wed, Dec 8, 2010 at 4:41 PM, Bell, Raymond <[login to unmask email]<mailto:[login to unmask email]>> wrote:
Jim,

Just guessing but is the tablespace name unique for your Listdef? You're selecting objects by table name but the Template is using tablespace name - there may be TBs in TSs of the same name, but in different DBs. If that's the case, maybe add &DB to your Template def.

Cheers,


Raymond
PS. OMG, giving suggestions on how to run IBM utilities. Hope no one's watching...


There are a handful of tablespaces that contain 2 tables but the table names are unique. Would that still cause a problem. All the rest of the tablespaces contain only 1 table.

Jim McAlpine

________________________________

[ http://www.idug.org/images/banners/idug_2011.gif ] < http://www.idug.org >

The IDUG DB2-L Listserv is only part of your membership in IDUG. If you are not already an IDUG member, please register here. < http://www.idug.org/register >

_____________________________________________________________________
* IDUG North America * Anaheim, California * May 2-6 2011 * http://IDUG.ORG/NA *
* If you are going to attend only one conference this year, this is it! *
** The best DB2 technical sessions in the world
** Independent, not-for-profit, User Run - the IDUG difference!
_____________________________________________________________________

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

Joe Geller

Re: DB2 for z/OS - error with UNLOAD utility
(in response to Raymond Bell)
Adding &DB won't make it unique as there are 2 tables in the same tablespace
(which of course means they are in the same database). You could
use &Seq which is the sequence number of the list item in the Listdef
or &uniq which is derived from the system clock.

Joe





Sure would. Different triggering (i.e. table name) value, same triggered (i.e. tablespace name) value. If TB1 and TB2 are both in TS1 and you select by table name then you’ll get TS1 selected twice, which means two identical dataset names. You’ll need to add &DB to make the ds name unique. Soz.





Raymond

_____________________________________________________________________
* IDUG North America * Anaheim, California * May 2-6 2011 * http://IDUG.ORG/NA *
* If you are going to attend only one conference this year, this is it! *
** The best DB2 technical sessions in the world
** Independent, not-for-profit, User Run - the IDUG difference!
_____________________________________________________________________

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

James Campbell

Re: DB2 for z/OS - error with UNLOAD utility
(in response to Joe Geller)
Multiple table table spaces make no difference as the unload utility will automatically create multi-table load controls and put the data on the same output file.


Jim Campbell
Sr. Database Administrator
360-704-4015
[login to unmask email]<mailto:[login to unmask email]>



-----Original Message-----
From: IDUG DB2-L [mailto:[login to unmask email] On Behalf Of Joe Geller
Sent: Wednesday, December 08, 2010 10:17 AM
To: [login to unmask email]
Subject: Re: [DB2-L] DB2 for z/OS - error with UNLOAD utility



Adding &DB won't make it unique as there are 2 tables in the same tablespace

(which of course means they are in the same database). You could

use &Seq which is the sequence number of the list item in the Listdef

or &uniq which is derived from the system clock.



Joe











Sure would. Different triggering (i.e. table name) value, same triggered (i.e. tablespace name) value. If TB1 and TB2 are both in TS1 and you select by table name then you’ll get TS1 selected twice, which means two identical dataset names. You’ll need to add &DB to make the ds name unique. Soz.











Raymond



_____________________________________________________________________

* IDUG North America * Anaheim, California * May 2-6 2011 * http://IDUG.ORG/NA *

* If you are going to attend only one conference this year, this is it! *

** The best DB2 technical sessions in the world

** Independent, not-for-profit, User Run - the IDUG difference!

_____________________________________________________________________



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

_____________________________________________________________________
* IDUG North America * Anaheim, California * May 2-6 2011 * http://IDUG.ORG/NA *
* If you are going to attend only one conference this year, this is it! *
** The best DB2 technical sessions in the world
** Independent, not-for-profit, User Run - the IDUG difference!
_____________________________________________________________________

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

James Campbell

Re: DB2 for z/OS - error with UNLOAD utility
(in response to James Campbell)
Forgot to add – I think you need the &DB variable in you template.

Jim Campbell
Sr. Database Administrator
360-704-4015
[login to unmask email]<mailto:[login to unmask email]>

From: IDUG DB2-L [mailto:[login to unmask email] On Behalf Of Campbell, Jim
Sent: Wednesday, December 08, 2010 11:02 AM
To: [login to unmask email]
Subject: Re: [DB2-L] DB2 for z/OS - error with UNLOAD utility


Multiple table table spaces make no difference as the unload utility will automatically create multi-table load controls and put the data on the same output file.


Jim Campbell
Sr. Database Administrator
360-704-4015
[login to unmask email]<mailto:[login to unmask email]>



-----Original Message-----
From: IDUG DB2-L [mailto:[login to unmask email] On Behalf Of Joe Geller
Sent: Wednesday, December 08, 2010 10:17 AM
To: [login to unmask email]
Subject: Re: [DB2-L] DB2 for z/OS - error with UNLOAD utility



Adding &DB won't make it unique as there are 2 tables in the same tablespace

(which of course means they are in the same database). You could

use &Seq which is the sequence number of the list item in the Listdef

or &uniq which is derived from the system clock.



Joe











Sure would. Different triggering (i.e. table name) value, same triggered (i.e. tablespace name) value. If TB1 and TB2 are both in TS1 and you select by table name then you’ll get TS1 selected twice, which means two identical dataset names. You’ll need to add &DB to make the ds name unique. Soz.











Raymond



_____________________________________________________________________

* IDUG North America * Anaheim, California * May 2-6 2011 * http://IDUG.ORG/NA *

* If you are going to attend only one conference this year, this is it! *

** The best DB2 technical sessions in the world

** Independent, not-for-profit, User Run - the IDUG difference!

_____________________________________________________________________



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

________________________________

[ http://www.idug.org/images/banners/idug_2011.gif ] < http://www.idug.org >

The IDUG DB2-L Listserv is only part of your membership in IDUG. If you are not already an IDUG member, please register here. < http://www.idug.org/register >

_____________________________________________________________________
* IDUG North America * Anaheim, California * May 2-6 2011 * http://IDUG.ORG/NA *
* If you are going to attend only one conference this year, this is it! *
** The best DB2 technical sessions in the world
** Independent, not-for-profit, User Run - the IDUG difference!
_____________________________________________________________________

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

Raymond Bell

Re: DB2 for z/OS - error with UNLOAD utility
(in response to James Campbell)
Oops. Yeah, I think Joe's right; two TBs in the same DB.TS combo will still come up with the same (duplicated) dataset name. You need to add something else - Joe has two suggestions.

Maybe I should stick to advice on some other vendor's utilities...

Cheers,


Raymond

________________________________
From: IDUG DB2-L [[login to unmask email] On Behalf Of Campbell, Jim [[login to unmask email]
Sent: 08 December 2010 19:03
To: [login to unmask email]
Subject: Re: [DB2-L] DB2 for z/OS - error with UNLOAD utility

Forgot to add – I think you need the &DB variable in you template.

Jim Campbell
Sr. Database Administrator
360-704-4015
[login to unmask email]<mailto:[login to unmask email]>

From: IDUG DB2-L [mailto:[login to unmask email] On Behalf Of Campbell, Jim
Sent: Wednesday, December 08, 2010 11:02 AM
To: [login to unmask email]
Subject: Re: [DB2-L] DB2 for z/OS - error with UNLOAD utility


Multiple table table spaces make no difference as the unload utility will automatically create multi-table load controls and put the data on the same output file.


Jim Campbell
Sr. Database Administrator
360-704-4015
[login to unmask email]<mailto:[login to unmask email]>



-----Original Message-----
From: IDUG DB2-L [mailto:[login to unmask email] On Behalf Of Joe Geller
Sent: Wednesday, December 08, 2010 10:17 AM
To: [login to unmask email]
Subject: Re: [DB2-L] DB2 for z/OS - error with UNLOAD utility



Adding &DB won't make it unique as there are 2 tables in the same tablespace

(which of course means they are in the same database). You could

use &Seq which is the sequence number of the list item in the Listdef

or &uniq which is derived from the system clock.



Joe











Sure would. Different triggering (i.e. table name) value, same triggered (i.e. tablespace name) value. If TB1 and TB2 are both in TS1 and you select by table name then you’ll get TS1 selected twice, which means two identical dataset names. You’ll need to add &DB to make the ds name unique. Soz.











Raymond



_____________________________________________________________________

* IDUG North America * Anaheim, California * May 2-6 2011 * http://IDUG.ORG/NA *

* If you are going to attend only one conference this year, this is it! *

** The best DB2 technical sessions in the world

** Independent, not-for-profit, User Run - the IDUG difference!

_____________________________________________________________________



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

________________________________

[ http://www.idug.org/images/banners/idug_2011.gif ] < http://www.idug.org >

The IDUG DB2-L Listserv is only part of your membership in IDUG. If you are not already an IDUG member, please register here. < http://www.idug.org/register >

________________________________

[ http://www.idug.org/images/banners/idug_2011.gif ] < http://www.idug.org >

The IDUG DB2-L Listserv is only part of your membership in IDUG. If you are not already an IDUG member, please register here. < http://www.idug.org/register >

_____________________________________________________________________
* IDUG North America * Anaheim, California * May 2-6 2011 * http://IDUG.ORG/NA *
* If you are going to attend only one conference this year, this is it! *
** The best DB2 technical sessions in the world
** Independent, not-for-profit, User Run - the IDUG difference!
_____________________________________________________________________

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

Jim McAlpine

Re: DB2 for z/OS - error with UNLOAD utility
(in response to Raymond Bell)
On Wed, Dec 8, 2010 at 8:59 PM, Bell, Raymond <[login to unmask email]> wrote:

> Oops. Yeah, I think Joe's right; two TBs in the same DB.TS combo will
> still come up with the same (duplicated) dataset name. You need to add
> something else - Joe has two suggestions.
>
> Maybe I should stick to advice on some other vendor's utilities...
>
> Cheers,
>
>
> Raymond
>
> I'm still puzzled as to why this is not working. I've changed the LISTDEF
to select tablespaces instead of tables and I still get the error as
fiollows -

DSNU000I 343 15:30:28.63 DSNUGUTC - OUTPUT START FOR UTILITY, UTILID =
UNLOADU
DSNU1044I 343 15:30:28.66 DSNUGTIS - PROCESSING SYSIN AS EBCDIC
DSNU050I 343 15:30:28.66 DSNUGUTC - LISTDEF UNLDLIST INCLUDE TABLESPACE
Z30D*.S*
DSNU1035I 343 15:30:28.66 DSNUILDR - LISTDEF STATEMENT PROCESSED
SUCCESSFULLY
DSNU050I 343 15:30:28.66 DSNUGUTC - TEMPLATE UNLDDS DSN
Z30D.UNLOAD.DATA.&TS. DISP(NEW, CATLG, CATLG) SPACE(
750, 750) TRK UNIT 3390 VOLUMES(VPWRAZ)
DSNU1035I 343 15:30:28.66 DSNUJTDR - TEMPLATE STATEMENT PROCESSED
SUCCESSFULLY
DSNU050I 343 15:30:28.66 DSNUGUTC - TEMPLATE PUNCHDS DSN
Z30D.UNLOAD.PARM.&TS. DISP(NEW, CATLG, CATLG) SPACE(1,
1) TRK UNIT 3390 VOLUMES(VPWRAZ)
DSNU1035I 343 15:30:28.66 DSNUJTDR - TEMPLATE STATEMENT PROCESSED
SUCCESSFULLY
DSNU050I 343 15:30:28.67 DSNUGUTC - UNLOAD LIST UNLDLIST PUNCHDDN
PUNCHDS UNLDDN UNLDDS
DSNU1033I 343 15:30:28.98 DSNUGULM - PROCESSING LIST ITEM: TABLESPACE
Z30DDA01.SAACMPY
DSNU1221I 343 15:30:29.02 DSNUUNLD - UNLDDN IS NOT SPECIFIED OR SPECIFIED
TEMPLATE UNLDDS IS INVALID FOR MULTIPLE
TABLE SPACES
DSNU012I 343 15:30:29.03 DSNUGBAC - UTILITY EXECUTION TERMINATED, HIGHEST
RETURN CODE=8

But if I run it and specify a single tablespace which does contain 2 tables
it works like this -

DSNU000I 343 15:29:29.37 DSNUGUTC - OUTPUT START FOR UTILITY, UTILID =
UNLOADU
DSNU1044I 343 15:29:29.40 DSNUGTIS - PROCESSING SYSIN AS EBCDIC
DSNU050I 343 15:29:29.40 DSNUGUTC - LISTDEF UNLDLIST INCLUDE TABLESPACE
Z30D*.SZYABEND
DSNU1035I 343 15:29:29.40 DSNUILDR - LISTDEF STATEMENT PROCESSED
SUCCESSFULLY
DSNU050I 343 15:29:29.40 DSNUGUTC - TEMPLATE UNLDDS DSN
Z30D.UNLOAD.DATA.&TS. DISP(NEW, CATLG, CATLG) SPACE(
750, 750) TRK UNIT 3390 VOLUMES(VPWRAZ)
DSNU1035I 343 15:29:29.40 DSNUJTDR - TEMPLATE STATEMENT PROCESSED
SUCCESSFULLY
DSNU050I 343 15:29:29.41 DSNUGUTC - TEMPLATE PUNCHDS DSN
Z30D.UNLOAD.PARM.&TS. DISP(NEW, CATLG, CATLG) SPACE(1,
1) TRK UNIT 3390 VOLUMES(VPWRAZ)
DSNU1035I 343 15:29:29.41 DSNUJTDR - TEMPLATE STATEMENT PROCESSED
SUCCESSFULLY
DSNU050I 343 15:29:29.41 DSNUGUTC - UNLOAD LIST UNLDLIST PUNCHDDN
PUNCHDS UNLDDN UNLDDS
DSNU1033I 343 15:29:29.42 DSNUGULM - PROCESSING LIST ITEM: TABLESPACE
Z30DDZ01.SZYABEND
DSNU1038I 343 15:29:29.69 DSNUGDYN - DATASET ALLOCATED. TEMPLATE=UNLDDS
DDNAME=SYS00001
DSN=Z30D.UNLOAD.DATA.SZYABEND
DSNU1038I 343 15:29:29.99 DSNUGDYN - DATASET ALLOCATED. TEMPLATE=PUNCHDS
DDNAME=SYS00002
DSN=Z30D.UNLOAD.PARM.SZYABEND
DSNU253I 343 15:29:30.54 DSNUUNLD - UNLOAD PHASE STATISTICS - NUMBER OF
RECORDS UNLOADED=39 FOR TABLE Z30D.TZYABEND
DSNU253I 343 15:29:30.54 DSNUUNLD - UNLOAD PHASE STATISTICS - NUMBER OF
RECORDS UNLOADED=0 FOR TABLE Z30D.TZYTEMP
DSNU252I 343 15:29:30.54 DSNUUNLD - UNLOAD PHASE STATISTICS - NUMBER OF
RECORDS UNLOADED=39 FOR TABLESPACE
Z30DDZ01.SZYABEND
DSNU250I 343 15:29:30.55 DSNUUNLD - UNLOAD PHASE COMPLETE, ELAPSED
TIME=00:00:01
DSNU010I 343 15:29:30.55 DSNUGBAC - UTILITY EXECUTION COMPLETE, HIGHEST
RETURN CODE=0
Any further ideas ?

Jim McAlpine

_____________________________________________________________________
* IDUG North America * Anaheim, California * May 2-6 2011 * http://IDUG.ORG/NA *
* Your only source for independent, unbiased, and trusted DB2 information. *
** DB2 certification -> no additional charge
** Meet fellow DB2 users and leading DB2 consultants
_____________________________________________________________________

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

Raymond Bell

Re: DB2 for z/OS - error with UNLOAD utility
(in response to Jim McAlpine)
No further ideas; it's just the same one I think.

It comes down to how many distinct tablespace names are being returned 'cause, with the template you're using, if TS occurs more than once you'll get a duplicate dataset name and DB2 barfs. Try running a Select against Systablespace where dbname like 'Z30D%' and name like 'S%' group by name having count(*) > 1 and see which offending tosser pops up. One S* tablespace name will be in more than one Z30D* database.

I think a basic good idea is that, if you're selecting objects using certain variables (DB and TS in your Listdef statement) then you should look at doing something similar (i.e. using the same variables) for your Template ones, for this reason.

It's not the fact the TS has 2 tables per se, rather that the TS value is being selected twice for two different output dataset names, which is a no-no.

Good luck.


Raymond


From: IDUG DB2-L [mailto:[login to unmask email] On Behalf Of Jim McAlpine
Sent: 09 December 2010 14:37
To: [login to unmask email]
Subject: Re: [DB2-L] DB2 for z/OS - error with UNLOAD utility

On Wed, Dec 8, 2010 at 8:59 PM, Bell, Raymond <[login to unmask email]<mailto:[login to unmask email]>> wrote:
Oops. Yeah, I think Joe's right; two TBs in the same DB.TS combo will still come up with the same (duplicated) dataset name. You need to add something else - Joe has two suggestions.

Maybe I should stick to advice on some other vendor's utilities...

Cheers,


Raymond
I'm still puzzled as to why this is not working. I've changed the LISTDEF to select tablespaces instead of tables and I still get the error as fiollows -

DSNU000I 343 15:30:28.63 DSNUGUTC - OUTPUT START FOR UTILITY, UTILID = UNLOADU
DSNU1044I 343 15:30:28.66 DSNUGTIS - PROCESSING SYSIN AS EBCDIC
DSNU050I 343 15:30:28.66 DSNUGUTC - LISTDEF UNLDLIST INCLUDE TABLESPACE Z30D*.S*
DSNU1035I 343 15:30:28.66 DSNUILDR - LISTDEF STATEMENT PROCESSED SUCCESSFULLY
DSNU050I 343 15:30:28.66 DSNUGUTC - TEMPLATE UNLDDS DSN Z30D.UNLOAD.DATA.&TS. DISP(NEW, CATLG, CATLG) SPACE(
750, 750) TRK UNIT 3390 VOLUMES(VPWRAZ)
DSNU1035I 343 15:30:28.66 DSNUJTDR - TEMPLATE STATEMENT PROCESSED SUCCESSFULLY
DSNU050I 343 15:30:28.66 DSNUGUTC - TEMPLATE PUNCHDS DSN Z30D.UNLOAD.PARM.&TS. DISP(NEW, CATLG, CATLG) SPACE(1,
1) TRK UNIT 3390 VOLUMES(VPWRAZ)
DSNU1035I 343 15:30:28.66 DSNUJTDR - TEMPLATE STATEMENT PROCESSED SUCCESSFULLY
DSNU050I 343 15:30:28.67 DSNUGUTC - UNLOAD LIST UNLDLIST PUNCHDDN PUNCHDS UNLDDN UNLDDS
DSNU1033I 343 15:30:28.98 DSNUGULM - PROCESSING LIST ITEM: TABLESPACE Z30DDA01.SAACMPY
DSNU1221I 343 15:30:29.02 DSNUUNLD - UNLDDN IS NOT SPECIFIED OR SPECIFIED TEMPLATE UNLDDS IS INVALID FOR MULTIPLE
TABLE SPACES
DSNU012I 343 15:30:29.03 DSNUGBAC - UTILITY EXECUTION TERMINATED, HIGHEST RETURN CODE=8

But if I run it and specify a single tablespace which does contain 2 tables it works like this -

DSNU000I 343 15:29:29.37 DSNUGUTC - OUTPUT START FOR UTILITY, UTILID = UNLOADU
DSNU1044I 343 15:29:29.40 DSNUGTIS - PROCESSING SYSIN AS EBCDIC
DSNU050I 343 15:29:29.40 DSNUGUTC - LISTDEF UNLDLIST INCLUDE TABLESPACE Z30D*.SZYABEND
DSNU1035I 343 15:29:29.40 DSNUILDR - LISTDEF STATEMENT PROCESSED SUCCESSFULLY
DSNU050I 343 15:29:29.40 DSNUGUTC - TEMPLATE UNLDDS DSN Z30D.UNLOAD.DATA.&TS. DISP(NEW, CATLG, CATLG) SPACE(
750, 750) TRK UNIT 3390 VOLUMES(VPWRAZ)
DSNU1035I 343 15:29:29.40 DSNUJTDR - TEMPLATE STATEMENT PROCESSED SUCCESSFULLY
DSNU050I 343 15:29:29.41 DSNUGUTC - TEMPLATE PUNCHDS DSN Z30D.UNLOAD.PARM.&TS. DISP(NEW, CATLG, CATLG) SPACE(1,
1) TRK UNIT 3390 VOLUMES(VPWRAZ)
DSNU1035I 343 15:29:29.41 DSNUJTDR - TEMPLATE STATEMENT PROCESSED SUCCESSFULLY
DSNU050I 343 15:29:29.41 DSNUGUTC - UNLOAD LIST UNLDLIST PUNCHDDN PUNCHDS UNLDDN UNLDDS
DSNU1033I 343 15:29:29.42 DSNUGULM - PROCESSING LIST ITEM: TABLESPACE Z30DDZ01.SZYABEND
DSNU1038I 343 15:29:29.69 DSNUGDYN - DATASET ALLOCATED. TEMPLATE=UNLDDS
DDNAME=SYS00001
DSN=Z30D.UNLOAD.DATA.SZYABEND
DSNU1038I 343 15:29:29.99 DSNUGDYN - DATASET ALLOCATED. TEMPLATE=PUNCHDS
DDNAME=SYS00002
DSN=Z30D.UNLOAD.PARM.SZYABEND
DSNU253I 343 15:29:30.54 DSNUUNLD - UNLOAD PHASE STATISTICS - NUMBER OF RECORDS UNLOADED=39 FOR TABLE Z30D.TZYABEND
DSNU253I 343 15:29:30.54 DSNUUNLD - UNLOAD PHASE STATISTICS - NUMBER OF RECORDS UNLOADED=0 FOR TABLE Z30D.TZYTEMP
DSNU252I 343 15:29:30.54 DSNUUNLD - UNLOAD PHASE STATISTICS - NUMBER OF RECORDS UNLOADED=39 FOR TABLESPACE
Z30DDZ01.SZYABEND
DSNU250I 343 15:29:30.55 DSNUUNLD - UNLOAD PHASE COMPLETE, ELAPSED TIME=00:00:01
DSNU010I 343 15:29:30.55 DSNUGBAC - UTILITY EXECUTION COMPLETE, HIGHEST RETURN CODE=0
Any further ideas ?

Jim McAlpine

________________________________

[ http://www.idug.org/images/banners/idug_2011.gif ] < http://www.idug.org >

The IDUG DB2-L Listserv is only part of your membership in IDUG. If you are not already an IDUG member, please register here. < http://www.idug.org/register >

_____________________________________________________________________
* IDUG North America * Anaheim, California * May 2-6 2011 * http://IDUG.ORG/NA *
* Your only source for independent, unbiased, and trusted DB2 information. *
** DB2 certification -> no additional charge
** Meet fellow DB2 users and leading DB2 consultants
_____________________________________________________________________

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

Sam Baugh

Re: DB2 for z/OS - error with UNLOAD utility
(in response to Raymond Bell)
I believe that if there are multiple databases involved with the "Z30D*", you must still use &DB, regardless of whether the tablespace names are duplicated or not.

From: IDUG DB2-L [mailto:[login to unmask email] On Behalf Of Jim McAlpine
Sent: Thursday, December 09, 2010 8:37 AM
To: [login to unmask email]
Subject: Re: [DB2-L] DB2 for z/OS - error with UNLOAD utility

On Wed, Dec 8, 2010 at 8:59 PM, Bell, Raymond <[login to unmask email]<mailto:[login to unmask email]>> wrote:
Oops. Yeah, I think Joe's right; two TBs in the same DB.TS combo will still come up with the same (duplicated) dataset name. You need to add something else - Joe has two suggestions.

Maybe I should stick to advice on some other vendor's utilities...

Cheers,


Raymond
I'm still puzzled as to why this is not working. I've changed the LISTDEF to select tablespaces instead of tables and I still get the error as fiollows -

DSNU000I 343 15:30:28.63 DSNUGUTC - OUTPUT START FOR UTILITY, UTILID = UNLOADU
DSNU1044I 343 15:30:28.66 DSNUGTIS - PROCESSING SYSIN AS EBCDIC
DSNU050I 343 15:30:28.66 DSNUGUTC - LISTDEF UNLDLIST INCLUDE TABLESPACE Z30D*.S*
DSNU1035I 343 15:30:28.66 DSNUILDR - LISTDEF STATEMENT PROCESSED SUCCESSFULLY
DSNU050I 343 15:30:28.66 DSNUGUTC - TEMPLATE UNLDDS DSN Z30D.UNLOAD.DATA.&TS. DISP(NEW, CATLG, CATLG) SPACE(
750, 750) TRK UNIT 3390 VOLUMES(VPWRAZ)
DSNU1035I 343 15:30:28.66 DSNUJTDR - TEMPLATE STATEMENT PROCESSED SUCCESSFULLY
DSNU050I 343 15:30:28.66 DSNUGUTC - TEMPLATE PUNCHDS DSN Z30D.UNLOAD.PARM.&TS. DISP(NEW, CATLG, CATLG) SPACE(1,
1) TRK UNIT 3390 VOLUMES(VPWRAZ)
DSNU1035I 343 15:30:28.66 DSNUJTDR - TEMPLATE STATEMENT PROCESSED SUCCESSFULLY
DSNU050I 343 15:30:28.67 DSNUGUTC - UNLOAD LIST UNLDLIST PUNCHDDN PUNCHDS UNLDDN UNLDDS
DSNU1033I 343 15:30:28.98 DSNUGULM - PROCESSING LIST ITEM: TABLESPACE Z30DDA01.SAACMPY
DSNU1221I 343 15:30:29.02 DSNUUNLD - UNLDDN IS NOT SPECIFIED OR SPECIFIED TEMPLATE UNLDDS IS INVALID FOR MULTIPLE
TABLE SPACES
DSNU012I 343 15:30:29.03 DSNUGBAC - UTILITY EXECUTION TERMINATED, HIGHEST RETURN CODE=8

But if I run it and specify a single tablespace which does contain 2 tables it works like this -

DSNU000I 343 15:29:29.37 DSNUGUTC - OUTPUT START FOR UTILITY, UTILID = UNLOADU
DSNU1044I 343 15:29:29.40 DSNUGTIS - PROCESSING SYSIN AS EBCDIC
DSNU050I 343 15:29:29.40 DSNUGUTC - LISTDEF UNLDLIST INCLUDE TABLESPACE Z30D*.SZYABEND
DSNU1035I 343 15:29:29.40 DSNUILDR - LISTDEF STATEMENT PROCESSED SUCCESSFULLY
DSNU050I 343 15:29:29.40 DSNUGUTC - TEMPLATE UNLDDS DSN Z30D.UNLOAD.DATA.&TS. DISP(NEW, CATLG, CATLG) SPACE(
750, 750) TRK UNIT 3390 VOLUMES(VPWRAZ)
DSNU1035I 343 15:29:29.40 DSNUJTDR - TEMPLATE STATEMENT PROCESSED SUCCESSFULLY
DSNU050I 343 15:29:29.41 DSNUGUTC - TEMPLATE PUNCHDS DSN Z30D.UNLOAD.PARM.&TS. DISP(NEW, CATLG, CATLG) SPACE(1,
1) TRK UNIT 3390 VOLUMES(VPWRAZ)
DSNU1035I 343 15:29:29.41 DSNUJTDR - TEMPLATE STATEMENT PROCESSED SUCCESSFULLY
DSNU050I 343 15:29:29.41 DSNUGUTC - UNLOAD LIST UNLDLIST PUNCHDDN PUNCHDS UNLDDN UNLDDS
DSNU1033I 343 15:29:29.42 DSNUGULM - PROCESSING LIST ITEM: TABLESPACE Z30DDZ01.SZYABEND
DSNU1038I 343 15:29:29.69 DSNUGDYN - DATASET ALLOCATED. TEMPLATE=UNLDDS
DDNAME=SYS00001
DSN=Z30D.UNLOAD.DATA.SZYABEND
DSNU1038I 343 15:29:29.99 DSNUGDYN - DATASET ALLOCATED. TEMPLATE=PUNCHDS
DDNAME=SYS00002
DSN=Z30D.UNLOAD.PARM.SZYABEND
DSNU253I 343 15:29:30.54 DSNUUNLD - UNLOAD PHASE STATISTICS - NUMBER OF RECORDS UNLOADED=39 FOR TABLE Z30D.TZYABEND
DSNU253I 343 15:29:30.54 DSNUUNLD - UNLOAD PHASE STATISTICS - NUMBER OF RECORDS UNLOADED=0 FOR TABLE Z30D.TZYTEMP
DSNU252I 343 15:29:30.54 DSNUUNLD - UNLOAD PHASE STATISTICS - NUMBER OF RECORDS UNLOADED=39 FOR TABLESPACE
Z30DDZ01.SZYABEND
DSNU250I 343 15:29:30.55 DSNUUNLD - UNLOAD PHASE COMPLETE, ELAPSED TIME=00:00:01
DSNU010I 343 15:29:30.55 DSNUGBAC - UTILITY EXECUTION COMPLETE, HIGHEST RETURN CODE=0
Any further ideas ?

Jim McAlpine

________________________________

[ http://www.idug.org/images/banners/idug_2011.gif ] < http://www.idug.org >

The IDUG DB2-L Listserv is only part of your membership in IDUG. If you are not already an IDUG member, please register here. < http://www.idug.org/register >

_____________________________________________________________________
* IDUG North America * Anaheim, California * May 2-6 2011 * http://IDUG.ORG/NA *
* Your only source for independent, unbiased, and trusted DB2 information. *
** DB2 certification -> no additional charge
** Meet fellow DB2 users and leading DB2 consultants
_____________________________________________________________________

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

Jim McAlpine

Re: DB2 for z/OS - error with UNLOAD utility
(in response to Sam Baugh)
On Thu, Dec 9, 2010 at 3:34 PM, Sam Baugh <[login to unmask email]> wrote:

> I believe that if there are multiple databases involved with the “Z30D*”,
> you must still use &DB, regardless of whether the tablespace names are
> duplicated or not.
>
>
>
>

Yes, thanks, I had just come to that conclusion earlier.

Jim McAlpine

_____________________________________________________________________
* IDUG North America * Anaheim, California * May 2-6 2011 * http://IDUG.ORG/NA *
* Your only source for independent, unbiased, and trusted DB2 information. *
** DB2 certification -> no additional charge
** Meet fellow DB2 users and leading DB2 consultants
_____________________________________________________________________

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

Jim McAlpine

Re: DB2 for z/OS - error with UNLOAD utility
(in response to Jim McAlpine)
On Thu, Dec 9, 2010 at 3:27 PM, Bell, Raymond <[login to unmask email]> wrote:

> No further ideas; it’s just the same one I think.
>
>
>
> It comes down to how many distinct tablespace names are being returned
> ‘cause, with the template you’re using, if TS occurs more than once you’ll
> get a duplicate dataset name and DB2 barfs. Try running a Select against
> Systablespace where dbname like ‘Z30D%’ and name like ‘S%’ group by name
> having count(*) > 1 and see which offending tosser pops up. One S*
> tablespace name will be in more than one Z30D* database.
>
>
>
> I think a basic good idea is that, if you’re selecting objects using
> certain variables (DB and TS in your Listdef statement) then you should look
> at doing something similar (i.e. using the same variables) for your Template
> ones, for this reason.
>
>
>
> It’s not the fact the TS has 2 tables per se, rather that the TS value is
> being selected twice for two different output dataset names, which is a
> no-no.
>
>
>
> Good luck.
>
>
>
>
>
> Raymond
>
>
>

Raymond, I ran that query but it returned zero rows which is what I expected
but not in line with the error message I am seeing. However I did add &DB
to the template dsname and that got round the problem.
Very strange why the unload didn't like the generated list when there should
be no dsname conflict.

Anyway, onwards and upwards and thanks to all who contributed and got me a
resolution.

Jim McAlpine

_____________________________________________________________________
* IDUG EMEA * Prague, Czech Republic * 14-18 November 2011 * http://IDUG.ORG/EMEA *
* If you are going to attend only one conference this year, this is it! *
_____________________________________________________________________
http://www.IDUG.org/mentor
How can you expand your staff or do succession planning in this economy?
Mentoring is a proven, economical, way to 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 Listserv

Jim McAlpine

Re: DB2 for z/OS - error with UNLOAD utility
(in response to Jim McAlpine)
On Fri, Dec 10, 2010 at 11:48 AM, Jim McAlpine <[login to unmask email]>wrote:

>
> Raymond, I ran that query but it returned zero rows which is what I
> expected but not in line with the error message I am seeing. However I did
> add &DB to the template dsname and that got round the problem.
> Very strange why the unload didn't like the generated list when there
> should be no dsname conflict.
>
> Anyway, onwards and upwards and thanks to all who contributed and got me a
> resolution.
>
> Jim McAlpine
>


One further question. I need to exclude any lob tablespaces. How do I find
out which of my tablesspaces are lobs.

Thanks again.

Jim McAlpine

_____________________________________________________________________
* IDUG EMEA * Prague, Czech Republic * 14-18 November 2011 * http://IDUG.ORG/EMEA *
* If you are going to attend only one conference this year, this is it! *
_____________________________________________________________________
http://www.IDUG.org/mentor
How can you expand your staff or do succession planning in this economy?
Mentoring is a proven, economical, way to 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 Listserv