Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Free up the dataset space using REXX
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SMS & VSAM
Author Message
pkg23

New User


Joined: 06 Dec 2007
Posts: 12
Location: India

PostPosted: Wed Jul 09, 2008 6:33 pm    Post subject: Free up the dataset space using REXX
Reply with quote

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
View user's profile Send private message
References
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 3081
Location: italy

PostPosted: Wed Jul 09, 2008 6:39 pm    Post subject: Reply to: Free up the dataset space using REXX
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 3508
Location: Brussels once more ...

PostPosted: Wed Jul 09, 2008 7:06 pm    Post subject:
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 3081
Location: italy

PostPosted: Wed Jul 09, 2008 7:08 pm    Post subject: Reply to: Free up the dataset space using REXX
Reply with quote

Quote:
Aaaaaaaaaah, but if you do not know that the wheel exists ?


people in storage support should know icon_evil.gif icon_biggrin.gif
Back to top
View user's profile Send private message
Moved: Wed Jul 09, 2008 7:25 pm by superk From CLIST & REXX to SMS & VSAM
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 3508
Location: Brussels once more ...

PostPosted: Wed Jul 09, 2008 7:43 pm    Post subject:
Reply with quote

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
View user's profile Send private message
PeD

Senior Member


Joined: 26 Nov 2005
Posts: 308
Location: Belgium

PostPosted: Wed Jul 09, 2008 7:53 pm    Post subject:
Reply with quote

Why to move this question from CLIST & REXX to SMS & VSAM, as the Poster asks for a REXX solution?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 3081
Location: italy

PostPosted: Wed Jul 09, 2008 9:09 pm    Post subject: Reply to: Free up the dataset space using REXX
Reply with quote

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
View user's profile Send private message
PeD

Senior Member


Joined: 26 Nov 2005
Posts: 308
Location: Belgium

PostPosted: Wed Jul 09, 2008 9:31 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 508
Location: work

PostPosted: Wed Jul 09, 2008 10:23 pm    Post subject: Reply to: Free up the dataset space using REXX
Reply with quote

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
View user's profile Send private message
pkg23

New User


Joined: 06 Dec 2007
Posts: 12
Location: India

PostPosted: Thu Jul 10, 2008 11:27 am    Post subject: Reply to: Free up the dataset space using REXX
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 3081
Location: italy

PostPosted: Thu Jul 10, 2008 11:38 am    Post subject: Reply to: Free up the dataset space using REXX
Reply with quote

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
View user's profile Send private message
pkg23

New User


Joined: 06 Dec 2007
Posts: 12
Location: India

PostPosted: Thu Jul 10, 2008 2:42 pm    Post subject: Reply to: Free up the dataset space using REXX
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 653

PostPosted: Thu Jul 10, 2008 3:10 pm    Post subject:
Reply with quote

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
View user's profile Send private message
pkg23

New User


Joined: 06 Dec 2007
Posts: 12
Location: India

PostPosted: Thu Jul 10, 2008 3:26 pm    Post subject: Reply to: Free up the dataset space using REXX
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 653

PostPosted: Thu Jul 10, 2008 3:52 pm    Post subject:
Reply with quote

Hi,

were these datasets candidates for space to be released ?


Gerry
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SMS & VSAM All times are GMT + 6 HoursGoto page 1, 2  Next
Page 1 of 2