MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Block size considerations.

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
srimachan
Beginner


Joined: 17 Dec 2002
Posts: 5
Topics: 2
Location: Concord, USA

PostPosted: Tue Dec 17, 2002 6:57 pm    Post subject: Block size considerations. Reply with quote

FD TEST-FILE
RECORDING MODE F
LABEL RECORDS ARE STANDARD
BLOCK CONTAINS 0 RECORDS
DATA RECORD IS TEST-REC.

I see that the BLOCK CONTAINS statement along with the RECORD CONTAINS statement is used to calculate the block size.

My understanding is that , based on this detail the data read is optimized.

Could someone add more info on the same.

Thanx in advance,
Srimachan.
_________________
Keep Smiling Wink
Back to top
View user's profile Send private message
nxn00
Beginner


Joined: 02 Dec 2002
Posts: 18
Topics: 0
Location: US

PostPosted: Tue Dec 17, 2002 7:39 pm    Post subject: Reply with quote

Hi, srimachan!

The system will calculate the optimal block size for you. You shouldn't try calculating it for yourself. Your JCL DD statement for that dataset should include in the DCB BLKSIZE=0.
_________________
Natalie
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12368
Topics: 75
Location: San Jose

PostPosted: Tue Dec 17, 2002 7:55 pm    Post subject: Reply with quote

Srimachan,

Block contains 0 records indicates to the system that information about blocksize should be taken either from JCL or Label. This is done to avoid recompilation of the pgm any time the data set blocksize is changed.

If you code BLKSIZE=0 and if you have SMS at your shop, then the system automatically calculates the optimal blocksize.

Hope this helps...


cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
srimachan
Beginner


Joined: 17 Dec 2002
Posts: 5
Topics: 2
Location: Concord, USA

PostPosted: Tue Dec 17, 2002 7:57 pm    Post subject: Reply with quote

Thank U all ..

Regards
Srimachan
_________________
Keep Smiling Wink
Back to top
View user's profile Send private message
CaptBill
Beginner


Joined: 02 Dec 2002
Posts: 100
Topics: 2
Location: Pasadena, California, USA

PostPosted: Wed Dec 18, 2002 4:17 pm    Post subject: Reply with quote

One thing about BLOCK CONTAINS and RECORD CONTAINS clauses is that they are really not necessary. If you have them, the length of the RECORD CONTAINS must be the length of the calculated record length based on the PIC clauses in the record. If you are off, you get a compile error. If you change block size, you may get an error during execution, I'm not sure.

I generally do not code anything but BLOCK CONTAINS 0 RECORDS.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
RonB
Beginner


Joined: 02 Dec 2002
Posts: 93
Topics: 0
Location: Orlando, FL

PostPosted: Wed Dec 18, 2002 4:44 pm    Post subject: Reply with quote

CaptBill
You say
Quote:
One thing about BLOCK CONTAINS and RECORD CONTAINS clauses is that they are really not necessary
and while that may be true, according to the manual
Quote:
If the records in the file are not blocked, the BLOCK CONTAINS clause can be omitted. When it is omitted, the compiler assumes that records are not blocked
ergo, if you leave off the BLOCK CONTAINS clause, the compiler will assume BLOCK CONTAINS 1 RECORD and will allocate buffers accordingly. For output files, that means that any BLKSIZE coded in the JCL will be ignored. For input files, it means that any BLKSIZE larger than the maximum LRECL ( +4 for Variable Length Files ) will result in an ABEND. Unless you INTEND to have unblocked files, ALWAYS code BLOCK CONTAINS 0 RECORDS.

Ron
Back to top
View user's profile Send private message
CaptBill
Beginner


Joined: 02 Dec 2002
Posts: 100
Topics: 2
Location: Pasadena, California, USA

PostPosted: Wed Dec 18, 2002 5:08 pm    Post subject: Reply with quote

RonB

I guess you didn't see the last line of my original comment.

Quote:
I generally do not code anything but BLOCK CONTAINS 0 RECORDS.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
RonB
Beginner


Joined: 02 Dec 2002
Posts: 93
Topics: 0
Location: Orlando, FL

PostPosted: Thu Dec 19, 2002 10:37 am    Post subject: Reply with quote

Yes, I DID see the last line of your original post. But the fact that you "GENERALLY" don't code anything other than BLOCK CONTAINS 0 RECORDS does not educate others in WHY they should NOT OMIT that statement unless they mean to accept the consequences - that is, the inability to process anything other than single record blocks.
My comment, though a response to your post, was not really for your benefit, but for those who may have easily misinterpreted your post.
Ron
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group