by Robert Sample » Mon Oct 10, 2011 4:52 pm
First, you need to understand that you are completely on the wrong path. In order to know how much space you need to allocate, you MUST know the number of records to be written to that file. If you don't know, then a guess is fine -- but the block size, record length, and number of records is all you need to figure out the required space.
Second, your posted JCL is garbage. If you look at your site's copy of the MVS JCL Reference manual, or even look at the IBM web site to find it, you will find that SPACE=(10796,(600,300),RLSE), is allocating primary space of 600 blocks at 10796 bytes each since you are NOT using AVGREC. Since your record length is 80 and you are using fixed length records, the block size is supposed to be an even multiple of 80. 10796 is not. I suspect the only reason you did not get a JCL error is because you specified BLKSIZE=3120, which IS an even multiple of 80.
Third, the SB37 means either (a) your data set hit 16 extents and needed more -- in which case your allocation needs to be at least 5100 for primary -- or (b) your data set did not hit 16 extents but the disk volume ran out of space, in which case you either need to allocate on a different volume or provide more volumes for the data set.
Fourth, allocating in blocks in wasteful -- use cylinders to reduce system overhead to a minimum, espeically since you apparently have a good bit of data in this data set.