MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to calculate space for a LRECL=500,FB and max 10000 recs
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12368
Topics: 75
Location: San Jose

PostPosted: Sun Dec 01, 2002 11:15 pm    Post subject: How to calculate space for a LRECL=500,FB and max 10000 recs Reply with quote

A 3390-n device has a capacity of 56,664 bytes per track,of which 55,996 bytes are accessible by applications programmers.

The largest blocksize you can define is 32,760, which is good for tapes,but it is mere waste on DASD, as 55,996 - 32760 = 23,236 bytes left over,and because tracks can't be shared between other files, that leftover space would just be wasted.

So,55,996/2=27,998,which is half-track blocking,the most space-efficient blocksize to use on 3390's.If you have 3380 devicetypes in your shop, the maximum half-track blocksize is 23,476.

To calculate the most efficient blocksize to use:
bestblocksize = INTEGER(half-track-blocksize/LRECL)*LRECL

In your case the lrecl is 500, so the best blocksize will be

Integer(27,998/500) is 55

55 multiplied by lrecl(500) gives you 27500 which is the optimum blksize.

On a 3390, the best blocksize for a QSAM (Queued Sequential Access Mode) file of record length 500 is 27,500.This will allow 55 records per block, or 110 records per track, or 1650 records per cylinder (cylinders are 15 tracks).

Since the volume of records you have is 10,000, you can fit that data in less than 7 cylinders(10,000/1650 = 6.06 rounded to 7)

So we allocate the primary space as 7 cylinders. Now the secondary space allocation is 20% of primary space
which in this case is 7 * 0.2 = 1.4 rounded to 2

So basically your space allocation for a dataset of lrecl 500 and a volume of 10,000 records would be

Code:

SPACE=(CYL,(7,2),RLSE)


So your file allocation would be

Code:

