Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 MXG - Processing Compressed DB2 SMF r... vasanthz All Other Mainframe Topics 2 Thu May 10, 2018 12:47 am
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts Merge 2 records sancraig16 SYNCSORT 19 Tue Mar 27, 2018 8:17 pm
No new posts Copy set of records based on condition krish.deepu SYNCSORT 2 Thu Mar 08, 2018 11:39 am
No new posts add sequence number for duplicate rec... SRUTHI DRAVIDAMANI COBOL Programming 11 Thu Feb 22, 2018 5:37 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us