Is there a job can delete all members from a PDS?



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Is there a job can delete all members from a PDS?

Postby wangy » Fri Nov 23, 2012 6:46 pm

Since the CICS is using the PDS, i can not just delete / define the whole PDS
wangy
 
Posts: 5
Joined: Fri Nov 23, 2012 6:27 pm
Has thanked: 6 times
Been thanked: 0 time

Re: Is there a job can delete all members from a PDS?

Postby enrico-sorichetti » Fri Nov 23, 2012 6:52 pm

if You want to receive good answers it would be wise to adopt a better posting style!

read and meditate on
How To Ask Questions The Smart Way
http://catb.org/~esr/faqs/smart-questions.html
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort

These users thanked the author enrico-sorichetti for the post:
wangy (Sat Nov 24, 2012 10:57 am)
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Is there a job can delete all members from a PDS?

Postby steve-myers » Fri Nov 23, 2012 8:31 pm

Personally I think your question is reasonably clear, as is the topic. The topic has been discussed before; you should review previous postings in this site before opening a new topic

There is no "job" or JCL to accomplish what you want to accomplish. However, since CICS is using the PDS, it is probably unwise to delete all the members; presumably CICS needs at least some of the members to function, or it would not have the PDS allocated to it.

You might want to investigate "file" 713 at www.cbttape.org. However, if the PDS is actually a PDSE, the EMPTYPDS program in the "file" won't work; it requires exclusive control of the data set.

These users thanked the author steve-myers for the post:
wangy (Sat Nov 24, 2012 10:54 am)
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: Is there a job can delete all members from a PDS?

Postby mongan » Fri Nov 23, 2012 9:03 pm

Steve understated when he said it may be unwise to do what you plan on doing, it can be fatal to your CICS programs and may be against company policy - you can get intro big trouble. Is your CICS recycled regulary? So, tell us what you really want to do and why, then we can give you good advice.

These users thanked the author mongan for the post:
wangy (Sat Nov 24, 2012 10:55 am)
User avatar
mongan
 
Posts: 211
Joined: Tue Jan 11, 2011 8:32 pm
Has thanked: 1 time
Been thanked: 5 times

Re: Is there a job can delete all members from a PDS?

Postby enrico-sorichetti » Fri Nov 23, 2012 9:04 pm

Personally I think your question is reasonably clear, as is the topic.


the question was not clear in the initial post ( before being edited )

the title was the same
the text was something like ...
can anybody help me


that' the reason for my comment
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort

These users thanked the author enrico-sorichetti for the post:
wangy (Sat Nov 24, 2012 10:57 am)
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Is there a job can delete all members from a PDS?

Postby Dinesh anbu » Sat Nov 24, 2012 9:41 am

ya by using an idcams utilite


//TCHN267# JOB ABC,NOTIFY=&SYSUID
//STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE TCHN267.VENKY.PDS1(MEM1)
/*
//
Dinesh anbu
 
Posts: 3
Joined: Sat Nov 24, 2012 9:31 am
Has thanked: 0 time
Been thanked: 0 time

Re: Is there a job can delete all members from a PDS?

Postby steve-myers » Sat Nov 24, 2012 10:51 am

Dinesh anbu's job deletes a single member, not all the members. Also, as presented here, it requires exclusive use of the data set for the brief period required to delete the member.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: Is there a job can delete all members from a PDS?

Postby Dinesh anbu » Sat Nov 24, 2012 11:37 am

Better you can use this program

//STEP0200 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//IN DD DUMMY
//OUT DD DSN=XXX.YYY.ZZZ,DISP=OLD
//SYSIN DD *
REPRO IFILE(IN) OFILE(OUT) REPLACE
/*
Dinesh anbu
 
Posts: 3
Joined: Sat Nov 24, 2012 9:31 am
Has thanked: 0 time
Been thanked: 0 time

Re: Is there a job can delete all members from a PDS?

Postby steve-myers » Sat Nov 24, 2012 12:52 pm

I do hope Dinesh anbu actually tested this. If XXX.YYY.ZZZ is a sequential data set, the REPRO command
will replace any existing content with, well, nothing. If XXX.YYY.ZZZ is a PDS, and IDCAMS is stupid, it will make XXX.YYY.ZZZ a sequential data set, and completely destroy the directory. If IDCAMS is smart enough to verify XXX.YYY.ZZZ is a PDS, it should write a diagnostic and do nothing. Oh yes, the DISP=OLD in the JCL requires exclusive control of the data set; the job won't run while CICS is running; but the topic starter wants to run his job while CICS is up.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post