Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Whats the meaning of BLOCK CONTAINS XX RECORDS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL
Author Message
swapnadeep.ganguly

Active User


Joined: 21 Mar 2007
Posts: 171
Location: India

PostPosted: Fri Sep 21, 2007 10:37 am    Post subject: Whats the meaning of BLOCK CONTAINS XX RECORDS
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
References
murmohk1

Senior Member


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

PostPosted: Fri Sep 21, 2007 10:52 am    Post subject:
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: 171
Location: India

PostPosted: Fri Sep 21, 2007 10:58 am    Post subject:
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

Senior Member


Joined: 11 May 2005
Posts: 315
Location: Spain

PostPosted: Fri Sep 21, 2007 11:42 am    Post subject:
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: 1148
Location: Mumbai - India

PostPosted: Fri Sep 21, 2007 12:37 pm    Post subject: Reply to: BLOCK CONTAINS
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]
http://ibmmainframes.com/about705.html[/url]
Back to top
View user's profile Send private message
murmohk1

Senior Member


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

PostPosted: Fri Sep 21, 2007 12:46 pm    Post subject:
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: 1148
Location: Mumbai - India

PostPosted: Fri Sep 21, 2007 12:52 pm    Post subject: Reply to: BLOCK CONTAINS
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: 1477
Location: Bangalore,India

PostPosted: Fri Sep 21, 2007 12:58 pm    Post subject:
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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL All times are GMT + 6 Hours
Page 1 of 1