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

Calculating dataset size


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
SSR
Warnings : 1

New User


Joined: 26 Feb 2006
Posts: 38

PostPosted: Thu Jul 06, 2006 10:23 am
Reply with quote

hi,

Could anyone please let me know how to calculate the number of records a dataset can occupy based on the Primary and secondary volume and the LRECL, is there any formlae for calculating that.

And also kowing the number of records a dataset needs to hold how to allocate the primary and scondary volumes and the number of extents.

Thanks n Regards
SSR
Back to top
View user's profile Send private message
kondakonda

New User


Joined: 20 Mar 2006
Posts: 34

PostPosted: Thu Jul 06, 2006 1:52 pm
Reply with quote

Hi,

1 CYL = 15 TRKS
1 TRK = 56, 664 BYTES
if you define the LRECL as 56664, then one record is stored in each track.

If we define SPACE=(TRK,(3,2)), the primary allocation is 3 tracks and the secondary extents is 2 * 3 = 6 tracks.
Back to top
View user's profile Send private message
SSR
Warnings : 1

New User


Joined: 26 Feb 2006
Posts: 38

PostPosted: Thu Jul 06, 2006 4:44 pm
Reply with quote

hi,


In the above example, what will be the number of records it can hold if the LRECL is 80 bytes.

Thanks n Regards
SSR
Back to top
View user's profile Send private message
kondakonda

New User


Joined: 20 Mar 2006
Posts: 34

PostPosted: Thu Jul 06, 2006 4:56 pm
Reply with quote

Hi,

In the example the data can be stored in a total of 9 tracks
for each track if the record length is 80 bytes then 708 records can be stored.
so for 9 tracks totally 6372 records can be stored.

Thanks.
Back to top
View user's profile Send private message
SSR
Warnings : 1

New User


Joined: 26 Feb 2006
Posts: 38

PostPosted: Thu Jul 06, 2006 5:18 pm
Reply with quote

hi,

Thank you for your information will try it out.
Back to top
View user's profile Send private message
SSR
Warnings : 1

New User


Joined: 26 Feb 2006
Posts: 38

PostPosted: Thu Jul 06, 2006 5:30 pm
Reply with quote

hi,

What is the Use of AVGREC parameter, what will happen if we code the AVGREC parameter ('U', 'K', 'M') along with this.

Sorry if am disturbing you..

Thanks n Regards
SSR
Back to top
View user's profile Send private message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Thu Jul 06, 2006 6:22 pm
Reply with quote

AVGREC is a parameter on the DD statement that allows you to basically allocate your space in records, rather than CYLs or tracks.

AVGREC can be U, K or M
U is for records requested in groups of one
K is for records request in groups of 1024
M is for records requested in groups of 1048576

Let's say you have 1,048,576 records that are 228 bytes long and you want to define the space using AVGREC

Here are the three ways:

This is for AVGREC=U in units of one
Code:

DD SPACE=(228,(1048576,100),RLSE),AVGREC=U


This is for AVGREC=K in units of 1024
Code:

DD SPACE=(228,(1024,10),RLSE),AVGREC=K


This is for AVGREC=M in units of 1048576
Code:

DD SPACE=(228,(1,1),RLSE),AVGREC=M


Allocating using AVGREC is just a different means of allocating space for a sequential file if you know how many records you are dealing with.
Back to top
View user's profile Send private message
kondakonda

New User


Joined: 20 Mar 2006
Posts: 34

PostPosted: Fri Jul 07, 2006 3:14 pm
Reply with quote

Hi,

Please find another example for AVGREC

// SPACE=(128,(5,2)),AVGREC=K
The space allocation indicates an average record length of 128 bytes,
a primary quantity of 5K (5,120) records,
and a secondary quantity of 2K (2,048) records.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Allocated cylinders of a dataset DB2 12
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
Search our Forums:

Back to Top