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

Size to Alocate


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Elixir

Active User


Joined: 08 Feb 2009
Posts: 116
Location: CHENNAI/NEW JERSEY - INDIA/USA

PostPosted: Thu Oct 27, 2011 9:13 pm
Reply with quote

Hello,

thru rexx is it possible to before hand know the size to alocate for a ps/pds?

thanks!
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Oct 27, 2011 9:21 pm
Reply with quote

YES ...
if You know the sizes of things that have to be contained in it
- number of members
- number of record

YES if You know the formulas and how to write REXX


otherwise the answer is NO/NO
Back to top
View user's profile Send private message
Elixir

Active User


Joined: 08 Feb 2009
Posts: 116
Location: CHENNAI/NEW JERSEY - INDIA/USA

PostPosted: Thu Oct 27, 2011 9:30 pm
Reply with quote

1 CYL = 15 TRKS
1 TRK = 56, 664 BYTES
if you define the LRECL as 56664, then one record is stored in each track.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Oct 27, 2011 9:34 pm
Reply with quote

Quote:
f you define the LRECL as 56664, then one record is stored in each track.

NO...

look at the manuals for the blksize and lrecl constraints

look at the stickies in the ispf part of the forums for a blocks per track calculator I wrote .
www.ibmmainframes.com/viewtopic.php?t=55037
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Thu Oct 27, 2011 10:51 pm
Reply with quote

Besides the device geometry information, you really need to know how many members and how many records will be contained.

A somewhat lazy* approach is to allocate a large dataset and also specify the RELEASE parameter. After writing your records and closing the file, the unused space is released.

* I am somewhat lazy myself.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Oct 28, 2011 1:42 am
Reply with quote

From the JCL Language Reference manual section 12.42.2 on LRECL in the DD statement, available at the Manuals link at the top of the page:
Quote:
The value of bytes is:

1 to 32,760 for non-VSAM data sets.

1 to 32,761 for VSAM key-sequenced (KS), entry-sequenced (ES), or relative record (RR) data sets. (LRECL does not apply to VSAM linear space, RECORG=LS, data sets.)

Elixir, perhaps you want to revise this statement in light of the manual?
Quote:
if you define the LRECL as 56664, then one record is stored in each track.
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Using Java/C/C++ to retrieve dataset ... Java & MQSeries 6
No new posts Find the size of a PS file before rea... COBOL Programming 13
No new posts Masking variable size field - min 10 ... DFSORT/ICETOOL 4
No new posts Dataset size increase on adding 1 byt... DFSORT/ICETOOL 8
No new posts TWA size of the CPLT transaction CICS 0
Search our Forums:

Back to Top