IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Whats the meaning of BLOCK CONTAINS XX RECORDS


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
swapnadeep.ganguly

Active User


Joined: 21 Mar 2007
Posts: 203
Location: India

PostPosted: Fri Sep 21, 2007 10:37 am
Reply with quote

Hi,

In the FD part, we specify the word BLOCK CONTAINS XX RECORDS.

Can anyone please let me know what actually this means.

Basically I have to read from a table into a flat file. The table has a max of 200 entries. So shall I Mention
BLOCK CONTAINS 200 RECORDS???
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Fri Sep 21, 2007 10:52 am
Reply with quote

Swapna,

Let the block size determine at run time.
Back to top
View user's profile Send private message
swapnadeep.ganguly

Active User


Joined: 21 Mar 2007
Posts: 203
Location: India

PostPosted: Fri Sep 21, 2007 10:58 am
Reply with quote

So, I am required not to specify anything at COBOL as well as the JCL??
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Fri Sep 21, 2007 11:42 am
Reply with quote

nope, not specified is not the same as specify 0.

code
Code:
BLOCK CONTAINS 0 RECORDS.
...

search about it.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Fri Sep 21, 2007 12:37 pm
Reply with quote

In COBOL, you establish the size of a physical record with the BLOCK CONTAINS clause. The performance would be better with larger blocks.

Did a search and found this.

[url]
ibmmainframes.com/about705.html[/url]
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Fri Sep 21, 2007 12:46 pm
Reply with quote

Aaru,

Quote:
In COBOL, you establish the size of a physical record with the BLOCK CONTAINS clause. The performance would be better with larger blocks.


Where did you get this? Is this your personnel view.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Fri Sep 21, 2007 12:52 pm
Reply with quote

Did a search and found the same in the below mentioned link.

http://publib.boulder.ibm.com/infocenter/pdthelp/v1r1/index.jsp?topic=/com.ibm.entcobol3.doc/tpqsm14.htm
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Fri Sep 21, 2007 12:58 pm
Reply with quote

Aaru,

Did you read this?

Quote:
If you set the block size explicitly in the BLOCK CONTAINS clause, it must not be greater than the maximum block size for the device. The block size set for a format-F file must be an integral multiple of the record length.


Quote:
We recommend that to maximize performance, you not explicitly set the block size for a blocked file in your COBOL source program. For new blocked data sets, it is simpler to allow z/OS to supply a system-determined block size. To use this feature, follow these guidelines:

Code BLOCK CONTAINS 0 in your source program.
Do not code RECORD CONTAINS 0 in your source program.
Do not code a BLKSIZE value in the JCL DD statement.
on the device at run time. If you fix the block size, assuming the
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Join multiple records using splice DFSORT/ICETOOL 5
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
No new posts JCL sortcard to print only the records DFSORT/ICETOOL 11
Search our Forums:

Back to Top