IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Is there any command or JCL to empty out the PDS


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Govindaswamy

New User


Joined: 26 Dec 2007
Posts: 5
Location: india

PostPosted: Fri Jun 13, 2008 10:04 am
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Jun 13, 2008 10:47 am
Reply with quote

Delete and reallocate the PDS via the ISPF OPTION 3.2
Back to top
View user's profile Send private message
mohitsaini
Warnings : 1

New User


Joined: 15 May 2006
Posts: 92

PostPosted: Fri Jun 13, 2008 11:35 am
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Jun 13, 2008 11:52 am
Reply with quote

See these three previous topics:

www.ibmmainframes.com/viewtopic.php?t=16738
www.ibmmainframes.com/viewtopic.php?t=25611
www.ibmmainframes.com/viewtopic.php?t=10513
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Fri Jun 13, 2008 3:25 pm
Reply with quote

govind,

Try using the following command after opening the PDS.

Code:
S * D


This would delete all the members inside the PDS.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
No new posts LTJ command CA Products 4
No new posts Query on edit primary command CLIST & REXX 5
Search our Forums:

Back to Top