|
|
| Author |
Message |
pkg23
New User
Joined: 06 Dec 2007 Posts: 12 Location: India
|
|
|
|
I need to free up the unused space for a large number of datasets.
I first need to check if the dataset is <50% Used and then I need to select these datasets and free the unused space.
Thanks
Prashant |
|
| Back to top |
|
 |
References
|
Posted: Wed Jul 09, 2008 6:33 pm Post subject: Re: Free up the dataset space using REXX |
 |
|
|
 |
enrico-sorichetti
Global Moderator
Joined: 14 Mar 2007 Posts: 2648 Location: italy
|
|
|
|
why reinvent the wheel ???
all the brain work can be done by using the ISMF listing and command generation facilities
or directly by using DFDSS RELEASE command
filtering on the dataset name , the dataset organization and the used percentage
- the first time use the NORUN parm to simply look at the work that might be done on a real run |
|
| Back to top |
|
 |
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 3169 Location: Brussels once more ...
|
|
|
|
| Quote: |
| why reinvent the wheel ??? |
Aaaaaaaaaah, but if you do not know that the wheel exists ?
Well, I suppose that you could always use the search facility first |
|
| Back to top |
|
 |
enrico-sorichetti
Global Moderator
Joined: 14 Mar 2007 Posts: 2648 Location: italy
|
|
|
|
| Quote: |
| Aaaaaaaaaah, but if you do not know that the wheel exists ? |
people in storage support should know  |
|
| Back to top |
|
 |
Moved: Wed Jul 09, 2008 7:25 pm by superk From CLIST & REXX to SMS & VSAM |
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 3169 Location: Brussels once more ...
|
|
|
|
But doesn't z/OS 1.9 use virtual wheels ?
Anyway, I'm not in storage management for this new contract, so you may defame them with impunity.
It was very hot in Verona on Saturday 38C. |
|
| Back to top |
|
 |
PeD
Active User
Joined: 26 Nov 2005 Posts: 292 Location: Belgium
|
|
|
|
| Why to move this question from CLIST & REXX to SMS & VSAM, as the Poster asks for a REXX solution? |
|
| Back to top |
|
 |
enrico-sorichetti
Global Moderator
Joined: 14 Mar 2007 Posts: 2648 Location: italy
|
|
|
|
| Quote: |
| Why to move this question from CLIST & REXX to SMS & VSAM, as the Poster asks for a REXX solution? |
the rexx coding is a small part compared to the storage management issues ...
the main point is to extract the relevant data and understand the command to be used
and the most reasonable and effective solution is not a home made rexx thing... |
|
| Back to top |
|
 |
PeD
Active User
Joined: 26 Nov 2005 Posts: 292 Location: Belgium
|
|
|
|
I can agree but I remember one day ( and this is still a question for me ) I wanted to release the unused space allocated via DYNALLOC or BPXWDYN.
And I was not able to find a direct solution.
Sometimes data sets are allocated via batch REXX, PLI, Cobol, ..... dynamically and it is a good practice to release the space.
So it is not a pure SMS issue. In this case.
Cheers
Pierre |
|
| Back to top |
|
 |
Pedro
Senior Member
Joined: 01 Sep 2006 Posts: 383 Location: work
|
|
|
|
I wrote this some time ago...
| Code: |
/* REXX */
/* use fully qualified names */
/* PRIME DFDSS CONTROL CARDS*/
parse arg dataset
Address TSO
If sysdsn("DFDSS.CNTL")="OK" then
"ALLOC F(SYSIN) DA(DFDSS.CNTL) SHR REU"
Else
"ALLOC F(SYSIN) DA(DFDSS.CNTL) SPACE(1) BLOCK(3120)",
"LRECL(80) DSORG(PS) RECFM(F B) BLKSIZE(3120) NEW CATALOG"
out.1 =" RELEASE INCLUDE("dataset") DDNAME(RELEASE) "
"EXECIO 1 DISKW SYSIN (STEM OUT. FINIS "
/* CALL DFDSS to release the space */
"ALLOC F(SYSPRINT) DA(*) REU"
"ALLOC F(RELEASE) DA("dataset") SHR"
"CALL 'SYS1.LINKLIB(ADRDSSU)'"
"FREE F(RELEASE SYSIN SYSPRINT)"
Exit 0 |
|
|
| Back to top |
|
 |
