MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Delete a member from a PDS

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
abhayasahoo
Beginner


Joined: 04 Dec 2002
Posts: 8
Topics: 6

PostPosted: Wed Aug 13, 2003 2:27 pm    Post subject: Delete a member from a PDS Reply with quote

I have a requirement in which I have to delete specific members from different PDSs. Can I do it with a JCL ?
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Wed Aug 13, 2003 5:07 pm    Post subject: Reply with quote

abhayasahoo,

Try this,

Code:

//DELPMEM  EXEC PGM=IDCAMS                     
//SYSPRINT DD SYSOUT=*
//PDS      DD DSN=YOUR PDS,               
//            DISP=SHR
//SYSIN
  DELETE 'YOUR.PDS(membername)' FILE(PDS)   
/*


Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Brian
Beginner


Joined: 12 Aug 2003
Posts: 95
Topics: 6

PostPosted: Wed Aug 13, 2003 10:28 pm    Post subject: Reply with quote

You could also try IEHPROGM

Code:

//DELETE EXEC PGM=IEHPROGM
//SYSPRINT      DD    SYSOUT=*
//SYSIN            DD    *
 SCRATCH DSNAME=MQ77ABW.AMIGA.PROCESS,MEMBER=TALT01,VOL=3390=HAX933
/*
//*


hope this helps
Back to top
View user's profile Send private message
mf_user
Intermediate


Joined: 01 Jun 2003
Posts: 372
Topics: 105

PostPosted: Tue May 09, 2006 3:01 am    Post subject: not deleted. Reply with quote

Hi,

I used the below JCL to delete a member in a PDS but it failed.....Sad

I tried the DSN with both quotes and without quotes but got the same result.

Code:

//XXXXXXPD JOB (XXXXXX,XXXX),                                       
//             'DELETE PDS MEMBERS',                               
//             CLASS=X,                                             
//             MSGCLASS=Y,                                         
//             NOTIFY=XXXXXX                                       
//*                                                                 
//SCRATCH EXEC PGM=IEHLIST                                         
//SYSPRINT DD SYSOUT=*                                             
//SYSIN    DD *                                                     
SCRATCH DSNAME='XXXXX.XXXXXX.XXXXX',MEMBER=XXXXXXX,VOL==3390=XXXXX7
/*                                                                 
//                                                                 


Sysprint shown the below:

Code:

INVALID CONTROL CARD---SCRATCH DSNAME='XXXXX.XXXXXX.XXXXX',MEMBER=XXXXXXX,VOL==3390=XXXXX7


Any help??

Also, would you please let me know how to delete all the members of a PDS using any JCL utility? I searched the forum for string "delete all members of a PDS" but couldn't find a relavant post.

Thanks in advance for your time.
_________________
MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
==
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue May 09, 2006 8:20 am    Post subject: Reply with quote

Quote:

I used the below JCL to delete a member in a PDS but it failed.....


mfuser,

If your intention is to delete a member why not use the IDCAMS step mentioned in my post? Did you try that?

Quote:

Also, would you please let me know how to delete all the members of a PDS using any JCL utility? I searched the forum for string "delete all members of a PDS" but couldn't find a relavant post.


There is no utility to delete all the members of the JCL. The simplest way to delete all the members of the PDS is

1. Open the PDS in EDIT mode
2. type the following at the command prompt
Code:

S * D

3. Set the delete confirmation off and press enter
4. All the members are deleted.

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Bill Dennis
Advanced


Joined: 03 Dec 2002
Posts: 579
Topics: 1
Location: Iowa, USA

PostPosted: Tue May 09, 2006 8:23 am    Post subject: Reply with quote

See your PGM name? IEHLIST is incorrect, use IEHPROGM.

To delete all members, you can delete and reallocate the PDS much easier. We copied a pgm (from CBT collection??) called RESETDS to delete all members and remove "gas".

See www.CBTtape.org for many MVS shareware programs.
_________________
Regards,
Bill Dennis

Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity.


Last edited by Bill Dennis on Tue May 09, 2006 10:12 am; edited 1 time in total
Back to top
View user's profile Send private message
mf_user
Intermediate


Joined: 01 Jun 2003
Posts: 372
Topics: 105

PostPosted: Tue May 09, 2006 8:34 am    Post subject: Reply with quote

Thanks Kolusu. I was aware of the S * D command but was looking to do it JCL way.

Thanks a lot Bill Dennis. So, I was using wrong utility..... Embarassed Sad

I will try my hand at CBTtape.org to find out if it is available.
_________________
MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
==
Back to top
View user's profile Send private message Send e-mail
abhishek_snn
Beginner


Joined: 24 Aug 2006
Posts: 16
Topics: 5

PostPosted: Mon Nov 27, 2006 4:59 am    Post subject: Reply with quote

any idea how to delete a long list of members (listed in a file) from a PDS
?????

Abhishek
Back to top
View user's profile Send private message
bauer
Intermediate


Joined: 10 Oct 2003
Posts: 317
Topics: 50
Location: Germany

PostPosted: Mon Nov 27, 2006 6:18 am    Post subject: Reply with quote

abhishek_snn,


delete members from pds listed in an file:

Write some lines code to read the file, add the delete command, write the results to a file and call idcams using the modified file as input.

May be you can use a IBM utility to add some charcters to each record of your memberlist.

bauer
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Mon Nov 27, 2006 6:18 am    Post subject: Reply with quote

abhishek_snn,

generate the delete cards for all the pds members as follows

Code:


  DELETE 'YOUR.PDS(membername1)' FILE(PDS)
  DELETE 'YOUR.PDS(membername2)' FILE(PDS)
..



and pass this as sysin to IDCAMS step.


Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group