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

Free space of a mulitvolume PS dataset in batch


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

New User


Joined: 20 Jun 2024
Posts: 13
Location: Netherlands

PostPosted: Wed Aug 05, 2026 1:43 pm
Reply with quote

I would like to free unused space from a multivolume PS dataset in a batch job.
In TSO 3.4 F works fine.

Code:

ADRDSSU RELEASE INCLUDE(......)

This only frees the 1th volume.

Is there a way to do it?
kind regards,
Kokido
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 421
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Thu Aug 06, 2026 7:23 am
Reply with quote

Perhaps something like this

Code:
//RELEASE  EXEC PGM=ADRDSSU
//SYSPRINT DD SYSOUT=*
//SYSIN    DD *
  RELEASE -
    DSNAME(YOUR.MULTIVOLUME.PS.DATASET) -
    LOGDYNAM(*) -
    SELECTMULTI
/*
Back to top
View user's profile Send private message
kokido

New User


Joined: 20 Jun 2024
Posts: 13
Location: Netherlands

PostPosted: Thu Aug 06, 2026 10:28 am
Reply with quote

Looks nice, thank you, but unfortunately:

Code:

ADR129E (001)-RI01 (01), KEYWORD 'DSNAME ' IS IMPROPER 


kind regards
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1445
Location: Bamberg, Germany

PostPosted: Thu Aug 06, 2026 10:29 am
Reply with quote

Try something like this, See also MINTRKS and MINSEC to adjust what's being released. For empty datasets you need a different approach, if not handled by DFSMS/DFHSM already. ADMIN may be useful, but is not a must if you have operations attribute.

Code:
REL INC(<dsn>) -
    STORGRP(<sgrp>) -                 
    SPHERE -                           
    SELM(ANY) -                       
    MINTRKS(0) -                       
    MINSEC(0) -                       
    ADMIN -                           
    WAIT(0,0)
Back to top
View user's profile Send private message
kokido

New User


Joined: 20 Jun 2024
Posts: 13
Location: Netherlands

PostPosted: Thu Aug 06, 2026 12:48 pm
Reply with quote

Thank you. I decided to do a iebgener with release on the target and delete the original dataset. As we are talking about a GDG I did not like the gap created in the GDG sequence, but OK.
Thanks anyway, problem solved as far as I am concerned.
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 778
Location: Denmark

PostPosted: Thu Aug 06, 2026 1:37 pm
Reply with quote

Program PDS86 from cbttape.org file 182, which no installation should be without, has a FIX RELEASE command, which also works on sequential datasets.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1445
Location: Bamberg, Germany

PostPosted: Thu Aug 06, 2026 5:40 pm
Reply with quote

kokido wrote:
Thank you. I decided to do a iebgener with release on the target and delete the original dataset. As we are talking about a GDG I did not like the gap created in the GDG sequence, but OK.
Thanks anyway, problem solved as far as I am concerned.

If you use my proposal, the advantage would also be to be able to use relative generation numbers. Means your generation numbers will remain the same.
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts REXX to get all Dataset names from a ... CLIST & REXX 5
No new posts How to close Datacom MUF URT used by ... CICS 0
No new posts Avoid job abend on dataset held by us... JCL & VSAM 6
No new posts Activate WLM policy in batch All Other Mainframe Topics 2
No new posts Identify Number of Multivolume Dataset All Other Mainframe Topics 5
Search our Forums:


Back to Top