pkg23
New User
Joined: 06 Dec 2007 Posts: 12 Location: India
|
|
|
|
I am trying to run the Rexx but it is failing in ADRDSSU with Rc -71.
Below is the rexx -
DATASET = 'PUB.PROD.ALR.SELECTED.PRIMARY'
IF SYSDSN("DFDSS.CNTL")="OK" THEN
"ALLOC F(SYSIN) DA(DFDSS.CNTL) SHR REU"
ELSE
"ALLOC F(SYSIN) DA(DFDSS.CNTL) SPACE(1) BLOCK(3120)",
"LRECL(80) DSORG(PS) RECFM(F B) BLKSIZE(3120) NEW CATALOG"
OUT.1 =" RELEASE INCLUDE("DATASET") DDNAME(RELEASE) "
"EXECIO 1 DISKW SYSIN (STEM OUT. FINIS "
/* CALL DFDSS TO RELEASE THE SPACE */
"ALLOC F(SYSPRINT) DA(*) REU"
"ALLOC F(RELEASE) DA('"DATASET"') SHR"
"CALL 'SYS1.LINKLIB(ADRDSSU)'"
"FREE F(RELEASE SYSIN SYSPRINT)"
EXIT 0
when i run this i get the error
16 *-* "CALL 'SYS1.LINKLIB(ADRDSSU)'"
+++ RC(-71) +++
Thanks
Prashant |
|
| Back to top |
|
 |
enrico-sorichetti
Global Moderator
Joined: 14 Mar 2007 Posts: 2648 Location: italy
|
|
|
|
Why use a clist/rexx ??
simply write a batch jcl, invoking DFDSS, with the proper jcl statements and sysin control cards
You would have anyway to run it in batch...
DFDSS is APF authorized and without some tweaking it will not run under a tso session |
|
| Back to top |
|
 |
pkg23
New User
Joined: 06 Dec 2007 Posts: 12 Location: India
|
|
|
|
Can you give me the jcl invoking DFDSS with sysin control cards. I dont know about this facitlity. I need to release only 3-4 dataset.
Thanks
Prashant |
|
| Back to top |
|
 |
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 547
|
|
|
|
Hi Prashant,
here is the code you can use
| Code: |
//STEP01 EXEC PGM=ADRDSSU
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
REL INC( -
CTL.DJ1.HKTMSVLT.J04377.D1911203.S91.N008F00 -
CTL.DJ1.QD03410D.J04496.D1911206.S91.N030C00 -
CTL.DJ1.QD050006.J04533.D1911207.S91.N049300 -
CTL.DJ1.TU000B01.J04349.D1911203.S91.N001800 -
)
/*
|
Gerry |
|
| Back to top |
|
 |
pkg23
New User
Joined: 06 Dec 2007 Posts: 12 Location: India
|
|
|
|
I tried this option but i am getting RC 4 with "No dataset selected for processing"
Here is the Jcl dump -
REL INC( -
PUB.PROD.T10764.DSLIST -
PUB.PROD.T10764.DSLIST1 -
)
ADR101I (R/I)-RI01 (01), TASKID 001 HAS BEEN ASSIGNED TO COMMAND 'REL '
ADR109I (R/I)-RI01 (01), 2008.192 04:53:48 INITIAL SCAN OF USER CONTROL STATEMEN
ADR016I (001)-PRIME(01), RACF LOGGING OPTION IN EFFECT FOR THIS TASK
ADR006I (001)-STEND(01), 2008.192 04:53:48 EXECUTION BEGINS
ADR470W (001)-RLSE0(02), NO DATA SETS SELECTED FOR PROCESSING
ADR006I (001)-STEND(02), 2008.192 04:53:49 EXECUTION ENDS
ADR013I (001)-CLTSK(01), 2008.192 04:53:49 TASK COMPLETED WITH RETURN CODE 0004
ADR012I (SCH)-DSSU (01), 2008.192 04:53:49 DFSMSDSS PROCESSING COMPLETE. HIGHEST
TASK 001
Thanks
Prashant |
|
| Back to top |
|
 |
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 547
|
|
|
|
Hi,
were these datasets candidates for space to be released ?
Gerry |
|
| Back to top |
|
 |
|
|