View previous topic :: View next topic
|
Author |
Message |
sprasannapathy
New User
Joined: 04 Jan 2008 Posts: 42 Location: india
|
|
|
|
Hi all,
When I went through a document I happen to read
I used ISPF 3.2 to allocate a test dataset with LRECL=1, BLKSIZE=1,
RECFM=FB, and space in blocks. After allocating the test dataset, I
checked to see how many blocks it was occupying. Result: 87 blocks. Here
is my calculation.
(MaxBytesPerTrack - MinBlockSize) / MinBlockSize = IBG (56,664 - 87)
/ 87 = 650.31+miscbits
Kindly any of you good can help me how to calculate the number of blocks created for the given logical record length and block size. In another occasion I found the below note
If you used IDCAMS to copy & re-block a badly blocked dataset with
BLKSIZE=80,LRECL=80 with no special JCL coding, you would receive
5 buffers for input and output. There are 77 records per track with
this DCB.
Is there any formula to calculate the number of blocks created for the track? In a above note the block / track is 77.
Could any one please help me? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Blocks per track cannot be calculated simply by dividing 56664 by the record size -- a 3390 is a CKD and each block has overhead and a gap to count in. I haven't seen it lately but IBM used to have a chart giving the range of block sizes that would fit a given number of blocks on a track (for example, something to 27998 fits 2 blocks per track). |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
try Quickref 3380 or 3390 and then select either
Quote: |
3390 IBM DASD DEVICE INFO. Z/OS V1 & PRIOR
3390 IBM MVS REFERENCE INFO. Z/OS V1 & PRIOR
|
for 3390 or
Quote: |
3380 IBM DASD DEVICE INFO. Z/OS V1 & PRIOR
3380 IBM MVS REFERENCE INFO. Z/OS V1 & PRIOR
|
for 3380.
Gerry |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2596 Location: Silicon Valley
|
|
|
|
Specify a BLKSIZE of zero. The system will figure out the best blocksize.
It is not clear what you are trying to learn. LRECL=1, BLKSIZE=1 is not a real world situation. |
|
Back to top |
|
|
Bill Dennis
Active Member
Joined: 17 Aug 2007 Posts: 562 Location: Iowa, USA
|
|
Back to top |
|
|
sprasannapathy
New User
Joined: 04 Jan 2008 Posts: 42 Location: india
|
|
|
|
Hi gcicchet,
Thanking you for your kind reply. The calculation is for 3390. My intent is how to calculate the number of blocks for per track. Is there any formula? Or we can get it from any ISPF screens.
Thanks
Prasannaa S |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
|
|
what is not clear in that table...
- in the table record is synonym of block
so for example look at the row starting with 951...
for a block size between 951 and 984 You get a utilization of 60.8% with 35 blocks per track with a capability of 34440 bytes per track |
|
Back to top |
|
|
sprasannapathy
New User
Joined: 04 Jan 2008 Posts: 42 Location: india
|
|
|
|
Hi enrico sorichetti,
Thanking you for your kind comeback. My intention is to how to calculate number of blocks per cylinder. In the referred chart we are able to see only the figures (example; for a block size between 951 and 984 - the number of blocks per cylinder is 35. I want to know how we get the value 35). Kindly help me.
Thanks
Prasannaa S |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
Back to top |
|
|
sprasannapathy
New User
Joined: 04 Jan 2008 Posts: 42 Location: india
|
|
|
|
Thanking you for the reply. Kindly explain me what is C, in K explain me what is the figure 9, 34, 6, kn and similarly for data length.
Space = C + K + D
= ? + Key-length +Data length
where:
C is 10.
K depends on the key length.
If KL = 0, K = 0.
If KL does not equal 0:
KL + (6 x KN) + 6
K = 9 + ------------------- (rounded up to an integer value)
34
where:
KL + 6
KN = -------- (rounded up to an integer value)
232
D is:
DL + (6 x DN) + 6
D = 9 + ------------------- (rounded up to an integer value)
34
where:
DL + 6
DN = -------- (rounded up to an integer value)
232
Thanks
Prasannaa S |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
|
|
that's simple math, what is that You do not understand |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
My intention is to how to calculate number of blocks per cylinder. In the referred chart we are able to see only the figures (example; for a block size between 951 and 984 - the number of blocks per cylinder is 35. I want to know how we get the value 35) |
Uh, you DO know that there are 15 tracks per cylinder on a 3390? And you DO know that the table provides blocks per track, not cylinder?
The value 35 comes from the table. If you study disk drive geometry and hardware for 6 to 12 months and focus on the CKD drives, you can probably figure out exactly how the 35 was derived (assuming you can look at IBM's hardware design documents, of course). If you don't have the time, or access, than just accept the number in the table. Asking for anything more would be like wanting to know why the value of PI is 3.14159... (the answer is, IT JUST IS) |
|
Back to top |
|
|
sprasannapathy
New User
Joined: 04 Jan 2008 Posts: 42 Location: india
|
|
|
|
Thanking you for the reply. Could you explain what is the function of the constants 9, 6, 32, dn, 232. For example track capacity is calculated by
1729 / space. Where the constant 1729 means each 3390 track is divided into 1729 user data cells.
Thanks
Prasannaa |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
|
|
if You notice not even the manual gives an explanation for the constants
also I would like to point out that You would get more satisfaction
by searching an finding things on your own , rather than by asking
google for ( for example
ibm dasd hardware architecture ckd 3390 3990 fba redbooks systems journal
and slowly You will learn |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
The constants are constants based on the device geometry. They are provided in the formulas from IBM. You could raise an issue with IBM about why they are the values they are, but don't expect an answer anytime soon since they are the values they are.
And unless you're doing very low-level hardware programming, ignore the 1729 data cells and work with records, blocks, and bytes. I've never in many years of mainframe programming needed to know the 1729 value or use it in any calculations. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
|
|
if You are really feel the need to know...
impendig anorexia
long sleepless nights,
nightmares of bytes losing the parity...
add as many as You want
You can try by searching the US patents data base,
hard to believe but it contains lots of trade secrets
PS
the wrath
Quote: |
that all your bytes lose their parity |
is my favorite |
|
Back to top |
|
|
sprasannapathy
New User
Joined: 04 Jan 2008 Posts: 42 Location: india
|
|
|
|
Thanking all of you for your kind response and guidance.
Thanks
Prasannaa S |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
|
|
here is a small REXX I wrote for blksize calculations
tested with oorexx on Leopard and windows/XP
... should work with any Rexx on any opsys
save it anywhere along the path with any name,
NOTE: invoking it with lrecl 1 will reproduce the table in the manual
Code: |
#! /opt/ooRexx/bin/rexx
/*REXX - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
/* */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
Trace "O"
parse source _source_
parse var _source_ _opsys_ _envir_ _commnd_ .
_opsys_ = lower(_opsys_)
if abbrev(_opsys_,"windows") then do
__PSEP__ = "\"
end
else do
__PSEP__ = "/"
end
p = lastpos(__PSEP__,_commnd_)
interpret "parse var _commnd_ with 1 _mypath "p" . "p+1" _myself"
parse var _myself _myname "." _myextn
TRKCAP = 56664
MAXREC = 32760
MAXKEY = 256
parse arg args
args = strip(args)
argc = words(args)
if argc = 0 then do
say _myname "- needs at least one argument"
say _myname "- syntax is '"_myname" lrecl [keylength]'"
exit
end
if argc > 2 then do
say _myname "- supports only two arguments"
say _myname "- syntax is '"_myname" lrecl [keylength]'"
exit
end
parse var args reclen keylen
reclen = strip(reclen)
keylen = strip(keylen)
if keylen = "" then ,
keylen = 0
if datatype(reclen) \= "NUM" | ,
datatype(keylen) \= "NUM" then do
say _myname "- not numeric arguments, retry "
exit
end
if reclen > MAXREC then do
say _myname "- reclen" reclen "out of range, up to" MAXREC "allowed"
exit
end
if keylen > MAXKEY then do
say _myname "- keylen" keylen "out of range, up to" MAXKEY "allowed"
exit
end
c_blksz = reclen
c_count = blksxtrk(c_blksz,keylen)
i_blksz = c_blksz
i_count = c_count
p_blksz = c_blksz
p_count = c_count
if keylen \= 0 then ,
say _myname "- keylen lrecl min-blksz max-blksz blocks"
else ,
say _myname "- lrecl min-blksz max-blksz blocks"
do i = reclen to MAXREC by reclen
c_blksz = i
c_count = blksxtrk(c_blksz,keylen)
if c_count \= p_count then do
if keylen \= 0 then ,
say _myname "-" right(keylen, 7) || ,
right(reclen, 7) || ,
right(i_blksz, 10) || ,
right(p_blksz, 10) || ,
right(p_count, 7)
else ,
say _myname "-" right(reclen, 7) || ,
right(i_blksz, 10) || ,
right(p_blksz, 10) || ,
right(p_count, 7)
i_blksz = c_blksz
i_count = c_count
end
p_blksz = c_blksz
p_count = c_count
end
if keylen \= 0 then ,
say _myname "-" right(keylen, 7) || ,
right(reclen, 7) || ,
right(i_blksz, 10) || ,
right(p_blksz, 10) || ,
right(p_count, 7)
else ,
say _myname "-" right(reclen, 7) || ,
right(i_blksz, 10) || ,
right(p_blksz, 10) || ,
right(p_count, 7)
exit
blksxtrk:procedure
parse arg blksz, keyln
c = 10
if keyln = 0 then ,
k = 0
else do
kn = ( keyln + 6 ) % 232 + 1 - ( ( ( keyln + 6 ) // 232) = 0 )
k = 9 + ( keyln + 6 * kn + 6 ) % 34 + 1 - ( ( ( keyln + 6 * kn + 6 ) // 34) = 0 )
end
dn = ( blksz + 6 ) % 232 + 1 - ( ( ( blksz + 6 ) // 232) = 0 )
d = 9 + ( blksz + 6 * dn + 6 ) % 34 + 1 - ( ( ( blksz + 6 * dn + 6 ) // 34) = 0 )
s = c + k + d
return 1729 % s
|
if asked nicely I might post also the ISPF edit macro version |
|
Back to top |
|
|
|