DSN1COPY on UTS - VSAM PUT ERROR

ALIREZA BAGHBAN

DSN1COPY on UTS - VSAM PUT ERROR

Hi,

My problem is about DSN1COPY.

I have taken a copy of a universal table space with 19 part and created a new instance with the same DDL (also with the same number of partition) . I use DSN1COPY to transfer data and I get the following error:

**** VSAM PUT ERROR, RPLERREG = 008, RPLERRCD =  028 ****

As a result the first partition is moved. These are the JCLs that I have run and The error was for all JCLs the same.

//DSN1COPY EXEC PGM=DSN1COPY,

// PARM='FULLCOPY,OBIDXLAT,RESET,DSSIZE(4G)'
//STEPLIB DD DSN=XXXXXX.SDSNLOAD,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=XXX.XXXX.IC.XXXXX.CWRHFA90,DISP=SHR
//SYSUT2 DD DSN=XXX.XXXX.XXXXX.BGRHFA90.I0001.A001,DISP=SHR
//SYSXLAT DD *
265,265
1574,1714
1575,1715

 

//DSN1COPY EXEC PGM=DSN1COPY,

// PARM='FULLCOPY,OBIDXLAT,RESET,NUMPARTS(19)'
//STEPLIB DD DSN=XXXXXX.SDSNLOAD,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=XXX.XXXX.IC.XXXXX.CWRHFA90,DISP=SHR
//SYSUT2 DD DSN=XXX.XXXX.XXXXX.BGRHFA90.I0001.A001,DISP=SHR
//SYSXLAT DD *
265,265
1574,1714
1575,1715

 

thanks

Roy Boxwell

DSN1COPY on UTS - VSAM PUT ERROR
(in response to ALIREZA BAGHBAN)
Are you doing Part by Part? If so you must do each part on its own of course!

Roy Boxwell

SOFTWARE ENGINEERING GMBH and SEGUS Inc.
-Product Development-

Heinrichstrasse 83-85
40239 Duesseldorf/Germany
Tel. +49 (0)211 96149-675
Fax +49 (0)211 96149-32
Email: [login to unmask email]<mailto:[login to unmask email]>
http://www.seg.de http://www.seg.de

Software Engineering GmbH
Amtsgericht Düsseldorf, HRB 37894
Geschäftsführung: Gerhard Schubert