//FILE01    DD DSN=YOUR NEW SEQ FILE,
//             DISP=(NEW,CATLG,DELETE),
//             UNIT=SYSDA,
//             SPACE=(CYL,(7,2),RLSE),
//             DCB=(LRECL=500,RECFM=FB,BLKSIZE=27500)
/*   
Back to top
View user's profile Send private message Send e-mail Visit poster's website
blueash
Beginner


Joined: 02 Dec 2002
Posts: 16
Topics: 6

PostPosted: Wed Dec 04, 2002 11:48 am    Post subject: Reply with quote

Though its theoritical and there may be other optimizations also based on I/O speeds,
lets see this example.

LRECL=4000, Records=100,000, Optimum blksize comes out to be=24,000
=> 12 records/cylinder => 8334 cylinders to store this file.

Now if you make BLKSIZE=4000, there would be 13 records/cylinder
=> 7693 cylinders to store the same file.

Means 641 less cylinders(8% less space)

Any thoughts what blocksize system will give when we give blksize=0 for this file.

Thanks.
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12368
Topics: 75
Location: San Jose

PostPosted: Wed Dec 04, 2002 1:56 pm    Post subject: Reply with quote

Blueash,

You had the calculations wrong.Let me explain it crealy once again for you.

Lrecl=4000 ;Max no: of records = 100,000

27,998,which is half-track blocking,the most space-efficient blocksize to use on 3390's

To calculate the most efficient blocksize to use:
bestblocksize = INTEGER(half-track-blocksize/LRECL)*LRECL

In your case it is

INTEGER(27998/4000) = 6

So the optimal blocksize = 6 * 4000 = 24000

On a 3390, the best blocksize for a QSAM (Queued Sequential Access Mode) file of record length 4000 is 24,000.This will allow 6 records per block, or 12 records per track, or 180 records per cylinder (cylinders are 15 tracks).

So for 100,000 records it is only 556 cylinders

By making the blocksize 4000 you are writting only 1 record per block and 2 records per track and 30 records per cylinder

so for 100,000 records it 3334 cylinders which is 600% increase.

Fyi... If you code blksize=0 for this file you will get a system determined blocksize of 24000.

Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
RonB
Beginner


Joined: 02 Dec 2002
Posts: 93
Topics: 0
Location: Orlando, FL

PostPosted: Wed Dec 04, 2002 4:14 pm    Post subject: Reply with quote

The most efficient blocksize for 3390 DASD is not ALWAYS half-track blocking. With an LRECL of 9333, for instance, the most efficient BLKSIZE for 3390 DASD ( at half track or less ) is 9333. With a BLKSIZE of 9333 you can fit 1 record per block, 5 blocks per track, which is 5 records per track. With a BLKSIZE of 18666, you get 2 records per block, but only 2 blocks per track, yielding only 4 records per track. At a BLKSIZE of 27999 you get 3 records per block, but only 1 block per track, yielding only 3 records per track. You could go to a BLKSIZE of 55998 ( full track blocking ) to get 6 records per block/track which would be most efficient for 3390 DASD. At any rate, do not assume that half-track blocking is ALWAYS the most efficient.
Back to top
View user's profile Send private message
Bill Dennis
Advanced


Joined: 03 Dec 2002
Posts: 579
Topics: 1
Location: Iowa, USA

PostPosted: Wed Dec 04, 2002 4:55 pm    Post subject: Reply with quote

kolusu,
I must take exception to your response on the 4000 byte blocks.
Quote:
By making the blocksize 4000 you are writting only 1 record per block and 2 records per track and 30 records per cylinder
This is not correct. there would be more than 2 records/blocks per track. You'd get 12, in fact.

Blueash was also incorrect in calculating. There is wasted space in track overhead with smaller blksizes. Thats why larger blksizes are more efficient. You really need the IBM 3390 Reference Summary to see the track utilization at smaller blksizes.

Bill
Back to top
View user's profile Send private message
blueash
Beginner


Joined: 02 Dec 2002
Posts: 16
Topics: 6

PostPosted: Wed Dec 04, 2002 5:33 pm    Post subject: Reply with quote

Oops i forgot to divide by 15 at both places, but as Bill pointed out in case of LRECL=4000, there would not be 2 records/track, rather there would be 13 records/track.

So in this scenerio as far as space is concerned BLKSIZE=4000 would be more efficient then BLKSIZE=24000.

I guess it has also to do with I/O optimizations.

Try one more thing for LRECL=2000, BLKSIZE which system gives is 18000 and not 26000 as by the above formula.

There is something more to this SMS algorithm of IBM Question
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12368
Topics: 75
Location: San Jose

PostPosted: Wed Dec 04, 2002 5:58 pm    Post subject: Reply with quote

Bill Dennis,

Thanks for correcting me. I apolozise for posting the wrong info

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Premkumar
Moderator


Joined: 28 Nov 2002
Posts: 77
Topics: 7
Location: Chennai, India

PostPosted: Wed Dec 04, 2002 11:52 pm    Post subject: Reply with quote

RonB said
Quote:
You could go to a BLKSIZE of 55998 ( full track blocking ) to get 6 records per block/track which would be most efficient for 3390 DASD.

How do you define a block size larger than 32760?
When I tried in 3.2, I get the error message "Enter a numeric value between 0 and 32760"
Back to top
View user's profile Send private message Send e-mail
RonB
Beginner


Joined: 02 Dec 2002
Posts: 93
Topics: 0
Location: Orlando, FL

PostPosted: Thu Dec 05, 2002 7:50 am    Post subject: Reply with quote

Whoa! Mea culpa! The IBM 3390 Storage Manual ( GC26-4574-## ) has a table, at this link 3390 DASD Table. That table shows a max data length of 56,664. I just got brain-numb and forgot that that data length is more theoretical than practical. Thanks for the reminder.
Back to top
View user's profile Send private message
Bill Dennis
Advanced


Joined: 03 Dec 2002
Posts: 579
Topics: 1
Location: Iowa, USA

PostPosted: Thu Dec 05, 2002 8:57 am    Post subject: Reply with quote

blueash,
please see the 3390 DASD table link in Ron's post. You'll see that the 4000 blksize allows only 12 blks per trk, not 13. This is because of track overhead space wasted between blocks. Smaller blocks = more wasted space!

For the example large lrecl 0f 4000, either 24000 or 4000 blksize gets you 12 per trk. Exclamation

Bill
Back to top
View user's profile Send private message
blueash
Beginner


Joined: 02 Dec 2002
Posts: 16
Topics: 6

PostPosted: Thu Dec 05, 2002 9:56 am    Post subject: Reply with quote

Thanks for correction Bill.

Ron this table is quite helpful, thank you.

Very Happy
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Fri Dec 27, 2002 10:39 am    Post subject: Reply with quote

This thread has been really very informative.

I have a concern. I allocated a PS dataset, LRECL=80, RECFM=FB using IEFBR14. If the half-track blocking method were to be the best method, then, for a 3380 device, the BLKSIZE must have been 23440. But, when allocated by IEFBR14, the BLKSIZE comes out to be 27920.

In the first case, there would have been 293 records per block. In the latter case, there would be 349. No wonder, allowing the system to mind it's own business, results in a better BLKSIZE!

However, using IEFBR14, I was able to allocate the dataset with BLKSIZE=32720. This means, 409 records per block. Why is BLKSIZE of 32720 ineffecient wrt BLKSIZE of 27920?

How do I proceed to calculate the space for a dataset LRECL=80, RECFM=FB and number of records close to 10000? Can I assume, that 1 track contains 349 records (in case of system calculated BLKSIZE) or 409 (in case of max possibility)? Because, looking at the system calculated BLKSIZE, it seems the range that it took was,
Code:

                  27920<=MAX<28000

which is more than half-track limit.
_________________
ALL opinions are welcome.

Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12368
Topics: 75
Location: San Jose

PostPosted: Fri Dec 27, 2002 11:04 am    Post subject: Reply with quote

cogito,
A 3390-n device has a capacity of 56,664 bytes per track, of which 55,996 bytes are accessible by applications programmers.

Well you can create a DASD file with the largest blocksize of 32,760, which is fine for tapes, but would be quite wasteful on DASD, as 55,996 - 32760 = 23,236 bytes left over, and because tracks can't be shared between other files, that leftover space would just be wasted. So, 55,996/2=27,998, which is half-track blocking, the most space-efficient blocksize to use on 3390's. If you have 3380 devicetypes in your shop, the maximum half-track blocksize is 23,476.

I bet your shop has 3390-n device type. That is the reason as for the blocksize to be 27,920 using the half-track-blocksize

If you shop has indeed 3380-n device type,then your blocksize would have been 23,440 using the half-track-blocksize

Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Fri Dec 27, 2002 11:20 am    Post subject: Reply with quote

You are right, Kolusu. I am sorry, I must have checked that.

But, why BLKSIZE of 32720 ineffecient wrt BLKSIZE of 27920?
_________________
ALL opinions are welcome.

Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12368
Topics: 75
Location: San Jose

PostPosted: Fri Dec 27, 2002 1:06 pm    Post subject: Reply with quote

Cogito,

Let me go over it for you once again.Let us say we have a file with the following attributes.

Code:
LRECL=80,RECFM=FB,MAX NO: OF RECORDS : 600634


Let us now copy this file into 2 different file



  • one with a blksize of 32720
  • another with a blksize determined by the system (blksize=0)



so with a blocksize of 32,720 you will write 409 records per block.But the rest of the space out of 55,996 which is 23,276 is wasted.so you can only write 409 records per track and 6135(1 cylinder = 15 tracks) records per cylinder.so to accomadate 600,634 records you would need

(600634/6135) = 97.90 rounded to 98 cylinders

so the space utilization percentage is (32,720 * 100)/55996 = 58.43

Now let us take the other case with system determined blocksize which will result in having blocksize of 27920. with half track blocksize ,the wasted space is only 55,996-(27920 * 2) = 156

With that blocksize you can have 349 records per block and 698 records per track 10470 records per cylinder.so to accomadate 600,634 records you would need

(600634/10470) = 57.367 rounded to 58 cylinders

so the space utilization percentage is (27920 * 2 * 100)/55996 = 99.72

Now decide as to why blocksize of 27,920 is efficient when compared to blocksize of 32720.

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group