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
 

 

Whats the meaning of BLOCK CONTAINS XX RECORDS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    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

murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
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: 203
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

Active User


Joined: 11 May 2005
Posts: 344
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: 1288
Location: Chennai, 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: 1439
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: 1288
Location: Chennai, 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: 1439
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts what is meaning of the number in dcl Martylin PL/I & Assembler 2 Thu Mar 09, 2017 7:18 am
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am


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