On Sat, 29 Apr 2017 11:17:43 -0500, Paul Gilmartin <paulgboul...@aim.com> wrote:
>On Sat, 29 Apr 2017 12:39:00 +0200, Peter Hunkeler wrote: >> >>AVGREC is a funny beast. it specifies the multiplier to be applied to the >>primary and secondary space figures. The resulting number is the number of >>records that must fit into the final space allocation. To calculate this >>value, the system needs the (average) record length. This value, however, is >>not taken neither from the LRECL, nor from the BLKSIZE. In JCL, it is the >>first sub-operand of the SPACE= specification. >> >This is a nightmare. > >When they say "record" do they mean "block? Usually? I can't say for sure, but I believe, and the way we always used, going back to the c. 1994 when we started using it, was that the design goal for this support was to give the application programmer a way of space that they understood. After all, they should inherently have an idea of how many records that their job creates or consumes because that has some sort of business connection that they understand. I.E. this job normally processes "x" accounts, each account has "y" records in this file, so we need a file that can hold about x*y records. If you have fixed-length records, you know the length of each record. But if you have variable length records, it's a little more variable. But the application programmer should have a decent idea of the average length of those records. From there you need to convert those numbers to some number of tracks based on the block size and the average number records per block based on their average record length. By using the AVGREC allocation method, the application programmer can just give the information to the system and let it figure it out instead of doing the math themselves. Which seems like it should make life easier for everybody. At least that seems like a good theory. In practice I found a distressing number of application programmers who didn't actually know the business numbers--i.e. that they were going to process x accounts each night. To me this seems to be a larger problem than just not being able to allocate space correctly. One might argue that if one is guessing at space allocations, it doesn't really matter what units one is guessing in. Over 20 years later, disk is drastically cheaper and larger and so the need to allocate the data set size correctly is probably reduced in many shops. But my guess is that most also don't want every space allocation to be SPACE=(CYL,(1000,1000)). Having extensively used the AVGREC allocation method 20+ years ago I probably knew the answer to your questions at one time, but the only one I remember for sure is that it works fine with SMS. Scott Chapman ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN