Page 1 of 1

how much space does it occupy?

PostPosted: Mon Oct 10, 2011 4:18 pm
by ranga_subham
Hi, One of our job is daily abending with SB37. Below given are parameters coded on output dataset:

//DSNOUT   DD DSN=OUTPUT.DATASET,       
//           DISP=(NEW,CATLG,DELETE),       
//           UNIT=TEMPDA,
//           SPACE=(10796,(600,300),RLSE),   
//           DCB=(RECFM=FB,LRECL=80,DSORG=PS,
//             BLKSIZE=3120)                 


We modified the SPACE to below value to overcome space abend.

//           SPACE=(10796,(1500,1000),RLSE), 


Can you please help me to understand what could be the problem with this kind of coding? And, I would like to know how much space this one turns out to be? What is the better way of coding it?

Please help.

Thanks.

Re: how much space does it occupy?

PostPosted: Mon Oct 10, 2011 4:52 pm
by Robert Sample
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.

Re: how much space does it occupy?

PostPosted: Mon Oct 10, 2011 5:36 pm
by steve-myers
Mr. Sample's discussion is excellent. His argument to allocate space in cylinders is 100% correct, though translating your requirement to cylinders is not always easy. However, you can make z/OS do the translation for you! Specify ROUND the JCL SPACE parameter to ndirect z/OS to do the translation. This is tricky because it's positional, and I always (yes, after more than 40 years!) have to use the JCL manual to specify it.

More in point, you can easily get the current space for a dataset by using ISPF option 3.2.

Re: how much space does it occupy?

PostPosted: Mon Oct 10, 2011 7:09 pm
by ranga_subham
Hi Robert & Steve,

Thanks a lot for your inputs...........the problem is this dataset gets deleted because it got below disposition.

DISP=(SHR,DELETE,KEEP)


So, I am unable to find the exact details. I am planning to change block size from BLKSIZE=3120 to BLKSIZE=0 and introduce AVGREC=K as suggested by Robert. I wonder why this space calculation is always a puzzle and not easy to digest !! How the problem had been resolved with increased space parameters?

Thanks.

Re: how much space does it occupy?

PostPosted: Mon Oct 10, 2011 10:18 pm
by Akatsukami
ranga_subham wrote:Hi Robert & Steve,

Thanks a lot for your inputs...........the problem is this dataset gets deleted because it got below disposition.

DISP=(SHR,DELETE,KEEP)

And yet, in your first post, you allege that it has a disposition of (NEW,CATLG,DELETE). What is the cause of this discrepancy?

Re: how much space does it occupy?

PostPosted: Tue Oct 18, 2011 4:03 pm
by ranga_subham
Looks like you are new to mainframe programming........You can't have DISP=(SHR,DELETE,KEEP) on a new dataset getting created :x :shock:

Thanks.

Re: how much space does it occupy?

PostPosted: Tue Oct 18, 2011 6:17 pm
by Akatsukami
ranga_subham wrote:Looks like you are new to mainframe programming........You can't have DISP=(SHR,DELETE,KEEP) on a new dataset getting created :x :shock:

Ah, so you've started talking about something that you concealed from us in your initial post! :P

Re: how much space does it occupy?

PostPosted: Tue Oct 18, 2011 10:37 pm
by dick scherrer
Hello,

Looks like you are new to mainframe programming........You can't have DISP=(SHR,DELETE,KEEP) on a new dataset getting created
You (r_s) were the one who posted this. Why do you now say this "looks like someone new to mainframe"?

Everyone else participating in this topic is a "senior".

Possibly, ive gotten lost here .