Page 1 of 2

space calculation

PostPosted: Fri Oct 14, 2016 9:06 am
by myshah
please advice me, for 1.5 mil record, how to define primary and secondary cylinder in jcl.

Re: space calculation

PostPosted: Fri Oct 14, 2016 11:08 am
by steve-myers
myshah wrote:please advice me, for 1.5 mil record, how to define primary and secondary cylinder in jcl.
You left out a few details, like How large are the records? One 3390 cylinder holds roughly 750,000 bytes.

For fixed length records in a sequential data set -
  1. Determine the actual BLKSIZE you will use.
    • Determine the blocking factor (number of logical records in 1 physical record) you will use. This is usually considered optimal - 23476/record length. For 80 byte records, 23476 / 80 = 293
    • Determine the BLKSIZE - 293 * 80 = 23440
  2. Determine the number of physical records - 1,500,000 / 293 = 5120
  3. Determine the number of tracks - 5120 / 2 = 2560
  4. Determine the number of cylinders - 2560 / 15 = 171
  5. Add 10% - 171 * 1.10 = 177
These are the "magic" numbers
  • 23476 - This is the largest physical record that will allow 2 physical records on a 3390 track
  • 15 - The number of tracks in a 3390 cylinder.
Secondary cylinders are kind of arbitrary. If you are confident, 10% is good for a moderately large data set like this one.

Re: space calculation

PostPosted: Fri Oct 14, 2016 11:20 am
by Aki88
Hello,

Space calculation for a dataset is a simple task, yet can go wrong on many levels. In your case, you've given insufficient information to provide a clean solution.
To really understand the concepts of it, you'll have to read the manuals (such as 'Using Data Sets' for starters and then moving onto 'Using IBM 3390 Direct Access Storage in an MVS Environment'), though you can refer this topic for a quick reckoner. Skip to Expat's post, which gives a detailed explanation as to how you can arrive onto a value for Cylinder allocation; furthermore if you read the manuals stated earlier in this post, you'll come to know about the concept of 'extent', 'multi-volume dataset', 'format=large/extended' and so on- all of which play important role in dataset storage usage.

Read through, understand the concept, use it to come up with an allocation; if you're stuck at any point, let us know where and we can guide you.


Edit: Sorry Steve didn't see your post, I think I started the reply earlier hence missed the post.

Re: space calculation

PostPosted: Fri Oct 14, 2016 11:28 am
by prino
steve-myers wrote:23476 - This is the largest physical record that will allow 2 physical records on a 3390 track

That's a 3380. A 3390 holds 2 x 27998 bytes per track!

Re: space calculation

PostPosted: Fri Oct 14, 2016 2:33 pm
by myshah
below is a detail what i define in Jcl


SPACE=(CYL,(50,10),RLSE),DISP=(,CATLG),UNIT=3390,
VOL=SER=(HA1000),
DCB=(LRECL=264,BLKSIZE=0,RECFM=FB)

but i still got error :34

Re: space calculation

PostPosted: Fri Oct 14, 2016 4:18 pm
by steve-myers
prino wrote:
steve-myers wrote:23476 - This is the largest physical record that will allow 2 physical records on a 3390 track

That's a 3380. A 3390 holds 2 x 27998 bytes per track!
Senior moment. Used the wrong table.


27998 / 80 = 349
349 * 80 = 27920
1,500,000 / 349 = 4298
4298 / 2 = 2149
2149 / 15 = 144
144 * 1.10 = 158

Re: space calculation

PostPosted: Fri Oct 14, 2016 5:02 pm
by Aki88
Hello,

myshah wrote:.... but i still got error :34


Can you please show us what made you assume that there was a problem with allocation and nothing else in your JCL.

Error, what error; what was the exact error message/code/identifier- anything for that matter - returned by the failing JCL.

Also, did you understand Mr. Myers post, or the link I'd shared earlier, both of which detail the maths behind space allocation calculation.

Please try and understand- you are providing very little or no information for the 'error' you're facing; for the original space calculation query, enough has already been posted here to help you out in coming up with the number of cylinders required for your dataset.

Re: space calculation

PostPosted: Fri Oct 14, 2016 5:55 pm
by Akatsukami
myshah wrote:below is a detail what i define in Jcl


SPACE=(CYL,(50,10),RLSE),DISP=(,CATLG),UNIT=3390,
VOL=SER=(HA1000),
DCB=(LRECL=264,BLKSIZE=0,RECFM=FB)

but i still got error :34

Why are you specifying a VOLSER?

Re: space calculation

PostPosted: Fri Oct 14, 2016 7:05 pm
by Robert Sample
SPACE=(CYL,(50,10),RLSE),DISP=(,CATLG),UNIT=3390,
VOL=SER=(HA1000),
DCB=(LRECL=264,BLKSIZE=0,RECFM=FB)

but i still got error :34
No surprise there -- 1.5 million 264-byte records needs 472 cylinders and you've allowed at most 200 cylinders with your JCL.

Re: space calculation

PostPosted: Fri Oct 14, 2016 8:44 pm
by steve-myers
Akatsukami wrote:
myshah wrote:below is a detail what i define in Jcl


SPACE=(CYL,(50,10),RLSE),DISP=(,CATLG),UNIT=3390,
VOL=SER=(HA1000),
DCB=(LRECL=264,BLKSIZE=0,RECFM=FB)

but i still got error :34

Why are you specifying a VOLSER?
Not everyone uses SMS, or, perhaps, the TS chose the volume for some reason he need not disclose here.

Personally, I would specify DCB=(LRECL=264,DSORG=PS,RECFM=FB) so that allocation, rather than OPEN determines and fills in the actual BLKSIZE.

I also note that the JCL specifies DISP=(,CATLG) and does not specify a data set name. This error 34 may be a JCL checker rather than the system or the user program.