I tried to clone a PDS using the LIKE=dsn parameter on the new PDS.
Here's the result:
6 //COPY EXEC PGM=IEBCOPY
7 //SYSPRINT DD SYSOUT=*
8 //SYSUT1 DD DISP=SHR,DSN=&FROM..R32015.HARP.JOBSJAN
IEFC653I SUBSTITUTION JCL - DISP=SHR,DSN=COW.R32015.HARP.JOBSJAN
9 //SYSUT2 DD DISP=(NEW,PASS),
IEFC653I SUBSTITUTION JCL - DISP=(NEW,PASS),LIKE=COW.R32015.HARP.JOBSJAN,DSN=SEU.R32015.HARP.JOBSJAN
TSS7000I SLPROD LAST-USED 16 DEC 15 00:01 SYSTEM=PROD FACILITY=BATCH
TSS7001I COUNT=02707 MODE=FAIL LOCKTIME=NONE NAME=LONDON PROD SECJCL
IEF344I PLSOR02R COPY SYSUT2 - ALLOCATION FAILED DUE TO DATA FACILITY SYSTEM ERROR
IGD17293I DATA SET SEU.R32015.HARP.JOBSJAN HAS
PARTITIONED ORGANIZATION AND IS NOT ELIGIBLE
TO BE A MULTI-VOLUME DATA SET, ALLOCATION FAILED
IEF272I PLSOR02R COPY - STEP WAS NOT EXECUTED.
I don't get it. Why can't the new PDS be allocated ?
I don't see anything unusual about the model dataset.
Admittedly, I should have coded DISP=(NEW,KEEP) but I don't see how that should make any difference.
Here's the model dataset:
Data Set Information
Data Set Name . . . . : COW.R32015.HARP.JOBSJAN
General Data Current Allocation
Management class . . : P030Y735 Allocated cylinders : 1
Storage class . . . : STD Allocated extents . : 1
Volume serial . . . : S2SD13 Maximum dir. blocks : 150
Device type . . . . : 3390
Data class . . . . . : PDS
Organization . . . : PO Current Utilization
Record format . . . : FB Used cylinders . . : 1
Record length . . . : 80 Used extents . . . : 1
Block size . . . . : 27920 Used dir. blocks . : 10
1st extent cylinders: 1 Number of members . : 56
Secondary cylinders : 5
Data set name type : PDS Dates
Creation date . . . : 2015/09/30
Referenced date . . : 2015/12/17
Expiration date . . : ***None***
Note: Directory quantity is picked up as part of the space allocation attribute except when the model data set is a PDSE. When you create a PDS, the directory blocks must be specified directly on the JCL by using the SPACE parameter.
The following attributes are copied from the model data set to the new data set:
Data set organization
Record organization (RECORG) or
Record format (RECFM)
Record length (LRECL)
Key length (KEYLEN)
Key offset (KEYOFF)
Type, PDS, PDSE, basic format, extended format, large format, or HFS (DSNTYPE)
Space allocation (AVGREC and SPACE)
Your message refers to Volume count, and there's nothing in that list about volumes at all, so I think you need to add some more stuff explicitly to the DD. The LIKE doesn't just take "everything".
Thanks for input. I think I am looking at either a known problem (possibly APAR OA22738 or related), or my installation has something wrong with its ACS routine(s). I have raised a ticket to storage support to see what they make of it.
LIKE does not take Dataclas as one of its model attributes. It looks like your new file is being assigned a Dataclas that has a VOLCOUNT or DYNVOLCNT GT 1. PDS or PDSE cannot be multi-volume. If you include DATACLAS=PDS (which your model file has) as well as LIKE= you'll probably find it works.