View previous topic :: View next topic
|
Author |
Message |
GaganGarg
Active User
Joined: 31 Mar 2010 Posts: 134 Location: India
|
|
|
|
Hi,
I need to calculate the space occupied by a file in terms of number of BYTES. suppose SPACE parameter coded in the JCL is SPACE=(250,(10,10),RLSE). Here 250 is the number of BLOCKs that will be allocated to the file after creation(if i am not wrong). I know the formula to get the number of bytes allocated if space is specified in terms of TRKs or CYLs. but i don't know the number of bytes that a block can contain. Can anybody please help me regarding this? i will be very thankful.
Warm regards, |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Why do you not know the BLKSIZE |
|
Back to top |
|
|
GaganGarg
Active User
Joined: 31 Mar 2010 Posts: 134 Location: India
|
|
|
|
BLKSIZE is not specified in the JCL. I did some googling and come to know that when First quantity is equal to the LRECL(here 250), system will decide the most optimum BLKSIZE. |
|
Back to top |
|
|
GaganGarg
Active User
Joined: 31 Mar 2010 Posts: 134 Location: India
|
|
|
|
Expat,
If we know the BLKSIZE, then is there any formula to get number of bytes? I thought of taking the BLKSIZE from catalog information after file creation.
In my case for above space parameter(SPACE=(250,(10,10),RLSE)), BLKSIZE is 27750(I checked the catlog information for the desired file). |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
If you know the BLKSIZE and the number of blocks used, then the result would be the product of the two. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
Here 250 is the number of BLOCKs that will be allocated to the file after creation(if i am not wrong). |
Actually, you ARE wrong. From the JCL Language Reference manual (link at the top of the page), section 12.60.1:
Code: |
SPACE= ({TRK,}(primary-qty[,second-qty][,directory])[,RLSE][,CONTIG][,ROUND])
({CYL,} [, ] [, ][,MXIG ]
({blklgth,} [,ALX ]
({reclgth,} [, ]
|
You're probably getting 27750 from SMS -- but the 250 will never represent the number of blocks. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
GaganGarg wrote: |
BLKSIZE is not specified in the JCL. I did some googling and come to know that when First quantity is equal to the LRECL(here 250), system will decide the most optimum BLKSIZE. |
Do you have some reference document for this, please. |
|
Back to top |
|
|
GaganGarg
Active User
Joined: 31 Mar 2010 Posts: 134 Location: India
|
|
Back to top |
|
|
Ronald Burr
Active User
Joined: 22 Oct 2009 Posts: 293 Location: U.S.A.
|
|
|
|
Try THIS LINK
Note that the first number only represents a RECORD length if an AVGREC parameter is ALSO coded AND SMS is active, otherwise it represents a BLOCK length. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Thanks but I could not figure that out what you have told. However I tried this:
Quote: |
//STEP0010 EXEC PGM=IEFBR14
//DD1 DD DSN=HLQ.LLQ.INP80,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,SPACE=(10,(10,10),RLSE),
// DCB=(LRECL=80,RECFM=FB)
//* |
and this
Quote: |
//STEP0010 EXEC PGM=IEFBR14
//DD1 DD DSN=HLQ.LLQ.INP10,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,SPACE=(10,(10,10),RLSE),
// DCB=(LRECL=10,RECFM=FB)
//* |
Both the times BLKSIZE was same:
Quote: |
Data class . . . . . : DEFAULT
Organization . . . : PS
Record format . . . : FB
Record length . . . : 80
Block size . . . . : 27920
1st extent blocks . : 2
Secondary blocks . : 10 |
and
Quote: |
Data class . . . . . : DEFAULT
Organization . . . : PS
Record format . . . : FB
Record length . . . : 10
Block size . . . . : 27920
1st extent blocks . : 2
Secondary blocks . : 10 |
|
|
Back to top |
|
|
GaganGarg
Active User
Joined: 31 Mar 2010 Posts: 134 Location: India
|
|
|
|
Perhaps system is deciding the most optimal block size but don't know the reason why it comes same for the different LRCLs
I saw number of jcls in our production libraries, and most of the time, blocksize is not specified while creating the files (when first argument is SPACE parameter is equal to LRECL) |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Quote: |
blocksize is not specified while creating the files (when first argument is SPACE parameter is equal to LRECL) |
you seem to get a false impression. It might be just a coincidence. In the IEFBR14 steps I showed, I've not used any BLKSIZE. Usually, I code LRECL and RECFM and leave BLKSIZE on system to determine. And if there is a pressing need to code BLKSIZE I use BLKSIZE=0. So that system decides what is the optimum and it's, anyways, 0 till the file is not written to. |
|
Back to top |
|
|
|