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
 

 

REXX to get the maximum volume occupied by VSAM, IAM, PS, PD
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
tamal_babu

New User


Joined: 06 Feb 2006
Posts: 17
Location: Kolkata

PostPosted: Wed Nov 25, 2009 11:09 pm    Post subject: REXX to get the maximum volume occupied by VSAM, IAM, PS, PD
Reply with quote

My requirement is to write a REXX to get the last updation date and the space used by all the datasets with HLQ.* and sort them on descending order, ie the datasets with most consumed TRACKS will come first. The datasets used in our mainframe are KSDS, Normal PS, PDS and IAM. How can I accomplish that ? Will same command work on VSAM and IAM ? Can u pls help with the commands to be written in REXX ?
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Wed Nov 25, 2009 11:14 pm    Post subject: Reply to: REXX to get the maximum volume occupied by VSAM, I
Reply with quote

use the DCOLLECT and/or the ISMF dialogs and reporting facilities
search the forums with DCOLLECT and ISMF and You will find quite bit of good ideas

the issue is really sms related,
with very little REXX content so I will delete the same post in the rexx section

/pickiness on ( You being used as an impersonal entity )
a proper requirement shuld only specify the result, in this case a report
specifying also the tool implies that You have already evaluated the alternatives with the proper competence
and made the best choice based on product functionality, available skills, time and material
so there should not be the need to ask for code or step by step how to's icon_biggrin.gif
Back to top
View user's profile Send private message
tamal_babu

New User


Joined: 06 Feb 2006
Posts: 17
Location: Kolkata

PostPosted: Wed Nov 25, 2009 11:42 pm    Post subject: Reply to: REXX to get the maximum volume occupied by VSAM, I
Reply with quote

Thanks...
1) Can u pls tell me how to use DCOLLECT for VSA,. PS& IAM Separately ? What is the syntax of DCOLLECT in REXX ?

2) How to get all the datasets with high level qualifier of HLQ.* in a stem variable in REXX ? will LISTCAT help ?

Can u pls send me a sample REXX depicting the above 2 scenarios ?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Wed Nov 25, 2009 11:50 pm    Post subject:
Reply with quote

Tamal, did you even read enrico's post? REXX is not required to do what you're asking, and probably will complicate more than help. If you click on the manuals link at the top of the page, find the VSAM Services for DFSMS manual in the Tools and Data Access Methods section, and then open it up to chapter 11, you can read all about DCOLLECT. Your site support group probably can provide a lot of information as well.
Back to top
View user's profile Send private message
tamal_babu

New User


Joined: 06 Feb 2006
Posts: 17
Location: Kolkata

PostPosted: Wed Nov 25, 2009 11:59 pm    Post subject: Reply to: REXX to get the maximum volume occupied by VSAM, I
Reply with quote

I undestood u guys and hv read all ur esteemed comments...But the problem is I will not have access to execute DCOLLECT. Thanks anyway...i will contact my site support group...Sorry for bothering...
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Thu Nov 26, 2009 12:05 am    Post subject:
Reply with quote

Quote:
But the problem is I will not have access to execute DCOLLECT
So you cannot execute IDCAMS?
Back to top
View user's profile Send private message
tamal_babu

New User


Joined: 06 Feb 2006
Posts: 17
Location: Kolkata

PostPosted: Thu Nov 26, 2009 12:09 am    Post subject: Reply to: REXX to get the maximum volume occupied by VSAM, I
Reply with quote

Also, IDCAMS with DCOLLECT works for a specified volume...I want to get the DASD used space for specified datasets(all datasets starting with a particulat HLQ)...How do i do that ?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Thu Nov 26, 2009 12:37 am    Post subject:
Reply with quote

VOLUME(*) works fine for my DCOLLECT -- then you have to select the HLQ you want.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1238
Location: Richfield, MN, USA

PostPosted: Thu Nov 26, 2009 3:50 am    Post subject:
Reply with quote

enrico, you forgot to turn "pickiness" off. icon_lol.gif
Back to top
View user's profile Send private message
tamal_babu

New User


Joined: 06 Feb 2006
Posts: 17
Location: Kolkata

PostPosted: Thu Nov 26, 2009 11:22 am    Post subject: Reply to: REXX to get the maximum volume occupied by VSAM, I
Reply with quote

Thanks a lot!!! DCOLLECT is working...
Can you please let me know how to interpret DCDUSEFG(used space) and DCDLSTRF(and last ref date) from the DCOLLECT output dataset ?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Nov 26, 2009 12:22 pm    Post subject:
Reply with quote

Everything that you nned to know about interpretation of DCOLLECT records is in the fine manual recommended by Mr. Sample.

I assume that you did read his post and have referenced said manual.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Thu Nov 26, 2009 1:28 pm    Post subject: Reply to: REXX to get the maximum volume occupied by VSAM, I
Reply with quote

Hi Terry
I was writing in Python mode icon_biggrin.gif
where the program structure is governed by indentation
( great language, the indentation approach is the only issue)
but the forum gets rid of the leading blanks, next time I will use the code tags

cheers! enrico
Back to top
View user's profile Send private message
tamal_babu

New User


Joined: 06 Feb 2006
Posts: 17
Location: Kolkata

