# Calculate primary/secondary space

Author Message
pkmurali
Warnings : 1

Active User

Joined: 15 Dec 2005
Posts: 271

 Posted: Fri Feb 04, 2011 10:40 am Hi Expat, Thanks for sending a detailed explanation. After getting the total no of cylinders / tracks, what is the formula / step to map that with primary & secondary parameter? For example i am getting 119 cylinders for LRECL=80 & Input Records = 1000000. How to map them into primary & secondary? Please throw some light on it. Thanks, Murali.
dick scherrer

Moderator Emeritus

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

 Posted: Fri Feb 04, 2011 10:46 am Hello, When you have a question, start a new topic rather than posting a reply to a topic that has been inactive for nearly 4 years. . . There is no "mapping" that i'm aware of. You specify a primary and a secondary. Many organizations have guidelines as to how these are specified. Suggest you talk with your dasd storage management people and learn how this is managed on your system.
vasanthz

Global Moderator

Joined: 28 Aug 2007
Posts: 1691
Location: Tiruppur, India

Posted: Fri Feb 04, 2011 2:00 pm

Hi,

I came across a spreadsheet on our forum sometime ago for space calculations.
Have attached it along with this post.

For,
 Quote: LRECL=80 & Input Records = 1000000.

As per the spreadsheet you could use,
SPACE=(CYL,(39,4),RLSE)

Hope it helps.

@experts - If this spreadsheet is incorrect, please let me know, cos I am not the author of this document.

Thanks,
Robert Sample

Global Moderator

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

 Posted: Fri Feb 04, 2011 6:04 pm The primary space allocation should be big enough to handle the size of the data set, with perhaps a little extra to allow for unknown factors. The primary space should be modified for system factors (such as your z/OS version won't allow you to allocate more than 65535 tracks on a volume -- in which case specifying a primary space of 5000 cylinders would be ludicrous). My rule of thumb is to make the secondary space allocation 10 to 25% of the primary unless special circumstances apply (such as I know the file will need twice the primary space next month, or the data set is going in the link list in which case the secondary space should be zero).
pkmurali
Warnings : 1

Active User

Joined: 15 Dec 2005
Posts: 271

Posted: Tue Feb 08, 2011 5:57 pm

The topic was started based on the inputs from

Subject:How to know the no of Track & Block Size with No. of Rec

Based on the above details i prepared one tool to calculate the total no of cylinders required if average no of records and LRECL as input. Based on that for LRECL=80 & Input Records = 1000000 the cylinders calculated was 119. Please let me know whether it is correct or wrong.

Thanks,
Murali.
expat

Global Moderator

Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

 Posted: Tue Feb 08, 2011 6:06 pm Show your workings and results and then you can check it yourself
pkmurali
Warnings : 1

Active User

Joined: 15 Dec 2005
Posts: 271

Posted: Tue Feb 08, 2011 6:21 pm

This is the piece of code to calculate space

 Code: /****************rexx*****/                                             Say ' Tool to calculate the Cylinders based on No of Records & LRECL'  Say  ' Enter the Average No of records needed & LRECL:'                 Pull  Rec  LREC                                                                                                       Temp2 = (27998/LREC) * 2                                               Track = Rec/Temp2                                                       Cyl1   = Track/15                                                       Say 'Total Cylinders Required = ' TRUNC(Cyl1)                           Exit
expat

Global Moderator

Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

Posted: Tue Feb 08, 2011 6:32 pm

I use
 Code: RECBLK = TRUNC(27998 / LRECL)   TRKS   = TRUNC(RECS / RECTRK * 2) + 1   CYLS   = TRUNC(TRKS / 15) + 1
Which always rounds the numbers up to the next integer
pkmurali
Warnings : 1

Active User

Joined: 15 Dec 2005
Posts: 271

 Posted: Tue Feb 08, 2011 8:24 pm How to split 119 into primary & secondary? any formula available?
enrico-sorichetti

Superior Member

Joined: 14 Mar 2007
Posts: 10833
Location: italy

 Posted: Tue Feb 08, 2011 8:33 pm the question does not make much sense! primary and secondary allocation specifications depend on application design and how the data processed varies from day to day so is not really related to the space needed for a fixed amount of data! the secondary allocation is there to provide for data growth also the logic behind Your calculation seems a bit Rough to me! there are some record lengths for which half track might not be the best blocking
dick scherrer

Moderator Emeritus

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

Posted: Tue Feb 08, 2011 9:50 pm

Hello,

 Quote: How to split 119 into primary & secondary? any formula available?
Why do you believe you need to split this?

Suggest you re-read the post from Robert. . .
Robert Sample

Global Moderator

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

Posted: Tue Feb 08, 2011 11:34 pm

 Quote: How to split 119 into primary & secondary? any formula available?
What, exactly, do you think a primary and secondary extent is? You should ALWAYS plan on allocating the data set in the primary and only if there is more data should secondary extents be required! Asking how to split an allocation into primary and secondary indicates that (1) you have not paid any attention to the posts in this thread, and (2) you have no business programming on a mainframe without a major amount of training (or retraining) in the basic concepts. The system will handle allocating the data set as space is available, and you have some -- but not very much -- control over the process.
 View Bookmarks All times are GMT + 6 Hours

 Topic Forum Replies Similar Topics Cobol prog to put an indicator on the... JCL & VSAM 1 Merge 2 lines based on Space from a S... DFSORT/ICETOOL 5 DL/I status code AK for GU call using... IMS DB/DC 1 Allocated space calculation from DCOL... PL/I & Assembler 3 split a name based on space in ASM PL/I & Assembler 9
Search our Forums:

 IBMMainframes.com is not an official and/or affiliated with IBM® in anyway Board Rules | FAQ | Downloads | Wiki | SiteMap | Contact Us