From: ALIREZA BAGHBAN [mailto:[login to unmask email]
Sent: Monday, January 8, 2018 10:56 AM
To: [login to unmask email]
Subject: [DB2-L] - DSN1COPY on UTS - VSAM PUT ERROR


Hi,

My problem is about DSN1COPY.

I have taken a copy of a universal table space with 19 part and created a new instance with the same DDL (also with the same number of partition) . I use DSN1COPY to transfer data and I get the following error:

**** VSAM PUT ERROR, RPLERREG = 008, RPLERRCD = 028 ****

As a result the first partition is moved. These are the JCLs that I have run and The error was for all JCLs the same.

//DSN1COPY EXEC PGM=DSN1COPY,

// PARM='FULLCOPY,OBIDXLAT,RESET,DSSIZE(4G)'
//STEPLIB DD DSN=XXXXXX.SDSNLOAD,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=XXX.XXXX.IC.XXXXX.CWRHFA90,DISP=SHR
//SYSUT2 DD DSN=XXX.XXXX.XXXXX.BGRHFA90.I0001.A001,DISP=SHR
//SYSXLAT DD *
265,265
1574,1714
1575,1715



//DSN1COPY EXEC PGM=DSN1COPY,

// PARM='FULLCOPY,OBIDXLAT,RESET,NUMPARTS(19)'
//STEPLIB DD DSN=XXXXXX.SDSNLOAD,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=XXX.XXXX.IC.XXXXX.CWRHFA90,DISP=SHR
//SYSUT2 DD DSN=XXX.XXXX.XXXXX.BGRHFA90.I0001.A001,DISP=SHR
//SYSXLAT DD *
265,265
1574,1714
1575,1715



thanks

-----End Original Message-----

Kai Stroh

RE: DSN1COPY on UTS - VSAM PUT ERROR
(in response to ALIREZA BAGHBAN)

You might want to check if the target VSAM clusters have reached the maximum number of extents (I think it's 123 per volume, 255 total, unless the SMS data class has the "Extent Constraint Removal" attribute). When you do not explicitly specify PRIQTY/SECQTY in your CREATE TABLESPACE statements, Db2 will give you VSAM clusters that have a very small primary and secondary allocation quantity. Typically, the SECQTY will only be 1 cylinder.

Db2 itself can dynamically increase the sizes of the secondary extents as the VSAM grows, so all is good as long as you use INSERT or LOAD to populate the table space. But if you use a tool that works outside of Db2 (such as DSN1COPY), the system will allocate all secondary extents with 1 cylinder each and you will run out of extents quickly. This could be the reason for the VSAM PUT ERROR. SMS can do extent consolidation for adjacent extents, so if you look at the data set using LISTCAT ENT(...) ALL you may see larger extents, but the core problem remains.

If you see that the problem is caused by small PRIQTY/SECQTY, you will have to use IDCAMS in order to delete and redefine the target VSAM with an appropriate size. You can use the HI-U-RBA of the source VSAM, this is how much space is actually occupied in the source clusters.

Hope that helps
Kai

Myron Miller

DSN1COPY on UTS - VSAM PUT ERROR
(in response to Kai Stroh)
I don't know if this is your issue or not. But UTS such as PBG can not be copied by DSn1COPy if the number of partitions in the source is greater than the number in the target. Major problem for DSN1COPY.


Thanks Myron W. Miller


________________________________
From: Kai Stroh <[login to unmask email]>
Sent: Monday, January 8, 2018 10:58 AM
To: [login to unmask email]
Subject: [DB2-L] - RE: DSN1COPY on UTS - VSAM PUT ERROR


You might want to check if the target VSAM clusters have reached the maximum number of extents (I think it's 123 per volume, 255 total, unless the SMS data class has the "Extent Constraint Removal" attribute). When you do not explicitly specify PRIQTY/SECQTY in your CREATE TABLESPACE statements, Db2 will give you VSAM clusters that have a very small primary and secondary allocation quantity. Typically, the SECQTY will only be 1 cylinder.

Db2 itself can dynamically increase the sizes of the secondary extents as the VSAM grows, so all is good as long as you use INSERT or LOAD to populate the table space. But if you use a tool that works outside of Db2 (such as DSN1COPY), the system will allocate all secondary extents with 1 cylinder each and you will run out of extents quickly. This could be the reason for the VSAM PUT ERROR. SMS can do extent consolidation for adjacent extents, so if you look at the data set using LISTCAT ENT(...) ALL you may see larger extents, but the core problem remains.

If you see that the problem is caused by small PRIQTY/SECQTY, you will have to use IDCAMS in order to delete and redefine the target VSAM with an appropriate size. You can use the HI-U-RBA of the source VSAM, this is how much space is actually occupied in the source clusters.

Hope that helps
Kai

-----End Original Message-----

ALIREZA BAGHBAN

RE: DSN1COPY on UTS - VSAM PUT ERROR
(in response to Kai Stroh)

Hi Roy,

I taken the fullcopy with all part.

Thank you KAI,

First I used sms managed storage for target object and also tried with none sms.

The PRIQTY and SECQTY of the target tablespace is 2,000,000 (2 gb), 1,000,000 (1 gb).

In my DASD every volumes has 10,000 CYL (7gb) and the storage has enough volumes. (about the sms managed the story is different!)

After the error occurred i saw the extents. There were Only 2 extents and 3,000,000 (3 gb) had been allocated.

I have not problem for SEGMENTED TABLE SPACE with DSN1COPY.

I also think the problem is allocation but i do not understand what.

If i need to use IDCAMS to create VSAM CLUSTERS manually , how i should do this?

Thanks

Edited By:
ALIREZA BAGHBAN[Organization Members] @ Jan 08, 2018 - 12:15 PM (America/Eastern)

Steen Rasmussen

DSN1COPY on UTS - VSAM PUT ERROR
(in response to ALIREZA BAGHBAN)
I believe you have to specify EACH partition since DSN1COPY works on the pageset-level.

Steen Rasmussen

From: ALIREZA BAGHBAN [mailto:[login to unmask email]
Sent: Monday, January 08, 2018 12:10 PM
To: [login to unmask email]
Subject: [DB2-L] - RE: DSN1COPY on UTS - VSAM PUT ERROR

CAUTION: This email originated from outside of CA. Do not click links or open attachments unless you recognize the sender and know the content is safe.

I taken the fullcopy with all part.

First I used sms managed storage for target object and also tried with none sms.

The PRIQTY and SECQTY of the target tablespace is 2,000,000 (2 gb), 1,000,000 (1 gb).

In my DASD every volumes has 10,000 CYL (7gb) and the storage has enough volumes. (about the sms managed the story is different!)

After the error occurred i saw the extents. There were Only 2 extents and 3,000,000 (3 gb) had been allocated.

I have not problem for SEGMENTED TABLE SPACE with DSN1COPY.

I also think the problem is allocation but i do not understand what.

If i need to use IDCAMS to create VSAM CLUSTERS manually , how i should do this?

Thanks

-----End Original Message-----

ALIREZA BAGHBAN

RE: DSN1COPY on UTS - VSAM PUT ERROR
(in response to Myron Miller)

Thank you MYRON,  The number and size of partitions are the same at the origin and destination

Edited By:
ALIREZA BAGHBAN[Organization Members] @ Jan 08, 2018 - 12:23 PM (America/Eastern)

ALIREZA BAGHBAN

RE: DSN1COPY on UTS - VSAM PUT ERROR
(in response to Steen Rasmussen)

Hi STEEN,

Do you mean i can not recover a full image copy (all parts) of universal table space using DSN1COPY?  Unless each part was copied separately?

Colin Clayton

DSN1COPY on UTS - VSAM PUT ERROR
(in response to ALIREZA BAGHBAN)
In all my 30+ years working with DB2 I could count the number of times I've used DSN1COPY on one hand.
It's really not a recovery utility, except as a last resort.

Colin



Sent from my Samsung Galaxy smartphone.


-------- Original message --------
From: ALIREZA BAGHBAN <[login to unmask email]>
Date: 08/01/2018 18:30 (GMT+01:00)
To: [login to unmask email]
Subject: [DB2-L] - RE: DSN1COPY on UTS - VSAM PUT ERROR


Hi STEEN,

Do you mean i can not recover a full image copy (all parts) of universal table space using DSN1COPY? Unless each part was copied separately?

-----End Original Message-----

ALIREZA BAGHBAN

RE: DSN1COPY on UTS - VSAM PUT ERROR
(in response to Colin Clayton)



In Reply to Colin Clayton:

In all my 30+ years working with DB2 I could count the number of times I've used DSN1COPY on one hand.
It's really not a recovery utility, except as a last resort.

Colin



Sent from my Samsung Galaxy smartphone.


-------- Original message --------
From: ALIREZA BAGHBAN <[login to unmask email]>
Date: 08/01/2018 18:30 (GMT+01:00)
To: [login to unmask email]
Subject: [DB2-L] - RE: DSN1COPY on UTS - VSAM PUT ERROR


Hi STEEN,

Do you mean i can not recover a full image copy (all parts) of universal table space using DSN1COPY? Unless each part was copied separately?

-----End Original Message-----

Hi COLIN,

What do you do if you have an unwanted dropped tablespace and you do not have a log analysis tools?!

Edited By:
ALIREZA BAGHBAN[Organization Members] @ Jan 08, 2018 - 01:18 PM (America/Eastern)

Steen Rasmussen

DSN1COPY on UTS - VSAM PUT ERROR
(in response to ALIREZA BAGHBAN)
When you read the initial section in the doc :

With the DSN1COPY stand-alone utility, you can copy:
v DB2 VSAM data sets to sequential data sets
v DSN1COPY sequential data sets to DB2 VSAM data sets
v DB2 image copy data sets to DB2 VSAM data sets
v DB2 VSAM data sets to other DB2 VSAM data sets
v DSN1COPY sequential data sets to other sequential data sets

A DB2 VSAM data set is one of the following items:
v a single piece of a nonpartitioned table space or index
v a single partition of a partitioned table space or index
v a FlashCopy image copy data set


Steen

From: ALIREZA BAGHBAN [mailto:[login to unmask email]
Sent: Monday, January 08, 2018 12:31 PM
To: [login to unmask email]
Subject: [DB2-L] - RE: DSN1COPY on UTS - VSAM PUT ERROR

CAUTION: This email originated from outside of CA. Do not click links or open attachments unless you recognize the sender and know the content is safe.

Hi STEEN,

Do you mean i can not recover a full image copy (all parts) of universal table space using DSN1COPY? Unless each part was copied separately?

-----End Original Message-----

Kai Stroh

RE: DSN1COPY on UTS - VSAM PUT ERROR
(in response to Kai Stroh)

If you want to copy a PBG using DSN1COPY, but the source has more partitions than the target, you can run ADD PARTITION as often as needed on the target table in order to create the missing target partitions. Interestingly, you have to run this on the target table, not the target table space. Once the number of partitions is equal, you can use DSN1COPY, assuming that all other attributes match.

ALIREZA BAGHBAN

RE: DSN1COPY on UTS - VSAM PUT ERROR
(in response to Steen Rasmussen)



In Reply to Steen Rasmussen:

When you read the initial section in the doc :

With the DSN1COPY stand-alone utility, you can copy:
v DB2 VSAM data sets to sequential data sets
v DSN1COPY sequential data sets to DB2 VSAM data sets
v DB2 image copy data sets to DB2 VSAM data sets
v DB2 VSAM data sets to other DB2 VSAM data sets
v DSN1COPY sequential data sets to other sequential data sets

A DB2 VSAM data set is one of the following items:
v a single piece of a nonpartitioned table space or index
v a single partition of a partitioned table space or index
v a FlashCopy image copy data set


Steen

From: ALIREZA BAGHBAN [mailto:[login to unmask email]
Sent: Monday, January 08, 2018 12:31 PM
To: [login to unmask email]
Subject: [DB2-L] - RE: DSN1COPY on UTS - VSAM PUT ERROR

CAUTION: This email originated from outside of CA. Do not click links or open attachments unless you recognize the sender and know the content is safe.

Hi STEEN,

Do you mean i can not recover a full image copy (all parts) of universal table space using DSN1COPY? Unless each part was copied separately?

-----End Original Message-----
These samples are from the IBM , but i can not do that and I get VSAM PUT ERROR

Example 6: Copying all partitions of a partitioned table space

The following statement specifies that DSN1COPY is to copy data into all partitions of a partitioned table space by using a full image copy of the table space as input. The input image copy has 16 partitions, as indicated by the NUMPARTS option. You must ensure that the fifth-level qualifier in the data set name is the same, either I0001 or J0001, for all partitions of the output table space before running this type of job stream.

//DSN1COPY EXEC PGM=DSN1COPY, // PARM='NUMPARTS(16),RESET,FULLCOPY' //SYSUDUMP DD SYSOUT=A //SYSPRINT DD SYSOUT=A //SYSUT1 DD DISP=SHR,DSN=PROD.IMAGE.COPY.DSNUMALL //SYSUT2 DD DISP=OLD,DSN=DSNCAT.DSNDBD.TESTDB.TS01.I0001.A001


OR 

 

Example 9: Defining output data sets for multi-piece nonpartitioned table spaces

The following statements specify that DSN1COPY is to copy data into all pieces of a segmented table space by using a full image copy of another segmented table space as input.

  1. Create the target segmented table space by specifying appropriate primary and secondary quantities.
  2. Define data sets for all subsequent pieces.

    In the following example, the data set for the second piece is 'DSNCAT.DSNDBC.TESTDB.TS01.I0001.A002'. Use the MODEL option, which causes the new data set to be created like the first data set.

    //ALCVSAM EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * DEFINE CLUSTER + (NAME('DSNCAT.DSNDBC.TESTDB.TS01.I0001.A002') + MODEL('DSNCAT.DSNDBC.TESTDB.TS01.I0001.A001')) + DATA + (NAME('DSNCAT.DSNDBD.TESTDB.TS01.I0001.A002') + MODEL('DSNCAT.DSNDBD.TESTDB.TS01.I0001.A001')) /*

     

  3. Run DSN1COPY. //DSN1COPY EXEC PGM=DSN1COPY, // PARM='FULLCOPY' //SYSUDUMP DD SYSOUT=A //SYSPRINT DD SYSOUT=A //SYSUT1 DD DISP=SHR,DSN=PROD.IMAGE.COPY.DSNUMALL //SYSUT2 DD DISP=OLD,DSN=DSNCAT.DSNDBD.TESTDB.TS01.I0001.A001

I also read about NUMPARTS option:

NUMPARTS(integer)Specifies the number of partitions that are associated with the input data set. This parameter is not used if the target table space is a universal table space. DSSIZE is used instead. 

 

Kai Stroh

RE: DSN1COPY on UTS - VSAM PUT ERROR
(in response to ALIREZA BAGHBAN)

In Reply to ALIREZA BAGHBAN:

The PRIQTY and SECQTY of the target tablespace is 2,000,000 (2 gb), 1,000,000 (1 gb).

In my DASD every volumes has 10,000 CYL (7gb) and the storage has enough volumes. (about the sms managed the story is different!)

After the error occurred i saw the extents. There were Only 2 extents and 3,000,000 (3 gb) had been allocated.

 

To me this sounds like the PRIQTY and SECQTY are chosen in a way that you now have slightly over 3 GB, and if z/OS were to add another extent, it would give you a little bit over 4 GB (let's say 4.01 GB). If the VSAM cluster does not have the extended addressability (EA) attribute, there is a hard limit of 4 GB for the total size. Therefore, the system cannot add another extent and you are stuck at just over 3 GB.

"Normal" segmented tablespaces use 2 GB per piece, so you probably over-allocate those too, by just a little bit. It's not a problem for Db2, but you are going to have some unused space at the end of each VSAM.

However, page sets that use a 4 GB DSSIZE / piece size and do not have EA are particularly problematic. When Db2 fills these objects, it uses exactly 4095 MB, which is 1 MB shy of 4 GB, for non-partitioned objects, and somewhere between 4094 and 4096 MB for partitioned objects, depending on the page size and some other factors. To allocate the target VSAM properly, you have to make it so that you end up with at least the required space, but not more than 4096 MB. This is tricky to get right.

What works well is to use the total size as PRIQTY. Now, you may not have that amount of contiguous free space on your target DASD, so you will need a little help from SMS. Configure your target SMS data class like this:

Space Constraint Relief = YES
Reduce Space Up To (%) = 0

With these settings, SMS is allowed to split a large allocation request into multiple smaller extents, but it is not allowed to allocate less than the requested space. There are more settings that can help, for example the dynamic volume count, but these two are the most important ones.

Then delete the target cluster and use an IDCAMS statement like this to re-allocate it (the VSAM will not be able to grow beyond 4 GB, but I like to use 10% of the PRIQTY as SECQTY anyway):

 DEFINE CLUSTER(CISZ(4096) REUSE LINEAR SHR(3 3) -
    NAME(DSNC10.DSNDBC.DBNAME.TSNAME.I0001.A001)) -
    DATA(NAME(DSNC10.DSNDBD.DBNAME.TSNAME.I0001.A001) -
    KILOBYTES(4194000 419400))

Replace the data set names for the cluster and data part with your target names, and set CISIZ to the page size of the tablespace. DSN1COPY should now be able to copy the full page set.

Depending on how many objects you need to copy, you will want to automate the whole process. I happen to work for a company that offers a fully automated file system level copy tool for Db2 z/OS, which takes care of DDL, data, statistics, everything. Feel free to contact me if you like to learn about it.

Thanks
Kai

Charles Brown

DSN1COPY on UTS - VSAM PUT ERROR
(in response to Kai Stroh)
“...target, you can run ADD PARTITION as often as needed...”

Hmmm! Not compute ...

Sent from my iPhone

> On Jan 9, 2018, at 12:57 AM, Kai Stroh <[login to unmask email]> wrote:
>
> target, you can run ADD PARTITION as often as needed

Kai Stroh

RE: DSN1COPY on UTS - VSAM PUT ERROR
(in response to Charles Brown)

Let's say your source PBG has 5 partitions, but your existing target PBG only has 2 partitions. The name of the target table is QA1.MYPBGTABLE.

You can do ALTER TABLE QA1.MYPBGTABLE ADD PARTITION in the target as often as needed, in this case 3 times. This will bring your target PBG to 5 partitions, and then you can use DSN1COPY.

Of course, if you create the target PBG from scratch, you can also specify - for example - MAXPARTITIONS 10 NUMPARTS 5 in the CREATE TABLESPACE statement and get 5 partitions right away.



In Reply to Charles Brown:

“...target, you can run ADD PARTITION as often as needed...”

Hmmm! Not compute ...

Sent from my iPhone

> On Jan 9, 2018, at 12:57 AM, Kai Stroh <[login to unmask email]> wrote:
>
> target, you can run ADD PARTITION as often as needed

Ray Janes

DSN1COPY on UTS - VSAM PUT ERROR
(in response to ALIREZA BAGHBAN)
You wish to copy all the data?
Have you tried this? Image Copy by partition. Then use your second example of your DSN1COPY. The SYSUT1 should concatenate all the image copy datasets (so 19). The SYSUT2 should have all 19 VSAM datasets concatenated. Might work


//DSN1COPY EXEC PGM=DSN1COPY,

// PARM='FULLCOPY,OBIDXLAT,RESET,NUMPARTS(19)'
//STEPLIB DD DSN=XXXXXX.SDSNLOAD,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=XXX.XXXX.IC.XXXXX.CWRHFA90,DISP=SHR << Part 1 IC

// DD DSN=XXX.XXXX.IC.XXXXX.CWRHFA90,DISP=SHR << Part 2 IC, do all 19

//SYSUT2 DD DSN=XXX.XXXX.XXXXX.BGRHFA90.I0001.A001,DISP=old << part 1

// DD DSN=XXX.XXXX.XXXXX.BGRHFA90.I0001.A002,DISP=old << part 2 do all 19
//SYSXLAT DD *
265,265
1574,1714
1575,1715


From: ALIREZA BAGHBAN [mailto:[login to unmask email]
Sent: Monday, January 8, 2018 3:56 AM
To: [login to unmask email]
Subject: [DB2-L] - DSN1COPY on UTS - VSAM PUT ERROR


Hi,

My problem is about DSN1COPY.

I have taken a copy of a universal table space with 19 part and created a new instance with the same DDL (also with the same number of partition) . I use DSN1COPY to transfer data and I get the following error:

**** VSAM PUT ERROR, RPLERREG = 008, RPLERRCD = 028 ****

As a result the first partition is moved. These are the JCLs that I have run and The error was for all JCLs the same.

//DSN1COPY EXEC PGM=DSN1COPY,

// PARM='FULLCOPY,OBIDXLAT,RESET,DSSIZE(4G)'
//STEPLIB DD DSN=XXXXXX.SDSNLOAD,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=XXX.XXXX.IC.XXXXX.CWRHFA90,DISP=SHR
//SYSUT2 DD DSN=XXX.XXXX.XXXXX.BGRHFA90.I0001.A001,DISP=SHR
//SYSXLAT DD *
265,265
1574,1714
1575,1715



//DSN1COPY EXEC PGM=DSN1COPY,

// PARM='FULLCOPY,OBIDXLAT,RESET,NUMPARTS(19)'
//STEPLIB DD DSN=XXXXXX.SDSNLOAD,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=XXX.XXXX.IC.XXXXX.CWRHFA90,DISP=SHR
//SYSUT2 DD DSN=XXX.XXXX.XXXXX.BGRHFA90.I0001.A001,DISP=SHR
//SYSXLAT DD *
265,265
1574,1714
1575,1715



thanks

-----End Original Message-----

ALIREZA BAGHBAN

RE: DSN1COPY on UTS - VSAM PUT ERROR
(in response to Kai Stroh)

Hi KAI,

Thank you for your consideration and for the accurate explanation.

Given the points you mentioned I found the problem.

I used (4,193,280) for PRIQTY and 1000 for SECQTY when I was creating the target object .

It worked fine! thanks again.

I also thanks all those who wanted to guide.

In Reply to Kai Stroh:

In Reply to ALIREZA BAGHBAN:

The PRIQTY and SECQTY of the target tablespace is 2,000,000 (2 gb), 1,000,000 (1 gb).

In my DASD every volumes has 10,000 CYL (7gb) and the storage has enough volumes. (about the sms managed the story is different!)

After the error occurred i saw the extents. There were Only 2 extents and 3,000,000 (3 gb) had been allocated.

 

To me this sounds like the PRIQTY and SECQTY are chosen in a way that you now have slightly over 3 GB, and if z/OS were to add another extent, it would give you a little bit over 4 GB (let's say 4.01 GB). If the VSAM cluster does not have the extended addressability (EA) attribute, there is a hard limit of 4 GB for the total size. Therefore, the system cannot add another extent and you are stuck at just over 3 GB.

"Normal" segmented tablespaces use 2 GB per piece, so you probably over-allocate those too, by just a little bit. It's not a problem for Db2, but you are going to have some unused space at the end of each VSAM.

However, page sets that use a 4 GB DSSIZE / piece size and do not have EA are particularly problematic. When Db2 fills these objects, it uses exactly 4095 MB, which is 1 MB shy of 4 GB, for non-partitioned objects, and somewhere between 4094 and 4096 MB for partitioned objects, depending on the page size and some other factors. To allocate the target VSAM properly, you have to make it so that you end up with at least the required space, but not more than 4096 MB. This is tricky to get right.

What works well is to use the total size as PRIQTY. Now, you may not have that amount of contiguous free space on your target DASD, so you will need a little help from SMS. Configure your target SMS data class like this:

Space Constraint Relief = YES
Reduce Space Up To (%) = 0

With these settings, SMS is allowed to split a large allocation request into multiple smaller extents, but it is not allowed to allocate less than the requested space. There are more settings that can help, for example the dynamic volume count, but these two are the most important ones.

Then delete the target cluster and use an IDCAMS statement like this to re-allocate it (the VSAM will not be able to grow beyond 4 GB, but I like to use 10% of the PRIQTY as SECQTY anyway):

 DEFINE CLUSTER(CISZ(4096) REUSE LINEAR SHR(3 3) -
    NAME(DSNC10.DSNDBC.DBNAME.TSNAME.I0001.A001)) -
    DATA(NAME(DSNC10.DSNDBD.DBNAME.TSNAME.I0001.A001) -
    KILOBYTES(4194000 419400))

Replace the data set names for the cluster and data part with your target names, and set CISIZ to the page size of the tablespace. DSN1COPY should now be able to copy the full page set.

Depending on how many objects you need to copy, you will want to automate the whole process. I happen to work for a company that offers a fully automated file system level copy tool for Db2 z/OS, which takes care of DDL, data, statistics, everything. Feel free to contact me if you like to learn about it.

Thanks
Kai

ALIREZA BAGHBAN

RE: DSN1COPY on UTS - VSAM PUT ERROR
(in response to Ray Janes)

Hi Ray,

Second example does not work on partitioned tablespaces because of the mechanism of the VSAM CLUSTERs, or do not need this at all to use IDCAMS.

I think in a MULTI PIECE SEGMENTED TABLESPACE the datasets are clustered. but a single partition dataset of a PARTITIONED TABLESPACE is not cluster with other parts or maybe the clustering model is different. That's why you can do some works (Such as running a utility or executing a command) on a single partition separately without causing the problem for the rest of the partitions but you can not do this for a piece of segmented tablespace dataset.

I found this based on the LISTC and LISTD reviews , and may not be correct.

In Reply to Ray Janes:

You wish to copy all the data?
Have you tried this? Image Copy by partition. Then use your second example of your DSN1COPY. The SYSUT1 should concatenate all the image copy datasets (so 19). The SYSUT2 should have all 19 VSAM datasets concatenated. Might work


//DSN1COPY EXEC PGM=DSN1COPY,

// PARM='FULLCOPY,OBIDXLAT,RESET,NUMPARTS(19)'
//STEPLIB DD DSN=XXXXXX.SDSNLOAD,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=XXX.XXXX.IC.XXXXX.CWRHFA90,DISP=SHR << Part 1 IC

// DD DSN=XXX.XXXX.IC.XXXXX.CWRHFA90,DISP=SHR << Part 2 IC, do all 19

//SYSUT2 DD DSN=XXX.XXXX.XXXXX.BGRHFA90.I0001.A001,DISP=old << part 1

// DD DSN=XXX.XXXX.XXXXX.BGRHFA90.I0001.A002,DISP=old << part 2 do all 19
//SYSXLAT DD *
265,265
1574,1714
1575,1715


From: ALIREZA BAGHBAN [mailto:[login to unmask email]
Sent: Monday, January 8, 2018 3:56 AM
To: [login to unmask email]
Subject: [DB2-L] - DSN1COPY on UTS - VSAM PUT ERROR


Hi,

My problem is about DSN1COPY.

I have taken a copy of a universal table space with 19 part and created a new instance with the same DDL (also with the same number of partition) . I use DSN1COPY to transfer data and I get the following error:

**** VSAM PUT ERROR, RPLERREG = 008, RPLERRCD = 028 ****

As a result the first partition is moved. These are the JCLs that I have run and The error was for all JCLs the same.

//DSN1COPY EXEC PGM=DSN1COPY,

// PARM='FULLCOPY,OBIDXLAT,RESET,DSSIZE(4G)'
//STEPLIB DD DSN=XXXXXX.SDSNLOAD,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=XXX.XXXX.IC.XXXXX.CWRHFA90,DISP=SHR
//SYSUT2 DD DSN=XXX.XXXX.XXXXX.BGRHFA90.I0001.A001,DISP=SHR
//SYSXLAT DD *
265,265
1574,1714
1575,1715



//DSN1COPY EXEC PGM=DSN1COPY,

// PARM='FULLCOPY,OBIDXLAT,RESET,NUMPARTS(19)'
//STEPLIB DD DSN=XXXXXX.SDSNLOAD,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=XXX.XXXX.IC.XXXXX.CWRHFA90,DISP=SHR
//SYSUT2 DD DSN=XXX.XXXX.XXXXX.BGRHFA90.I0001.A001,DISP=SHR
//SYSXLAT DD *
265,265
1574,1714
1575,1715



thanks

-----End Original Message-----