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
 

 

Release quantity that was allocated via LIKE= subparm

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Auryn

New User


Joined: 11 Jan 2006
Posts: 44
Location: Lower Saxony (DE)

PostPosted: Thu May 18, 2017 6:02 pm    Post subject: Release quantity that was allocated via LIKE= subparm
Reply with quote

Hi there,

the LIKE= subparm is quite comfortable to allocate the result dataset similar to its source.
But i.e. when sorting the source using an include condition to filter most of the source rows there is lots of allocated space remaining that at the end is unused. And so I'ld like to release the space like I do when using i.e. SPACE=(TRK,(999,111),RLSE).
I tried some variants of SPACE=(,,RLSE) but was not successful.
Has anybody got a solution for my queston?

Thank you very much
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8057
Location: East Dubuque, Illinois, USA

PostPosted: Thu May 18, 2017 6:24 pm    Post subject: Reply to: Release quantity that was allocated via LIKE= subparm
Reply with quote

I suspect what you want to do is not possible unless you explicitly code the SPACE parameter in the job creating the new data set. From the JCL Reference manual (emphasis added by me):
Quote:
Use the LIKE parameter to specify the allocation attributes of a new data set by copying the attributes of a model data set, which must be an existing cataloged data set and reside on a direct access volume.
The following attributes are copied from the model data set to the new data set:

Data set organization
Record organization (RECORG) or
Record format (RECFM)
Record length (LRECL)
Key length (KEYLEN)
Key offset (KEYOFF)
Type, PDS, PDSE, basic format, extended format, large format, or HFS (DSNTYPE)
Space allocation (AVGREC and SPACE)

Unless you explicitly code the SPACE parameter for the new data set, the system determines the space to be allocated for the new data set by adding up the space allocated in the first three extents of the model data set. Therefore, the space allocated for the new data set will generally not match the space that was specified for the model data set. Note that regardless of the units in which the model data set was allocated, the new data set will be allocated in tracks. This assumes that space was not specified on the JCL and is being picked up from the model data set.
Back to top
View user's profile Send private message
mistah kurtz

Active User


Joined: 28 Jan 2012
Posts: 283
Location: Room: TREE(3). Hilbert's Hotel

PostPosted: Thu May 18, 2017 6:28 pm    Post subject:
Reply with quote

In stead of LIKE, try using DCB=*.existing-dd-name, with SPACE=(TRK,(999,111),RLSE).
Code:
//SYSUT1   DD DSN=TEST.DATASET.OLD,DISP=SHR
//SYSUT2   DD DSN=TEST.DATASET.NEW,DISP=(,CATLG,DELETE),
//            UNIT=TSO,SPACE=(0,(50,60),RLSE),
//            DCB=*.SYSUT1
Back to top
View user's profile Send private message
Auryn

New User


Joined: 11 Jan 2006
Posts: 44
Location: Lower Saxony (DE)

PostPosted: Fri May 19, 2017 1:39 pm    Post subject:
Reply with quote

Sorry, maybe my question was a bit ambiguous:

I know I can 'overwrite' the space quantities taken from the referred source dataset by specifying i.e. SPACE=(TRK,(999,111),RLSE).
But I don't want to think about probable quantities of the results. The only thing I know is that the maximum quantity works.
This is why I'm asking for a someting like SPACE=(,,RLSE):
"Dear system, please start allocating the output dataset using the quantities given from the referred dataset and when finished successfully release the unused space..."
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8057
Location: East Dubuque, Illinois, USA

PostPosted: Fri May 19, 2017 8:55 pm    Post subject:
Reply with quote

You could open a PMR with IBM to verify, but I don't think you can release the unused space when allocating with LIKE. The JCL Reference manual is clear about how LIKE allocates space, but says nothing about LIKE releasing unused space.
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 516
Location: The Universe

PostPosted: Sat May 20, 2017 2:20 pm    Post subject:
Reply with quote

RLSE as specified in the DD statement SPACE parameter is not a data set attribute.

In order for space release to occur through JCL two things must happen.
  • You must specify RLSE on the DD statement AND
  • the program that uses the DD statement MUST open the data set for output

In this JCL --
Code:
//CREATE  EXEC PGM=IEBGENER
//SYSPRINT DD  SYSOUT=*
//SYSUT1   DD  -- Input data --
//SYSUT2   DD  DISP=(NEW,CATLG),...,SPACE=(CYL,(50,20)),DSN=---
//SYSIN    DD  DUMMY
//RLSE    EXEC PGM=IEBGENER
//SYSPRINT DD  SYSOUT=*
//SYSUT1   DD  DUMMY,DCB=---
//SYSUT2   DD  DISP=MOD,SPACE=(CYL,(0,0),RLSE),DSN=---
//SYSIN    DD  DUMMY

The CREATE step builds a data set, but it does not free unused space at the end of the data set. The RLSE step frees the unused space. It can be run as a step in a different job run after the job that created the data set.
  • In the SYSUT1 DD statement the DCB parameter specifies a data set that has the same DCB attributes as the data set you are freeing space. This ensures IEBGENER will not accidentally alter the DCB attributes of the data set specified by the SYSUT2 DD statement. The data set can be the same data set specified by the SYSUT2 DD statement.
  • In the SYSUT2 DD statement, DISP=MOD directs data management to add additional data to the end of the data set.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am
No new posts Release of Adabas Cursor mohitsethi All Other Mainframe Topics 1 Mon Feb 06, 2017 8:36 pm
No new posts GETMAIN / FREEMAIN versus STORAGE OBT... steve-myers PL/I & Assembler 8 Wed Feb 01, 2017 1:45 am
No new posts Data set is allocated to another job ... Seppe CLIST & REXX 2 Wed Aug 03, 2016 4:31 pm
No new posts ADS 3270 Batch simulator for IDMS rel... gpowell382 IDMS/ADSO 1 Thu May 05, 2016 8:02 pm


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