PostPosted: Thu Nov 26, 2009 2:40 pm    Post subject: Reply to: REXX to get the maximum volume occupied by VSAM, I
Reply with quote

Hi expat, there is no reference of interpretation of dcollect stats from the output datasets in the manual I need to get the filename, space consumed by the file and the last reference date...They are present in PD format.
1) How do i get that ?
2) I am only getting record type 'A' in the Dcollect stats, not getting record type 'D".
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Thu Nov 26, 2009 2:51 pm    Post subject:
Reply with quote

DFSMS Access Method Services for Catalogs SC26-7394 will tell you everything about the DCOLLECT output. (Appendix F)
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Thu Nov 26, 2009 2:54 pm    Post subject: Reply to: REXX to get the maximum volume occupied by VSAM, I
Reply with quote

what are You using to process the dcollect data..

here is a link to a dfsort page which has very good approach

http://www-01.ibm.com/support/docview.wss?rs=114&uid=isg3T7000081#sy

click on ==> Download the DCOLLECT symbol mappings

download it to Your workstation,unzip it an browse it with a text editor

it contains the record layouts and some samples

very effective

if You stick to the rexx approach

download from
http://cbttape.org
the file 206 DCOLLECT REXX EXECS for samples
http://cbttape.org/ftp/cbt/CBT206.zip
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Nov 26, 2009 4:44 pm    Post subject:
Reply with quote

even dfsort has some dcollect extracts and reports.

bottom of page by Papers and Examples.
Back to top
View user's profile Send private message
tamal_babu

New User


Joined: 06 Feb 2006
Posts: 17
Location: Kolkata

PostPosted: Thu Nov 26, 2009 7:03 pm    Post subject: Reply to: REXX to get the maximum volume occupied by VSAM, I
Reply with quote

Thanks a lot Enrico !!!!!! It works... only VOLUME(*) with DCOLLECT is taking huge I/O and CPU...
Back to top
View user's profile Send private message
rahulbank

New User


Joined: 25 Sep 2008
Posts: 66
Location: Bengaluruuuuuu

PostPosted: Wed Jan 06, 2010 3:50 pm    Post subject:
Reply with quote

Hi Folks,

I ran the DCOLLECT with VOLUME(SYM*) and scdsname(someething)

After this I am trying to get an output which shows dsn name and last ref date and space occupied.

I ran a program after that:

//DCOLEX1 JOB ...
//******************************************************************
//* DFSORT/ICETOOL STORAGE ADMINISTRATOR EXAMPLES
//* DCOLLECT EXAMPLE 1: VSAM REPORT
//* IDENTIFIES NON-SMS-MANAGED VSAM MULTIVOLUME DATA SETS
//* AND KEY-RANGE VSAM DATA SETS.
//* NOTES: (1) IF DUPLICATE VSAM DATA SETS ARE PRESENT THEY
//* WILL BE LISTED ALONG WITH THE MULTIVOLUME DATA SETS
//* (2) KEY-RANGE VSAM DATA SETS WILL NOT BE LISTED ALONG
//* WITH THE MULTIVOLUME DATA SETS, BUT WILL BE LISTED
//* SEPARATELY.
//******************************************************************
//STEP1 EXEC PGM=ICETOOL
//DFSMSG DD SYSOUT=*
//TOOLMSG DD SYSOUT=*
//INDD DD DSN=Y176398.R12.DCOLFESS,DISP=SHR
//OUTDD1 DD DSN=&&TEMP1,DISP=(NEW,PASS),LIKE=Y176398.R12.DCOLFESS
//OUTDD2 DD DSN=&&TEMP2,DISP=(NEW,PASS),LIKE=Y176398.R12.DCOLFESS
//REPORT1 DD SYSOUT=*
//REPORT2 DD SYSOUT=*
//TOOLIN DD *


and it fails saying

STEP1 OUTDD1 - UNIT FIELD SPECIFIES INCORRECT DEVICE NAME
STEP1 - STEP WAS NOT EXECUTED.

I dont see any unit anywhere in my jcl...can someone advice please..

Is there any other way for me to get dsn's starting with a particular 3 alphabets and their last refernce date and space occupied...
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Wed Jan 06, 2010 5:46 pm    Post subject:
Reply with quote

This is more of a site-specific issue; probably your site needs a UNIT for a temporary data set (try UNIT=SYSDA or UNIT=SYSALLDA). If those don't work, contact your site support group for the unit to put on your OUTDD1 statement (OUTDD2 will need it as well).
Back to top
View user's profile Send private message
rahulbank

New User


Joined: 25 Sep 2008
Posts: 66
Location: Bengaluruuuuuu

PostPosted: Thu Jan 07, 2010 12:19 am    Post subject:
Reply with quote

Yes that worked Robert Thanks(I used unit=3390)...I have tried mutiple ways of sorting the o/p of dcollect....Is there a standard way that can be applied to o/p of dcollect o/p to get DSN, used space, alloc space and last referenced date
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
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
No new posts BWO option in VSAM blayek CICS 3 Sat Nov 05, 2016 10:47 am
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
This topic is locked: you cannot edit posts or make replies. Need to code a Rexx PGM sundaram.naveen CLIST & REXX 18 Thu Oct 06, 2016 6:45 pm


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