
MainframeSupports tip week 22/2001:
In week 15 I told you about the DFDSS program called ADRDSSU.
You can use this program to copy existing datasets to new datasets without the tedious
work of preallocating the new dataset.
When you make a copy of a dataset using ADRDSSU, you can copy VSAM-datasets as well as
NONVSAM datasets. The copy can be succesfully carried out when you have RACF READ access
to the dataset you want to copy and there are no enqueues on the dataset (no one must use
it while you are copying). The dataset you want to copy to must not exist. Therefore you
normally will start with a delete step of the new dataset before the step that makes the copy.
Here is a piece of JCL that copies MY.OWN.DATASET to MY.NEW.DATASET using ADRDSSU:
//ADRDSSU EXEC PGM=ADRDSSU
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
COPY -
DATASET(INCLUDE(MY.OWN.DATASET)) -
RENAMEU((MY.OWN.DATASETOUT, -
MY.NEW.DATASETOUT)) CATALOG
/*
MY.NEW.DATASET will be allocated precisely in the same way as MY.OWN.DATASET except that
MY.NEW.DATASET will have only one extent big enough to hold all data from MY.OWN.DATASET
exactly as if you had made a move with ADRDSSU. Before you get too excited copying all sorts
of dataset, I can tell you that you will find it pretty irritating, that there has to be no
enqueues on the dataset, you want to copy. There are also some pitfalls that you must be
aware of. ADRDSSU does not copy alternate indexes on a VSAM CLUSTER (because of the RENAMEU
parameter) and GDG bases cannot be copied, but GDG's are, which can cause a lot of trouble.
Previous tip in english
Sidste danske tip
Tip list
|