View previous topic :: View next topic
|
Author |
Message |
DonanferMaztho
New User
Joined: 06 Dec 2007 Posts: 9 Location: Brazil
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
DonanferMaztho
New User
Joined: 06 Dec 2007 Posts: 9 Location: Brazil
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|