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
 

 

deleting all the members of a PDS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
kalais

New User


Joined: 18 Apr 2006
Posts: 22

PostPosted: Wed Apr 19, 2006 5:15 pm    Post subject: deleting all the members of a PDS
Reply with quote

hi,


i want to delete all members of a PDS retaining the empty PDS.
how i can do that in
1.ISPF command/line command
as well as
2.in JCL
Back to top
View user's profile Send private message

mubs55

New User


Joined: 19 Apr 2006
Posts: 12

PostPosted: Wed Apr 19, 2006 6:55 pm    Post subject: Delete all members of a PDS
Reply with quote

ISPF command:

TSO DEL 'TEST.PDS'

JCL:
//EDSJB006 JOB ,CLASS=A,MSGCLASS=A,MSGLEVEL=(1,1),
// NOTIFY=&SYSUID
//DELPDS EXEC PGM=IEFBR14
//INFILE DD DSN=TEST.PDS,DISP=(MOD,DELETE,DELETE)
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Wed Apr 19, 2006 9:02 pm    Post subject: Re: deleting all the members of a PDS
Reply with quote

kalais, there is no direct TSO command or ISPF application to do what you want. However, you have a few options that you can look into:

1. Many of the third-party PDS management tools (PDSFAST and PDSTOOLS for example) contain a PDS directory empty command. If you have one of those tools, look into using it.

2. If you know Assembler, I understand that the STOW macro can be used to clear the PDS directory.

3. There are freeware tools available on sites such as the CBT Tape (http://www.cbttape.org/) that do what you want.

4. You can code an easy set of ISPF services to open a PDS, loop through each member, delete each member, close the PDS, and compress the now empty PDS. You can use these services:

LMINIT for SHRW
LMOPEN for OUTPUT
<loop>
LMMLIST
LMMDEL
<endloop>
LMCLOSE
LMFREE
LMINIT for EXCLU
LMCOMP
LMFREE
Back to top
View user's profile Send private message
pspreddy

New User


Joined: 14 Mar 2006
Posts: 24
Location: Chicago

PostPosted: Thu Apr 20, 2006 1:15 am    Post subject:
Reply with quote

Hi kalais,

You can use the SCRATCH command to delete as many members as you want from a PDS (even all the members)

Below is the example code

//SCRATCH3 JOB (TEST),'SCRATCH PDS Members',CLASS=U,MSGCLASS=H
//SCRATCH EXEC PGM=IKJEFT01
//STEPLIB DD DSN=<SCRATCH Load Library>,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
/* Scratch a single member */
SCRATCH 'GSFSOFT.FILE183.PDS(FASTPATH)'

/* Scratch several members and compress */
SCRATCH 'GSFSOFT.FILE183.PDS' +
MEMBERS(FASTPATH,COMPR*) +
COMPRESS

/* Scratch all the members and compress */
SCRATCH 'GSFSOFT.TEST.LOAD' MEMBERS(*)
/*

Try it and let me know in case you face any issues

Thanks
Shiva
Back to top
View user's profile Send private message
Dariusz
Warnings : 1

New User


Joined: 11 Aug 2005
Posts: 27
Location: POLAND

PostPosted: Thu Apr 20, 2006 1:52 pm    Post subject: By ISPF.
Reply with quote

Hi.
For this purpose i usuelly use this method:
-from ISPF primary option menu i select 3.4 (dslist)
-when i've got just library i send i (information) and after that i delete
-by function 3.2 i create new library with the same parameters as old
Regards.
Back to top
View user's profile Send private message
r2k1984

New User


Joined: 21 Jun 2005
Posts: 69
Location: chennai

PostPosted: Thu Apr 20, 2006 4:53 pm    Post subject: hai
Reply with quote

i think u can do like this


// jobcard
//step1 exec pgm=iebcopy
//sysut1 dd dsn= input1.pds , disp=(shr,delete,delete)
//sysut2 dd dsn=input1.pds,disp=(shr,delete.delete)
//
this will work.try thius and tell
Back to top
View user's profile Send private message
Benjamin.L

New User


Joined: 11 Apr 2006
Posts: 17
Location: DL.PRC

PostPosted: Fri Apr 21, 2006 8:22 am    Post subject:
Reply with quote

pspreddy wrote:

/* Scratch several members and compress */
SCRATCH 'GSFSOFT.FILE183.PDS' +
MEMBERS(FASTPATH,COMPR*) +
COMPRESS



Hi pspreddy,

1.Could u pls explain why to use 'COMPRESS' in the end?
2.MEMBERS(FASTPATH,COMPR*) , why to use COMPR* ?

THX A LOT!
Back to top
View user's profile Send private message
pspreddy

New User


Joined: 14 Mar 2006
Posts: 24
Location: Chicago

PostPosted: Sat Apr 22, 2006 6:32 am    Post subject: Re: deleting all the members of a PDS
Reply with quote

Hi Benjamin,

When members are scratched from a PDS, their space can't be used again until something called "compression" is done to the PDS.

We generally compress the PDs when we run out of space.COMPRESS will release all unused space in your PDS

Thanks
Shiva
Back to top
View user's profile Send private message
mf_user
Currently Banned

New User


Joined: 05 Jan 2006
Posts: 47

PostPosted: Tue May 09, 2006 1:16 pm    Post subject:
Reply with quote

Sorry. It does not work...........:-(
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 Single step utility for compare and u... ramprakashn JCL & VSAM 5 Fri Apr 29, 2016 3:43 pm
No new posts Differences between copying members b... E.LAI TSO/ISPF 8 Wed Mar 30, 2016 12:35 pm
No new posts Savings by Deleting Unused datasets swathykrishnan All Other Mainframe Topics 13 Fri Jul 10, 2015 6:26 pm
No new posts JCL to replace string in all PDS members bhamarekm All Other Mainframe Topics 8 Thu May 28, 2015 8:44 pm
No new posts Issue with copying PDS members to ano... Senthilkumar k CLIST & REXX 13 Mon Apr 20, 2015 1:28 pm


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