View previous topic :: View next topic
|
Author |
Message |
Govindaswamy
New User
Joined: 26 Dec 2007 Posts: 5 Location: india
|
|
|
|
Hi,
Is there any command or JCL to empty out the PDS.
I need to delete only the members in the PDS and not the PDS. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Delete and reallocate the PDS via the ISPF OPTION 3.2 |
|
Back to top |
|
|
mohitsaini Warnings : 1 New User
Joined: 15 May 2006 Posts: 92
|
|
|
|
Here is the code which I use to create a backup of a PDS. I am sure it can cater to your requirements as well. Please customize it accordingly ...
Code: |
//XM2STSOA JOB (1,1424618),SORI-CPB,CLASS=L,PRTY=1,
// MSGLEVEL=1,MSGCLASS=M,
// NOTIFY=&SYSUID,REGION=0M ,TYPRUN=SCAN
//*
/*ROUTE PRINT R9978
/*JOBPARM ROOM=242C,P=PROCT1
//*
//************ ALLOCATING THE PDS *****************************
//ALLOCATN EXEC PGM=IKJEFT01
//SYSTSPRT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSTSIN DD *
ALLOCATE DATASET('XM2STSO.TEST1.BACKUP4') LIKE ('XM2STSO.TEST1')
ALLOCATE DATASET('XM2STSO.TEST1.BLANK') LIKE ('XM2STSO.TEST1')
//*
//SYSOUT DD SYSOUT=*
//***** COPYING THE MEMBERS FROM THE OLD PDS TO THE NEW PDS ****
//COPYMEMS EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
COPY INDD=INPDS,OUTDD=OUTPDS
/*
//INPDS DD DSN=XM2STSO.TEST1,DISP=SHR
//OUTPDS DD DSN=XM2STSO.TEST1.BACKUP4,DISP=OLD
//*
//* PURPOSE OF THIS STEP IS TO DELETE MEMBS OF THE OLD PDS
//DELMEMBS EXEC PGM=IKJEFT01
//SYSTSPRT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSTSIN DD *
DELETE 'XM2STSO.TEST1'
RENAME 'XM2STSO.TEST1.BLANK' 'XM2STSO.TEST1'
//*
//SYSOUT DD SYSOUT=*
|
If you find any difficulty in understanding it then please let me know.
- Mohit |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
govind,
Try using the following command after opening the PDS.
This would delete all the members inside the PDS. |
|
Back to top |
|
|
|