IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to list PS and PDS seperatly from VTOC


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Prasanna Kamthekar

New User


Joined: 03 Aug 2009
Posts: 14
Location: Pune

PostPosted: Fri Jun 11, 2010 12:10 am
Reply with quote

Hi,

My requirement is I want to list PS and PDS seperatly form VTOC.
And then delete all PS having starting qualifier XXXXXX.
It would be good if we can do this using JCL only.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Fri Jun 11, 2010 12:34 am
Reply with quote

Quote:
It would be good if we can do this using JCL only.
Sorry, it is not possible to do this using JCL only. JCL does one thing and only one thing -- it executes programs. If you had indicated you wanted to use DCOLLECT in a job to extract the data, then continue with another program to analyze the data and set up the delete statements, then IDCAMS to execute the delete statements -- that would be possible. But using JCL only nothing can be accomplished since JCL does nothing but execute programs.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Fri Jun 11, 2010 1:43 am
Reply with quote

The best way would be to use ADRDSSU

see
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DGT2U261/CCONTENTS?SHELF=DGT2BK71&DN=SC35-0423-09&DT=20080128192112

for the filtering
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/dgt2u261/3.2.2?SHELF=DGT2BK71&DT=20080128192112&CASE=

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/dgt2u261/3.2.4?ACTION=MATCHES&REQUEST=filtering&TYPE=FUZZY&SHELF=DGT2BK71&DT=20080128192112&CASE=&searchTopic=TOPIC&searchText=TEXT&searchIndex=INDEX&rank=RANK&ScrollTOP=FIRSTHIT#FIRSTHIT

and
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DGT2S261/CCONTENTS?SHELF=DGT2BK71&DN=SC26-7402-09&DT=20080128160125

and here is a sample job REVIEW AND MODIFY ACCORDING TO YOUR NEEDS

Code:

//jobname  JOB ...   
//        EXEC PGM=ADRDSSU,PARM='TYPRUN=NORUN'                 
//SYSPRINT  DD SYSOUT=*                             
//DUMMYDS   DD DUMMY,
//             DCB=(RECFM=VB,LRECL=27994,BLKSIZE=27998)
//SYSIN     DD *                                     
  DUMP DATASET(INCLUDE(Your_Hlq.**)   -
               BY(DSORG,EQ,SAM) ) -
       OUTDDNAME(DUMMYDS) -                               
       DELETE PURGE                                   
