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

BLOCK CONTAINS ZERO RECORDS


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

New User


Joined: 29 Apr 2005
Posts: 13

PostPosted: Wed May 04, 2005 2:37 pm
Reply with quote

Hi,
What does it mean....
block contains zero records.
thanx,
sowjanya
Back to top
View user's profile Send private message
maverick05

New User


Joined: 14 Apr 2005
Posts: 54
Location: Earth

PostPosted: Wed May 04, 2005 3:08 pm
Reply with quote

Hi,
When we specify BLOCK CONTAINS 0 RECORDS ,the system will decide the optimum size for the file based on the device used for storing the file.
It can be understood as initialisation of a block.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Fri May 06, 2005 4:39 am
Reply with quote

Hi Maverick,

Although one can do what you stated when BCZR is used in a COBOL pgm, it is not the only thing that can be done.

What BCZR does is take the COBOL pgm out of the DCB merge chain for the BKLSIZE param. Otherwise, the blksize in the pgm (or the default of the rec len) would be used to override what might have been provided in the dd stmt or the DSCB/label/catalog.

So, for new datasets, you could use use your own blksize, do what you suggested or let SMS (if your site has it) do it. If you don't use BCZR the the blksize in the pgm will be used.
Back to top
View user's profile Send private message
Rajen

New User


Joined: 05 May 2005
Posts: 61

PostPosted: Fri May 06, 2005 6:47 pm
Reply with quote

When we write BLOCK CONTAINS 0 RECORDS
Whichever is appropriate will be taken by the system,but ususal practice is like we take care of Block Size in JCL code,which is very important.

Thanks,
Raj
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat May 07, 2005 6:48 am
Reply with quote

I should have mentioned this in my previous post. The approach mentioned by Maverick, while not the only approach, is the preferred approach because the system calculates the optimum blksize to use for the device assigned to the dataset.

This is very important since new device types are introduced with differing track capacities. BLKSIZE=0 in the DD stmt allows reallocation of the ds to the new device type without JCL changes, i.e. it is transparent to the application.

You must code both "BLOCK CONTAINS 0 RECORDS" in the FD of dataset and BLKSIZE=0 in the DD stmt to get the system to do the blksize calculation.
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 2 files and retrive records f... DFSORT/ICETOOL 2
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
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
Search our Forums:

Back to Top