DB2
z/OS DB2 LUW z/OS CICS VTAM |
z/OS Info |
Home |
Dump Datasets
//STEP01 EXEC PGM=ADRDSSU,REGION=0M
PARM=('TYPRUN=NORUN')
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//DASDIN DD UNIT=3390,DISP=SHR,VOL=SER=<YOURVOL>
//OUTFILE DD DSN=<YOUR.DSN>,
//
DISP=(,CATLG,UNCATLG),
//
UNIT=WORK,
//
SPACE=(CYL,(200,200),RLSE),
//
DCB=(<YOUR.MODEL>)
//SYSIN DD *
DUMP
-
OUTDDNAME(OUTFILE)
-
DATASET(
INCLUDE
-
(
-
SYS1.A*.**
-
SYS2.A*..**
-
)
-
EXCLUDE
-
(
-
SYS1.AB*.**
-
SYS2.AC*.** -
)
-
)
-
TOL(ENQF)
-
SHARE
-
WAIT(0,0)
/*
Restore Datasets
//STEP01 EXEC PGM=ADRDSSU,REGION=0M
PARM=('TYPRUN=NORUN')
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//DASDIN DD UNIT=3390,DISP=SHR,VOL=SER=<YOURVOL>
//INFILE DD DSN=<YOUR.DSN>,
//
DISP=(,CATLG,UNCATLG),
//
UNIT=WORK,
//
SPACE=(CYL,(200,200),RLSE),
//
DCB=(<YOUR.MODEL>)
//SYSIN DD *
RESTORE
-
LOGINDDNAME(INFILE)
-
DATASET( INCLUDE
(
-
SYS1.ABC.TEST.DATASET -
) )
-
RENUNC(<USERID>)
-
TOL(ENQF)
SHARE WAIT(0,0)
/*
COPY Datasets and rename
//STEP2 EXEC PGM=ADRDSSU,REGION=0M
PARM=('TYPRUN=NORUN')
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *
COPY
-
DATASET(
-
INCLUDE ( (DSN1CAT.DSNDBC.** -
DSN1CAT.BSDS*.** -
)) -
TOL(ENQF) -
REPUNC -
CATALOG -
ALLEXCP -
ALLDATA(*) -
PROCESS(SYS1) -
TGTALLOC(SOURCE) -
OPTIMIZE(4) -
RENAMEUNCONDITIONAL((DSN1CAT.DSNDBC.**
DSN2CAT.DSNDBC.**) -
(DSN1CAT.BSDS*.**
DSN2CAT.BSDS*.** ) -
)
/*
//* RENUNC(DSN2CAT)
MOVE Datasets
//STEP2 EXEC PGM=ADRDSSU,REGION=0M PARM=('TYPRUN=NORUN')
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *
COPY
-
DATASET(
-
INCLUDE ( (DSN1CAT.DSNDBC.** )) -
ALLEXCP -
PROCESS(SYS1) -
ALLDATA(*) -
OPTIMIZE(4) -
RENUNC(DSN2CAT) -
DELETE PURGE CATALOG -
TOL(ENQF)
/*
DELETE
Datasets :
Delete Datasets USER.DATA1.** and
USER.DATA2.**
It is slower then VSAM Delete but more flexible for include
Datasets
//STEP01 EXEC
PGM=ADRDSSU,REGION=0M
PARM=('TYPRUN=NORUN')
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//OUTFILE
DD DUMMY <--
BIT Eimer
//SYSIN DD *
DUMP
-
OUTDDNAME(OUTFILE)
-
DATASET(
INCLUDE(
-
USER.DATA1.** -
USER.DATA2.**
-
) )
-
TOL(ENQF) -
DELETE
PURGE -
SHARE -
WAIT(0,0)
/*
Defrag VOLUMES
//DEFRAG1 EXEC PGM=ADRDSSU,REGION=8M
//SYSPRINT DD SYSOUT=*
//<YOURVOL>1 DD
DISP=SHR,UNIT=3390,VOL=SER=<YOURVOL>1
//<YOURVOL>2 DD
DISP=SHR,UNIT=3390,VOL=SER=<YOURVOL>2
//<YOURVOL>3 DD
DISP=SHR,UNIT=3390,VOL=SER=<YOURVOL>3
//<YOURVOL>4 DD
DISP=SHR,UNIT=3390,VOL=SER=<YOURVOL>4
//<YOURVOL>5 DD
DISP=SHR,UNIT=3390,VOL=SER=<YOURVOL>5
//SYSIN DD *
DEFRAG DDNAME(<YOURVOL>1)
DEFRAG DDNAME(<YOURVOL>2)
DEFRAG DDNAME(<YOURVOL>3)
DEFRAG DDNAME(<YOURVOL>4)
DEFRAG DDNAME(<YOURVOL>5)
/*
Convert volumes to SMS :
//***************************************************************
//* CONVERT DASD VOLUME AND ALL DATA SETS
TO SMS CONTROL
//***************************************************************
//ADRDSSU EXEC PGM=ADRDSSU,REGION=0K
//DBWRK1 DD
UNIT=SYSALLDA,VOL=SER=DBWRK1,DISP=SHR
//DBWRK2 DD
UNIT=SYSALLDA,VOL=SER=DBWRK2,DISP=SHR
//DBWRK3 DD
UNIT=SYSALLDA,VOL=SER=DBWRK3,DISP=SHR
//DBWRK4 DD
UNIT=SYSALLDA,VOL=SER=DBWRK4,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
CONVERTV SMS DDNAME(DBWRK1)
CONVERTV SMS DDNAME(DBWRK2)
CONVERTV SMS DDNAME(DBWRK3)
CONVERTV SMS DDNAME(DBWRK4)
/*
Convert volumes to NONSMS :
//*******************************************************************
//* CONVERT DASD VOLUME AND ALL DATA SETS
TO NONSMS CONTROL
//*******************************************************************
//ADRDSSU EXEC PGM=ADRDSSU,REGION=0K
//DBWRK1 DD
UNIT=SYSALLDA,VOL=SER=DBWRK1,DISP=SHR
//DBWRK2 DD
UNIT=SYSALLDA,VOL=SER=DBWRK2,DISP=SHR
//DBWRK3 DD
UNIT=SYSALLDA,VOL=SER=DBWRK3,DISP=SHR
//DBWRK4 DD
UNIT=SYSALLDA,VOL=SER=DBWRK4,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
CONVERTV NONSMS DDNAME(DBWRK1)
CONVERTV NONSMS DDNAME(DBWRK2)
CONVERTV NONSMS DDNAME(DBWRK3)
CONVERTV NONSMS DDNAME(DBWRK4)
/*
CopyDump :
//BACKUP DD DISP=SHR,DSN=USER.DUMP.FILE1
//COPY1 DD DISP=(NEW,CATLG),USER.DUMP.FILE1,
// SPACE=(CYL,(200,200),RLSE)
//COPY1 DD DISP=(NEW,CATLG),USER.DUMP.FILE1,
// SPACE=(CYL,(200,200),RLSE)
//SYSIN DD *
COPYDUMP -
INDD(BACKUP) -
OUTDD(COPY1,COPY2)
/*
Compress PO Datasets on a Volume :
//STEP1 EXEC PGM=ADRDSSU
//SYSPRINT DD SYSOUT=A
//SYSIN DD *
COMPRESS
-
DYNAM(VOL001) -
EXCLUDE(SYS1.**) -
BY((DSCHA EQ 0))
/*
Release Space :
//STEP1 EXEC PGM=ADRDSSU
//SYSPRINT DD SYSOUT=A
//SYSIN DD *
RELEASE INCLUDE(**) -
DYNAM(VOL001) -
MINTRKS(10)
/*