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
 

 

Free PDS-E space

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
jerryte

Active User


Joined: 29 Oct 2010
Posts: 183
Location: Toronto, ON, Canada

PostPosted: Thu Oct 31, 2013 11:48 pm    Post subject: Free PDS-E space
Reply with quote

First question:
I want to free the unused space on a pds-e (dsntype=LIBRARY) When I use the "F" command in DSLIST (ispf option 3.4) nothing happens. It is 7000 tracks but only 1% used. Is there another way to free the unused space? This is a static pds so it won't grow.

Second question:
Is there a command or utility I can run from a batch job to free unused space on a dataset or pds?

thanks
Back to top
View user's profile Send private message

dick scherrer

Site Director


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

PostPosted: Thu Oct 31, 2013 11:59 pm    Post subject:
Reply with quote

Hello,

What several of my sites have done is to reallocate a smaller pdse file and copy the original member(s). Then delete the original and rename the new dataset.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Fri Nov 01, 2013 12:29 am    Post subject:
Reply with quote

Hello,

If you have HSM, you could hit HMIG infront of the PDSE or PDS or PS and get it migrated to migrate lvl1.

After migration, issue HRECALL and the dataset is reallocated by HSM with free space released.

For a PS - before migration:
Code:
Current Allocation
 Allocated tracks  . : 2
 Allocated extents . : 1
Current Utilization
 Used tracks . . . . : 1
 Used extents  . . . : 1

For a PS - after migration & immediate recall:
Code:
Current Allocation
 Allocated tracks  . : 1
 Allocated extents . : 1
Current Utilization
 Used tracks . . . . : 1
 Used extents  . . . : 1


For a PDSE - before migration:
Code:
Current Allocation
 Allocated tracks  . : 5
 Allocated extents . : 1
Current Utilization
 Used pages  . . . . : 6
 % Utilized  . . . . : 10


For PDSE - after migration & immediate recall:
Code:
Current Allocation
 Allocated tracks  . : 1
 Allocated extents . : 1
Current Utilization
 Used pages  . . . . : 6
 % Utilized  . . . . : 50
One more advantage we have with this method is, FREE command would not work for multivolume datasets, however HSM might be written by 'good guy Greg' and handles multi volume datasets as well.

Hope it helps.
Back to top
View user's profile Send private message
jerryte

Active User


Joined: 29 Oct 2010
Posts: 183
Location: Toronto, ON, Canada

PostPosted: Sat Nov 09, 2013 12:48 am    Post subject:
Reply with quote

The issue seems to be that I cannot compress a PDS-E library. The free space is in between the members so it can't free it.

I tried another method:
  • allocate a temporary pds with same dcb
  • copy all the members to the temp pds
  • delete all members from the original pds
  • copy the members back

Then when I do an ISPF free it works. My guess is that the copy operation puts all the members continuous at the beginning of the pds library. Thus all the free space is now at the end.
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: Tue Nov 12, 2013 3:43 pm    Post subject:
Reply with quote

You should not have to compress a PDSE library, as free space from member updates or deletes is automatically made available for reuse.
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Tue Nov 12, 2013 7:32 pm    Post subject:
Reply with quote

Hi Expat,

If i understood, the goal was to free unused space in an overallocated PDSE . . .

d
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: Tue Nov 12, 2013 7:35 pm    Post subject:
Reply with quote

jerryte wrote:
The issue seems to be that I cannot compress a PDS-E library. The free space is in between the members so it can't free it.
Dick,

That's what I originally thought, but then the above was posted.
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Tue Nov 12, 2013 8:13 pm    Post subject:
Reply with quote

Yup, i believe the "compression" was needed to get the free space all together at the "back" rather than interleaved.

Just copying the members to a smaller pdse would do the necessary.

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

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Tue Nov 12, 2013 10:16 pm    Post subject: Reply to: Free PDS-E space
Reply with quote

I wrote this in 1998! I have not used it since, but think it should still work. It uses DFDSS to issue the RELEASE command. Can someone verify that it works?
Code:
/* REXX */                                                       
/* get dataset name            */                                 
/* use fully qualified names   */                                 
parse arg dataset                                                 
                                                                 
/*   allocate SYSIN file       */                                 
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"
                                                                 
/*   create DFDSS control card */                                 
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 allocated files            */                             
"FREE F(RELEASE SYSIN SYSPRINT)"                                 
Exit 0                                                            [quote][/quote]
Back to top
View user's profile Send private message
jerryte

Active User


Joined: 29 Oct 2010
Posts: 183
Location: Toronto, ON, Canada

PostPosted: Thu Nov 14, 2013 12:17 am    Post subject:
Reply with quote

Pedro

I tried the rexx and I get a S047 abend. This is an authorized program.
I tried a ADDRESS LINKMVS "ADRDSSU" but this also failed.
How do I call an authorized program from a rexx? I forgot.

I found the manual for this command. It is "DFSMS Using the Interactive Storage Management Facility". Google was no help.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Fri Nov 15, 2013 10:05 am    Post subject:
Reply with quote

Hi,

why not just execute PGM=ADRDSSU as a batch STEP.


Gerry
Back to top
View user's profile Send private message
jerryte

Active User


Joined: 29 Oct 2010
Posts: 183
Location: Toronto, ON, Canada

PostPosted: Fri Nov 15, 2013 7:13 pm    Post subject:
Reply with quote

gcicchet wrote:
why not just execute PGM=ADRDSSU as a batch STEP.

I did and it works. This answers my second question.
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Fri Nov 15, 2013 10:29 pm    Post subject: Reply to: Free PDS-E space
Reply with quote

Quote:
How do I call an authorized program from a rexx?


I am not sure, but I think your system setup is not correct**. SYS1.PARMLIB(IKJTSOxx) allows you to define authorized programs that can be called from TSO.

** or it could be that your system programmers intentionally do not allow you to do it. But I still think it is not correct.
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 -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Free FILE not working for specific users sankalp-goyal CLIST & REXX 12 Mon Apr 25, 2016 6:33 pm
No new posts Difference space showed for TS and it... autobox DB2 1 Thu Apr 14, 2016 1:07 pm
No new posts How to find Table-space and Index-spa... venksiv DB2 5 Wed Feb 03, 2016 6:16 pm
No new posts VTS and space BobGilbert All Other Mainframe Topics 2 Mon Jan 11, 2016 5:08 am
No new posts DFSORT - Space issue santosh_g DFSORT/ICETOOL 3 Fri Sep 04, 2015 7:44 am


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