I am aware that there is a BSTXCOPY utility from CA to assisst with copying PDSs to PDSEs, however, I have literally thousands of PDSs that need to be converted and I'm looking for a way to do this automagically. I don't want to have to look at each dataset, figure out what the space, etc should be so that I can enter that information to create the new PDSE. None of the utilities I've found anywhere, have a way to clone an existing PDS as a PDSE. Does anyone know if anything like this exists?
Hello, Below is an example of the IBM utility that may help. You will want to modify the keywords for your files.
//USERID JOB ...
//* CONVERT ALL PDSS FOR USER TO PDSES,
//* WITH THE EXCEPTION OF PDSS WITH A LOW LEVEL QUALIFIER OF '.LOAD'
//STEP1 EXEC PGM=ADRDSSU
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
COPY DATASET( -
DELETE PURGE -
I also want to be able to use this for Loadlibs and the comments say this can’t be used for that. Is that the case? I want to use this for all sorts of PDSs, Load and non-Load.
DFDSS will remove the footprints for load modules, BSTXCOPY is the only way
Have you used the LIKE= parameter on a dataset allocation?
You could create the .NEW dataset like the input dataset so you could create a proc with a symbolic input dataset to do lots of datasets, maybe
Thanks Stuart. When you say 'Like' how aare you doing the allocation? My problem is that we have some huge datasets and I don't want to try and guess how much space to allocate for these datasets and then have it fail on the copy, so if I could create a job that does a define and then a copy, that would be great. I just don't know anything that will define 'like', but make the new dataset a PDSE regardless of the initial dataset. Right now, I could use ADRDSSU to create the new PDSE and then BSTXCOPY to copy over the information (with footprints), I'm just having a little trouble getting ADRDSSU to create the PDSE with a different name. If you have a way to do an allocation with 'Like' in a batch job, that would be great. Thanks.
If you look at the post from Phon_Shuffitt you will see the JCL with the like statement coded
The IEBCOPY LIKE allocation/copy you can do that.
//GROUPCPY EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=A
//I1 DD DSN=my.pds,DISP=SHR
//O1 DD DSN=my.new.pdse,
// LIKE=my.pdse,DSNTYPE=LIBRARY, With that you are overriding the PDS and making the new a PDSE.
//SYSUT3 DD UNIT=SYSDA
//SYSIN DD *
GROUPCPY COPYGRP INDD=((I1,R)),OUTDD=O1
Stuart made a good point with LOADLIB you might consider using BSTXCOPY as it will perserve the Footprint as it is specifically designed for LOAD libraries.
Try that out.
Have a great day,
Here is another approach that makes it easier when working with thousands of files - use the Table Tool (ENBPIU00). See Table Tools Examples
Can i use the INDD and OUTDD as same..because i just want to convert the PDS to PDSE(i dont want to create a new one)
//STEP1 EXEC PGM=BSTXCOPY // INCLUDE MEMBER=SCMM@LIB //SYSPRINT DD SYSOUT=* //BSTERR DD SYSOUT=* //SYSUT3 DD UNIT=VIO,SPACE=(CYL,(1,2)) //SYSUT4 DD UNIT=VIO,SPACE=(CYL,(1,2)) //IND1 DD DISP=(OLD,PASS), // DSN=MYDSN (PDS OR PDSE) //OUTDD DD DISP=(OLD,PASS), // DSN=MYDSN (PDS OR PDSE) //SYSIN DD * COPY INDD=((IND1,R)),OUTDD=OUTDD COPY INDD=((IND2,R)),OUTDD=OUTDD
Probably the safest answer to your question is --- try it. Choose a single PDS dataset of no value and see how it behaves. Please also, let us know how it goes.
A alternative is to make a change in the example JCL from this....
//MODEL2 DD *
RENAME '&Dataset' +
RENAME '&Dataset.NEW' +
Thanks to everybody for their help. I believe I have a working process now.
The conversion worked out well for us. I do remember we had some problem when PDSEs and PDSs were trying to work together, but I'll have to check my notes to see what the issue was. We have converted everything o PDSes, except we have some ELIBs left which I'd like to change to PDSes.If you'd like more info, send me a note.Thanks.