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

REXX to get the maximum volume occupied by VSAM, IAM, PS, PD


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Nov 25, 2009 11:14 pm
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
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Nov 25, 2009 11:50 pm
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
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Nov 26, 2009 12:05 am
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
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Nov 26, 2009 12:37 am
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: 1249
Location: Richfield, MN, USA

PostPosted: Thu Nov 26, 2009 3:50 am
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
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: 8797
Location: Welsh Wales

PostPosted: Thu Nov 26, 2009 12:22 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Nov 26, 2009 1:28 pm
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
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: 2481
Location: Netherlands, Amstelveen

PostPosted: Thu Nov 26, 2009 2:51 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Nov 26, 2009 2:54 pm
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

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
cbttape.org
the file 206 DCOLLECT REXX EXECS for samples
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
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
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
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Jan 06, 2010 5:46 pm
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
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
PeterHolland

Global Moderator


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

PostPosted: Thu Jan 07, 2010 10:56 am
Reply with quote

If you have MXG and SAS installed you can get nice reports from DCOLLECT data.
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:20 pm
Reply with quote

Hi Peter, I totally agree with you this new environment has sas but for some reaons does not have DCDDSNAM or anything like that...I have worked on sas and I agree with you....That is why I am tying this through dcollect which is totally an unknown monster to me...
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Thu Jan 07, 2010 12:23 pm
Reply with quote

PeterHolland wrote:
If you have MXG and SAS installed you can get nice reports from DCOLLECT data.

Peter, methinks you mean SMF data here
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


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

PostPosted: Thu Jan 07, 2010 12:31 pm
Reply with quote

Hi Expat,

I know for sure, MXG has also SAS programs to process DCOLLECT data.
Cause I used that myself.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Thu Jan 07, 2010 12:35 pm
Reply with quote

Oh well, old dogs, new tricks ..................................... icon_redface.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 Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top