Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Is there any command or JCL to empty out the PDS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Is there any command or JCL to empty out the PDS
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: 6968
Location: porcelain throne

PostPosted: Fri Jun 13, 2008 10:47 am    Post subject:
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    Post subject:
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

Moderator Team Head


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

PostPosted: Fri Jun 13, 2008 11:52 am    Post subject: Reply to: Empty out a PDS
Reply with quote

See these three previous topics:

http://www.ibmmainframes.com/viewtopic.php?t=16738
http://www.ibmmainframes.com/viewtopic.php?t=25611
http://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: 1288
Location: Chennai, India

PostPosted: Fri Jun 13, 2008 3:25 pm    Post subject: Reply to: Empty out a PDS
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Customizing the ISPF HILITE Command Pedro TSO/ISPF 3 Fri Mar 03, 2017 11:49 pm
No new posts Fail to change physical VSAM filename... jacobdng CICS 7 Fri Jan 20, 2017 12:36 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm
No new posts SDSF Command Avtrix CLIST & REXX 4 Fri Sep 30, 2016 11:13 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us