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

Free PDS-E space


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jerryte

Active User


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

PostPosted: Thu Oct 31, 2013 11:48 pm
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

Moderator Emeritus


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

PostPosted: Thu Oct 31, 2013 11:59 pm
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: 1742
Location: Tirupur, India

PostPosted: Fri Nov 01, 2013 12:29 am
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: 202
Location: Toronto, ON, Canada

PostPosted: Sat Nov 09, 2013 12:48 am
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: 8797
Location: Welsh Wales

PostPosted: Tue Nov 12, 2013 3:43 pm
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

Moderator Emeritus


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

PostPosted: Tue Nov 12, 2013 7:32 pm
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: 8797
Location: Welsh Wales

PostPosted: Tue Nov 12, 2013 7:35 pm
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

Moderator Emeritus


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

PostPosted: Tue Nov 12, 2013 8:13 pm
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

Global Moderator


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

PostPosted: Tue Nov 12, 2013 10:16 pm
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: 202
Location: Toronto, ON, Canada

PostPosted: Thu Nov 14, 2013 12:17 am
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: 1702
Location: Australia

PostPosted: Fri Nov 15, 2013 10:05 am
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: 202
Location: Toronto, ON, Canada

PostPosted: Fri Nov 15, 2013 7:13 pm
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

Global Moderator


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

PostPosted: Fri Nov 15, 2013 10:29 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 2
No new posts Merge 2 lines based on Space from a S... DFSORT/ICETOOL 5
No new posts Allocated space calculation from DCOL... PL/I & Assembler 3
No new posts split a name based on space in ASM PL/I & Assembler 9
No new posts Adding space to a dataset - getting D37 ABENDS & Debugging 10
Search our Forums:

Back to Top