Template magic ??

Alex Pauliah

Template magic ??
Hi,

Wish you all a Happy New Year.

I have a questions about templates.

is this construct possible ???
DSN(DB2DTG2.FULLCOPY.&DB..P&TS(7,2)..P&PART(3).(+1))

Where '&TS(7,2)' expands to the last two characters of the tablespace name
and '&PART(3)' cuts the 5 digit partition number to 3 digits.

I know that the manual does not mention anything about this, but, I read
this on some site a couple of weeks ago (don't remember the site id!) and
tried it this evening and it promptly failed with the following error.

DSNU000I DSNUGUTC - OUTPUT START FOR UTILITY, UTILID =
GP66CP
DSNU1000I DSNUGUTC - PROCESSING CONTROL STATEMENTS IN PREVIEW
MODE
DSNU005I DSNUGPRS - TEMPLATE
PTDSN

DSNU005I DSNUGPRS - DSN(DB2DTG2.FULLCOPY.&DB..P&TS
(7,2)..P&PART(3).(+1))
DSNU049I DSNUGPRS - INVALID OPERAND '7' FOR
KEYWORD 'TEMPLATE'

DSNU005I DSNUGPRS - UNIT SYSDA DISP (NEW,CATLG,CATLG)
DATACLAS ASMFB04K
DSNU005I DSNUGPRS - LISTDEF
PTLIST

DSNU005I DSNUGPRS - INCLUDE TABLESPACE CBLDJP06.CBLTJPC0
PARTLEVEL
DSNU005I DSNUGPRS - INCLUDE TABLESPACE CBLDJP06.CBLTJPC1
PARTLEVEL
DSNU005I DSNUGPRS -


DSNU005I DSNUGPRS - COPY LIST PTLIST FULL YES PARALLEL
(4)
DSNU005I DSNUGPRS - COPYDDN
(PTDSN)

DSNU005I DSNUGPRS - SHRLEVEL
REFERENCE

DSNU005I DSNUGPRS -


DSNU012I DSNUGBAC - UTILITY EXECUTION TERMINATED, HIGHEST RETURN
CODE=8

Any help would be greatly appreciated.

Thanks

Alex J.P.

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

Kornelis Abe

Re: Template magic ??
(in response to Alex Pauliah)
Hello Alex,

> is this construct possible ???
> DSN(DB2DTG2.FULLCOPY.&DB..P&TS(7,2)..P&PART(3).(+1))
> Where '&TS(7,2)' expands to the last two characters of the tablespace name
> and '&PART(3)' cuts the 5 digit partition number to 3 digits.

I'm not sure - we don't use GDG's here. I use a template, however,
that contains the following: D&JU(3,5)..G&TI..&IC.&PA(3,3).
and that works just fine, apart from date and time being GMT
rather than local time :-(

IIRC you need an option on the template statement to allow
DB2 to create the base GDG if it does not yet exist.
Could it be that that option is missing and the base GDG is missing too?

Cheers,
Abe F. Kornelis

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

Mike Turner

Re: Template magic ??
(in response to Kornelis Abe)
Hi Alex

I found the following note in the latest V7 Utility Guide and Reference:

"If you use substring notation, the entire DSN operand must be enclosed in
single quotes."

The manual also has an example.

Try changing
DSN(DB2DTG2.FULLCOPY.&DB..P&TS(7,2)..P&PART(3).(+1))
to
DSN 'DB2DTG2.FULLCOPY.&DB..P&TS(7,2)..P&PART(3).(+1)'

Regards
Mike Turner
Email: [login to unmask email]
Tel: +44 (0)1565-873702
Web: www.michael-turner.ltd.uk

-----Original Message-----
From: [login to unmask email]
[mailto:[login to unmask email]On Behalf Of Alex
Sent: Tuesday, 04 January 2005 02:56
To: [login to unmask email]
Subject: [DB2-L] Template magic ??


Hi,

Wish you all a Happy New Year.

I have a questions about templates.

is this construct possible ???
DSN(DB2DTG2.FULLCOPY.&DB..P&TS(7,2)..P&PART(3).(+1))

Where '&TS(7,2)' expands to the last two characters of the tablespace name
and '&PART(3)' cuts the 5 digit partition number to 3 digits.

I know that the manual does not mention anything about this, but, I read
this on some site a couple of weeks ago (don't remember the site id!) and
tried it this evening and it promptly failed with the following error.

DSNU000I DSNUGUTC - OUTPUT START FOR UTILITY, UTILID =
GP66CP
DSNU1000I DSNUGUTC - PROCESSING CONTROL STATEMENTS IN PREVIEW
MODE
DSNU005I DSNUGPRS - TEMPLATE
PTDSN

DSNU005I DSNUGPRS - DSN(DB2DTG2.FULLCOPY.&DB..P&TS
(7,2)..P&PART(3).(+1))
DSNU049I DSNUGPRS - INVALID OPERAND '7' FOR
KEYWORD 'TEMPLATE'

DSNU005I DSNUGPRS - UNIT SYSDA DISP (NEW,CATLG,CATLG)
DATACLAS ASMFB04K
DSNU005I DSNUGPRS - LISTDEF
PTLIST

DSNU005I DSNUGPRS - INCLUDE TABLESPACE CBLDJP06.CBLTJPC0
PARTLEVEL
DSNU005I DSNUGPRS - INCLUDE TABLESPACE CBLDJP06.CBLTJPC1
PARTLEVEL
DSNU005I DSNUGPRS -


DSNU005I DSNUGPRS - COPY LIST PTLIST FULL YES PARALLEL
(4)
DSNU005I DSNUGPRS - COPYDDN
(PTDSN)

DSNU005I DSNUGPRS - SHRLEVEL
REFERENCE

DSNU005I DSNUGPRS -


DSNU012I DSNUGBAC - UTILITY EXECUTION TERMINATED, HIGHEST RETURN
CODE=8

Any help would be greatly appreciated.

Thanks

Alex J.P.

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

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

Jeffrey Schade

Re: Template magic ??
(in response to Mike Turner)
Alex

We are using the following template in production on DB2 V7 and it works
perfectly. As Mike Turner has said in his E-Mail you need the quotes.

TEMPLATE COPY1
UNIT CART90 STACK YES
DSN 'PRODDB2.&DB..&TS..P&PA(3,3)..WKY(+1)'
MODELDCB GDG BUFNO=90
GDGLIMIT(6)
EXPDL '1999000'
VOLCNT (255)

Jeff
_________________________________________
Jeffrey Schade
Systems Consultant, Technology Engineering

Insurance Services Office, Inc.
545 Washington Boulevard
Jersey City, NJ 07310
Voice: (201) 469-3738
FAX: (201) 748-1500
[login to unmask email]

-----Original Message-----
From: DB2 Data Base Discussion List [mailto:[login to unmask email] On
Behalf Of Alex
Sent: Monday, January 03, 2005 9:56 PM
To: [login to unmask email]
Subject: [DB2-L] Template magic ??

Hi,

Wish you all a Happy New Year.

I have a questions about templates.

is this construct possible ???
DSN(DB2DTG2.FULLCOPY.&DB..P&TS(7,2)..P&PART(3).(+1))

Where '&TS(7,2)' expands to the last two characters of the tablespace
name
and '&PART(3)' cuts the 5 digit partition number to 3 digits.

I know that the manual does not mention anything about this, but, I read
this on some site a couple of weeks ago (don't remember the site id!)
and
tried it this evening and it promptly failed with the following error.

DSNU000I DSNUGUTC - OUTPUT START FOR UTILITY, UTILID =
GP66CP
DSNU1000I DSNUGUTC - PROCESSING CONTROL STATEMENTS IN PREVIEW
MODE
DSNU005I DSNUGPRS - TEMPLATE
PTDSN

DSNU005I DSNUGPRS - DSN(DB2DTG2.FULLCOPY.&DB..P&TS
(7,2)..P&PART(3).(+1))
DSNU049I DSNUGPRS - INVALID OPERAND '7' FOR
KEYWORD 'TEMPLATE'

DSNU005I DSNUGPRS - UNIT SYSDA DISP (NEW,CATLG,CATLG)
DATACLAS ASMFB04K
DSNU005I DSNUGPRS - LISTDEF
PTLIST

DSNU005I DSNUGPRS - INCLUDE TABLESPACE CBLDJP06.CBLTJPC0
PARTLEVEL
DSNU005I DSNUGPRS - INCLUDE TABLESPACE CBLDJP06.CBLTJPC1
PARTLEVEL
DSNU005I DSNUGPRS -


DSNU005I DSNUGPRS - COPY LIST PTLIST FULL YES PARALLEL
(4)
DSNU005I DSNUGPRS - COPYDDN
(PTDSN)

DSNU005I DSNUGPRS - SHRLEVEL
REFERENCE

DSNU005I DSNUGPRS -


DSNU012I DSNUGBAC - UTILITY EXECUTION TERMINATED, HIGHEST RETURN
CODE=8

Any help would be greatly appreciated.

Thanks

Alex J.P.

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

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