/*                                                     


simple effective

the parm tells to run telling what dfdss is going to do
take away the parm and it will do it
Back to top
View user's profile Send private message
Prasanna Kamthekar

New User


Joined: 03 Aug 2009
Posts: 14
Location: Pune

PostPosted: Fri Jun 11, 2010 10:01 am
Reply with quote

Thank you very much!
Let me try. Will get back to you soon.
Back to top
View user's profile Send private message
Rusikesh

New User


Joined: 04 Feb 2010
Posts: 25
Location: United States

PostPosted: Fri Jun 11, 2010 3:51 pm
Reply with quote

Hi All,
The ideas is good one, I tried for the same, it's working.
But, since we are using DUMP here so first it copy all the mentioned qualifier files and after that it deletes the copied files, which is not cost efficient.
Is there any way, so that we can directly delete all the mentioned qualifier files without copying?
please share your comments
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Fri Jun 11, 2010 3:53 pm
Reply with quote

Have we not heard of DD DUMMY
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Fri Jun 11, 2010 4:03 pm
Reply with quote

Quote:
... since we are using DUMP here so first it copy all the mentioned qualifier files and after that it deletes the copied files,

Please refrain from posting wrong conclusions/considerations

The job as posted is by any point of view the most cost efficient solution

I' ll leave to You the pleasure of finding out why!
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Fri Jun 11, 2010 4:08 pm
Reply with quote

Quote:
Have we not heard of DD DUMMY


about DD DUMMY maybe yes, about reading the manuals certainly not icon_biggrin.gif
Back to top
View user's profile Send private message
Rusikesh

New User


Joined: 04 Feb 2010
Posts: 25
Location: United States

PostPosted: Fri Jun 11, 2010 8:19 pm
Reply with quote

thanks for your comment.
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 420
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Fri Jun 11, 2010 8:49 pm
Reply with quote

Are you actually looking for a single volume's contents (VTOC) or all cataloged datasets for a particular HLQ?
Back to top
View user's profile Send private message
Rusikesh

New User


Joined: 04 Feb 2010
Posts: 25
Location: United States

PostPosted: Sat Jun 12, 2010 9:31 am
Reply with quote

I am looking for the all cataloged datasets for a particular HLQ. All these datasets are available on DASD.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Sat Jun 12, 2010 9:56 am
Reply with quote

Hello,

What happened when you ran the sample job Enrico provided (// EXEC PGM=ADRDSSU,PARM='TYPRUN=NORUN' )?

If you have not run this - do so now and post anything that is not clear from the run. . .
Back to top
View user's profile Send private message
Rusikesh

New User


Joined: 04 Feb 2010
Posts: 25
Location: United States

PostPosted: Sat Jun 12, 2010 11:06 am
Reply with quote

HELLO,
I tried for the same i.e. PARM='TYPRUN=NORUN' . It only select the files. not deleting the files.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Sat Jun 12, 2010 11:28 am
Reply with quote

Rusihesh wrote:
HELLO,
I tried for the same i.e. PARM='TYPRUN=NORUN' . It only select the files. not deleting the files.
Mmmmmmmmmmmmmmmmm, interesting that icon_rolleyes.gif

Have you bothered to find and read the manual to see why.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Sat Jun 12, 2010 11:38 am
Reply with quote

Hello,

Quote:
I tried for the same i.e. PARM='TYPRUN=NORUN' . It only select the files. not deleting the files.
Correct. . . Did you try to read the "instructions" given by Enrico?

Go back - re-read (actually, read for the first time as you have not yet done so) and then do as suggested. . .
Back to top
View user's profile Send private message
Rusikesh

New User


Joined: 04 Feb 2010
Posts: 25
Location: United States

PostPosted: Sat Jun 12, 2010 12:29 pm
Reply with quote

Hello,
I gone through the links but not able to conclude anything.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Sat Jun 12, 2010 1:43 pm
Reply with quote

Look at the last of the links provided by Enrico.

Start at section 2 - Chapter 22

Read, re-read, re-read again because evrything that you need to know is in there, because I know the book that his link references. It will take you a couple of hours, maybe more, maybe less, but all of your questions will be answered for this topic and also the one in the SMS forum.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Sat Jun 12, 2010 9:06 pm
Reply with quote

Hello,

I still wonder that you did not use the simple directions given. . . icon_confused.gif

As Expat suggests, you will get complete info from the documentation, but Enrico hs posted everything you need to do what you want.

As you are not understanding this well at all, i strongly suggest you create a test hlq for testing this and not simply destroy real data.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Sun Jun 13, 2010 2:20 am
Reply with quote

Rusikesh wrote:
It only select the files. not deleting the files.
So, you were ready to delete a bunch of files without checking first exactly which files ?
I hope the backup guy is a good friend of yours. icon_wink.gif
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Sun Jun 13, 2010 5:04 am
Reply with quote

Rusikesh whose occuption is 'Developer' and whose mainfrain skills include jcl,cics,db2 and cobol, wrote:
Hello,
I gone through the links but not able to conclude anything.
I am getting a little afraid............(no grin).........
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Sun Jun 13, 2010 5:32 am
Reply with quote

Quote:
little afraid
Very afraid. . . icon_neutral.gif

Hard to imagine the amount of damage that a runaway, untested, misunderstood, automated "surgery" process might cause.

Unfortunately, many places that allow a beginner to do this also have poor security in place. . .

d
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 420
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Sun Jun 13, 2010 5:44 am
Reply with quote

good lord, just read the last 2 lines of Enrico's first post! (just above his signature line)
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Sun Jun 13, 2010 8:39 am
Reply with quote

Hi Dave,

Yup, that is what makes this s-s-scary. . .

And the potential topic next week asking if there is a way ge get back 8,427 files that were unintentionally deleted. . .

d
Back to top
View user's profile Send private message
Victor Niu

New User


Joined: 11 Mar 2010
Posts: 59
Location: China,Shanghai

PostPosted: Sun Jun 13, 2010 8:46 am
Reply with quote

very useful topics for me,thanks!!!
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 420
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Sun Jun 13, 2010 2:29 pm
Reply with quote

Dick,

aren't they hidden in the dummy file? icon_rolleyes.gif

I'm checking my insurance policies and credit cards more closely. icon_lol.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts How to create a list of SAR jobs with... CA Products 3
No new posts Build dataset list with properties us... PL/I & Assembler 4
No new posts list pds members name starting with xyz CLIST & REXX 11
No new posts List of quiesced jobs JCL & VSAM 3
No new posts how to get list of all VSAM/non-VSAM ... JCL & VSAM 13
Search our Forums:

Back to Top