Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

No. of Bytes that a block occupies

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
GaganGarg

Active User


Joined: 31 Mar 2010
Posts: 132
Location: India

PostPosted: Thu Sep 02, 2010 12:38 pm    Post subject: No. of Bytes that a block occupies
Reply with quote

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
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Sep 02, 2010 1:03 pm    Post subject:
Reply with quote

Why do you not know the BLKSIZE
Back to top
View user's profile Send private message
GaganGarg

Active User


Joined: 31 Mar 2010
Posts: 132
Location: India

PostPosted: Thu Sep 02, 2010 1:24 pm    Post subject:
Reply with quote

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
View user's profile Send private message
GaganGarg

Active User


Joined: 31 Mar 2010
Posts: 132
Location: India

PostPosted: Thu Sep 02, 2010 1:34 pm    Post subject:
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Sep 02, 2010 1:41 pm    Post subject:
Reply with quote

If you know the BLKSIZE and the number of blocks used, then the result would be the product of the two.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Thu Sep 02, 2010 3:20 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu Sep 02, 2010 7:25 pm    Post subject:
Reply with quote

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
View user's profile Send private message
GaganGarg

Active User


Joined: 31 Mar 2010
Posts: 132
Location: India

PostPosted: Thu Sep 02, 2010 7:38 pm    Post subject:
Reply with quote

I found it while googling that system will decide the otimal blocksize if not specified in the JCL but certain conditions must be met. Here i am pasting a link. still this tab was opened in my PC so got it easily:

http://publib.boulder.ibm.com/infocenter/zos/v1r9/index.jsp?topic=/com.ibm.zos.r9.idad400/sys.htm

Thanks
Gagan
Back to top
View user's profile Send private message
Ronald Burr

Active User


Joined: 22 Oct 2009
Posts: 293
Location: U.S.A.

PostPosted: Thu Sep 02, 2010 7:51 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu Sep 02, 2010 8:07 pm    Post subject:
Reply with quote

GaganGarg wrote:
I found it while googling that system will decide the otimal blocksize if not specified in the JCL but certain conditions must be met. Here i am pasting a link. still this tab was opened in my PC so got it easily:

http://publib.boulder.ibm.com/infocenter/zos/v1r9/index.jsp?topic=/com.ibm.zos.r9.idad400/sys.htm

Thanks
Gagan
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
icon_sad.gif icon_confused.gif
Back to top
View user's profile Send private message
GaganGarg

Active User


Joined: 31 Mar 2010
Posts: 132
Location: India

PostPosted: Thu Sep 02, 2010 8:14 pm    Post subject:
Reply with quote

Perhaps system is deciding the most optimal block size icon_smile.gif but don't know the reason why it comes same for the different LRCLs icon_sad.gif
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) icon_sad.gif
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu Sep 02, 2010 8:20 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORT Block of records girishb2 DFSORT/ICETOOL 12 Thu Sep 15, 2016 8:58 am
No new posts Which Control block has the DSNTYPE i... sudarshan.srivathsav PL/I & Assembler 4 Thu Jan 28, 2016 11:29 pm
No new posts NDM a variable block file spoorni IBM Tools 5 Wed Dec 23, 2015 6:08 am
No new posts FIXED BIN (31) and FIXED BIN (63) - H... sundarkudos PL/I & Assembler 4 Thu Nov 05, 2015 1:11 pm
No new posts Syncsort 1.4.2 - Variable file - Igno... TS70363 SYNCSORT 9 Fri May 22, 2015 9:45 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us