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

Number of directory blocks while creating PDS


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Rajesh Patil

New User


Joined: 02 May 2007
Posts: 2
Location: Pune

PostPosted: Wed Aug 08, 2007 4:12 pm
Reply with quote

Hi All,
This is rajesh. Am having a small query...how to calculate number of directory blocks while creating a PDS. Suppose we have 15 members to be stored in it...what could be the number of directory blocks....?
I search in manual but didn't found any thing. icon_neutral.gif
Can anybody help me...?


Rajesh
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Wed Aug 08, 2007 4:32 pm
Reply with quote

See if this link helps.
Important comment from above link is -
Quote:
As a guideline for determining the number of directory blocks you will need for a PDS, figure on 6 entries per directory block if the data set is a load module library or if it will be edited with the ISPF editor. Otherwise, allow for 16 entries per directory block.
Back to top
View user's profile Send private message
ksk

Active User


Joined: 08 Jun 2006
Posts: 355
Location: New York

PostPosted: Wed Aug 08, 2007 4:38 pm
Reply with quote

Standard number is 6 but I prefer 5 directory blocks for a PDS as some members contain more information.
Back to top
View user's profile Send private message
Rajesh Patil

New User


Joined: 02 May 2007
Posts: 2
Location: Pune

PostPosted: Wed Aug 08, 2007 4:53 pm
Reply with quote

Hi ksk & Abhijit,
Thanks for prompt reply.Probably the above answers are right but ...... what i want to ask you that is there any formula for calculating the number of directory blocks required.....? may be based on number og member we want to store in PDS...?

rajesh
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Wed Aug 08, 2007 5:11 pm
Reply with quote

did you check the link which I have given? It doesn't gove you an equation like these many members = thease many blocks but gives you clear idea about what will be requied. Please let me know if anything else is required.
NOTE: If you need to go through hassle of calculating directory blocks everytime, I will suggest to go for PDSE.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Wed Aug 08, 2007 7:01 pm
Reply with quote

ksk wrote:
Standard number is 6 but I prefer 5 directory blocks for a PDS as some members contain more information.


The minimum number of members that can be stored on a single directory block is 6. If you do not use ISPF statistics, then this rises to 8 members per block.

It should also be noted that one track of 3390 DASD can accomodate 45 directory blocks, except for the very first track allocated to directory blocks which only accomodates 44 directory block, using the one other directory block internally.

So, to work out the number of directory blocks required, just divide the number of members that you want to store in the PDS by 6, add on 50% because you always find that you will need far more members in the PDS than you first thought.

And using the DASD formula above you can find out the exact number to allocate and not waste a part of the track.

e.g. PDS to contain 486 members.
486 / 6 = 81.
120 directory blocks - 50% added for contingency.
120 - 44 (first track) = 76
76 / 45 (blocks per track) = 1.688 which rounds up to 2.
TOTAL directory blocks = 44 + (2 * 45) = 134

134 directory blocks uses excatly 3 tracks of DASD

BUT Why not just use a PDSE and don't even have to think about directory blocks ?
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Apr 15, 2008 3:25 am
Reply with quote

Expat,

I'd the same requirement to calculate the size of directory blocks, I feel above caluculation should be like:
Quote:
PDS to contain 720 members.
720 / 6 = 120.
120 directory blocks - 50% added for contingency.
120 - 44 (first track) = 76
76 / 45 (blocks per track) = 1.688 which rounds up to 2.
TOTAL directory blocks = 44 + (2 * 45) = 134

134 directory blocks uses excatly 3 tracks of DASD


Please advise.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Tue Apr 15, 2008 5:52 am
Reply with quote

Hi Anuj,

Your calculation did not add the 50%. Your 120 should be 180. . .?

Notice the original went from 81 to 120 (which includes the 50% growth allowance).
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Apr 15, 2008 10:44 am
Reply with quote

see my post in this thread for the exact computations

http://www.ibmmainframes.com/viewtopic.php?t=29878

also for 3390 PDS non pdse the best technique is to allocate full track directories
(expecially for load modules)
44 for the first chunk ( 44 plus the end of file record )
45 for each other

in math (45 * dir_tracks ) - 1
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Apr 15, 2008 10:56 am
Reply with quote

Hi Dick,

Per this
Quote:
to work out the number of directory blocks required, just divide the number of members that you want to store in the PDS by 6

PDS to contain 486 members.
486 / 6 = 81.

till here ok, now this
Quote:
add on 50% because you always find that you will need far more members in the PDS than you first thought.

suggests me that in below calculation
Quote:
120 directory blocks - 50% added for contingency.
120 - 44 (first track) = 76

one shoud use 81 & not 120, please let me know why 120 is used here?
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Apr 15, 2008 11:03 am
Reply with quote

Enrico,

Some queris on the below scrap from the thread, you direct me to..
Quote:
for fb datasets the emtry size depends on the ispf statistics being there or not
each entry will be
12 bytes without statistics
42 bytes with statistics
the ispf statistics are 15 halfords, 30 bytes

so each directory block will contain ..
21 entries without statistics
6 entries with statistics


1. Please let me know, what are "ispf statistics" in the context of topic..?
2. When you say "21 entries without statistics ", here "entries" are member actually, right?


P.S.: This thread was open since very long on my PC, couldn't check your post before my next post, following Dick's post.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Apr 15, 2008 11:19 am
Reply with quote

Quote:
1. Please let me know, what are "ispf statistics" in the context of topic..?
2. When you say "21 entries without statistics ", here "entries" are member actually, right?


1) in this context the presence of the ispf statistics is needed to know how many entries will fir in each directory block
( entry is the commonly used term in this context to indicte a member pointer )

2) yes

please review my figures
in the last directory block one slot will be taken by the eof directory record,
a member name of 8x'ff'
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Tue Apr 15, 2008 11:56 am
Reply with quote

Hi Anuj,

Quote:
one shoud use 81 & not 120, please let me know why 120 is used here?
120 is used because it is 50% more than 81. . .
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Apr 15, 2008 1:45 pm
Reply with quote

Hi Dick,

Stupid in mine, I read it
Quote:
120 directory blocks - 50% added for contingency.
as
Quote:
(120 directory blocks) minus (50% added for contingency)


I must get "stupid of the day" award for today... icon_smile.gif
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Tue Apr 15, 2008 2:55 pm
Reply with quote

Quote:
I must get "stupid of the day" award for today... icon_smile.gif

Good,

Because that means that I can not win that award today
But - I might try anyway icon_biggrin.gif
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Apr 15, 2008 10:58 pm
Reply with quote

expat wrote:
But - I might try anyway icon_biggrin.gif
Aha..At least I got one thing where I can be in competition with you...& little mightier as well... icon_smile.gif
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 Pulling a fixed number of records fro... DB2 2
No new posts Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts Generate random number from range of ... COBOL Programming 3
No new posts Increase the number of columns in the... IBM Tools 3
No new posts Creating Unix Directory using COBOL i... COBOL Programming 2
Search our Forums:

Back to Top