IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Unload with GDG template for partitioned TS


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
DonanferMaztho

New User


Joined: 06 Dec 2007
Posts: 9
Location: Brazil

PostPosted: Thu Aug 21, 2008 1:43 am
Reply with quote

Hi MF masters!

I'm facing a problem with an unload utility. I have the following statements:

LISTDEF UNLDLIST INCLUDE TABLESPACE DBTEST.TEST PARTLEVEL(1)
INCLUDE TABLESPACE DBTEST.TEST PARTLEVEL(2)

TEMPLATE UNLDDS
DSN '&DB.&TS..UNLOAD.P&PA(4).'
UNIT SYSDA
DISP(NEW,CATLG,DELETE)

UNLOAD LIST UNLDLIST
PUNCHDDN PUNCHDS
UNLDDN UNLDDS
SHRLEVEL REFERENCE


The expected DSN produced by the unload above are:
'DBTEST.TEST.UNLOAD.P01'
'DBTEST.TEST.UNLOAD.P02'

Although, I'm getting the following:
'DBTEST.TEST.UNLOAD.P00'

I have already tried in the template use:

TEMPLATE UNLDDS
DSN '&DB.&TS..UNLOAD.P&PA(4,2).'
UNIT SYSDA
DISP(NEW,CATLG,DELETE)

But got the same DSN previously mentioned
'DBTEST.TEST.UNLOAD.P00'

If I run the unload without the (4) or (4,2) in the DSN name, I have the following result:
'DBTEST.TEST.UNLOAD.P00001'
'DBTEST.TEST.UNLOAD.P00002'

Any idea what should be the problem?

Thanks!!!
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Aug 21, 2008 2:00 am
Reply with quote

Hello,

Quote:
The expected DSN produced by the unload above are:
'DBTEST.TEST.UNLOAD.P01'
'DBTEST.TEST.UNLOAD.P02'
Where did this expectation originate?

Please show the part of the documentation that shows this. The examples i find all show the P00001 style dataset names.
Back to top
View user's profile Send private message
DonanferMaztho

New User


Joined: 06 Dec 2007
Posts: 9
Location: Brazil

PostPosted: Thu Aug 21, 2008 5:03 am
Reply with quote

Pls,
check "Utility Guide and Reference" manual for V8, page 579 where say about " &variable". More specificaly where says:
"To specify a substring, use the form &variable(start). or &variable(start,length)."

Based on this info was expected the result mentioned before.

Thanks for your reply!
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Aug 21, 2008 7:07 am
Reply with quote

Hello,

I can't find p579 in the v8 utility guide linked via "IBM Manuals" at the top of the page. I did find what i believe is the same info:
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/handheld/Connected/BOOKS/dsnugj10/2.29.4?

which has:
Quote:
Example 2: Using variable substring notation to specify data set names. The following control statement defines template CP2. Variable substring notation is used in the DSN option to define the data set naming convention.
Assume that in the year 2003 you make a full image copy of partition 00004 of table space DSN8S81D. Assume that you specify the template CP2 for the data set for the local primary copy. DB2 gives the following name to the image copy data set: DH173001.DSN8S81D.Y03.COPYLP.P004

Notice that every variable in the DSN option begins with an ampersand (&) and ends with a period (.). These ampersands and periods are not included in the data set name. Only periods that do not signal the end of a variable are included in the data set name.

TEMPLATE CP2 DSN 'DH173001.&SN..Y&YEAR(3)..COPY&LR.&PB..P&PART(3,3).'
UNIT(SYSDA)

Example 3: Using COPY with TEMPLATE with variable substring notation. The following TEMPLATE utility control statement defines template SYSCOPY. Variable substring notation is used in the DSN option to define the data set naming convention. The subsequent COPY utility control statement specifies that DB2 is to make a local primary copy of the first partition of table space DSN8D81A.DSN8S81E. COPY is to write this image copy to a data set that is dynamically allocated according to the SYSCOPY template. In this case, the resulting data set name is DSN8D81A.DSN8S81E.P001

TEMPLATE SYSCOPY DSN '&DB..&TS..P&PA(3).'
COPY TABLESPACE DSN8D81A.DSN8S81E DSNUM 1 COPYDDN(SYSCOPY)

Notice that you can change the part variable in the DSN operand from P&PA(3). to P&PA(3,3). The resulting data set name is the same, because the length value of 3 is implied in the first specification.


These look more like the dsns you want to create. Notice, they used 3 rather than 4 or 4,2. You might give it a try with 2 and see if you get what you are looking for.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Remote Unload of CLOB Columns DB2 6
No new posts Multiple table unload using INZUTILB DB2 2
No new posts changing defaults in db2 admin - Unlo... DB2 0
No new posts DB2 Table - Image copy unload IBM Tools 2
Search our Forums:

Back to Top