View previous topic :: View next topic |
Author |
Message |
abhayasahoo Beginner
Joined: 04 Dec 2002 Posts: 8 Topics: 6
|
Posted: Wed Aug 13, 2003 2:27 pm Post subject: Delete a member from a PDS |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Wed Aug 13, 2003 5:07 pm Post subject: |
|
|
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 |
|
 |
Brian Beginner
Joined: 12 Aug 2003 Posts: 95 Topics: 6
|
Posted: Wed Aug 13, 2003 10:28 pm Post subject: |
|
|
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 |
|
 |
mf_user Intermediate

Joined: 01 Jun 2003 Posts: 372 Topics: 105
|
Posted: Tue May 09, 2006 3:01 am Post subject: not deleted. |
|
|
Hi,
I used the below JCL to delete a member in a PDS but it failed.....
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Tue May 09, 2006 8:20 am Post subject: |
|
|
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
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 |
|
 |
Bill Dennis Advanced

Joined: 03 Dec 2002 Posts: 579 Topics: 1 Location: Iowa, USA
|
Posted: Tue May 09, 2006 8:23 am Post subject: |
|
|
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 |
|
 |
mf_user Intermediate

Joined: 01 Jun 2003 Posts: 372 Topics: 105
|
Posted: Tue May 09, 2006 8:34 am Post subject: |
|
|
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.....
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 |
|
 |
abhishek_snn Beginner
Joined: 24 Aug 2006 Posts: 16 Topics: 5
|
Posted: Mon Nov 27, 2006 4:59 am Post subject: |
|
|
any idea how to delete a long list of members (listed in a file) from a PDS
?????
Abhishek |
|
Back to top |
|
 |
bauer Intermediate
Joined: 10 Oct 2003 Posts: 317 Topics: 50 Location: Germany
|
Posted: Mon Nov 27, 2006 6:18 am Post subject: |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Mon Nov 27, 2006 6:18 am Post subject: |
|
|
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 |
|
 |
|
|