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
 

 

BLOCK CONTAINS ZERO RECORDS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: BLOCK CONTAINS ZERO RECORDS
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    Post subject: Re: BLOCK CONTAINS ZERO RECORDS
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    Post subject: Re: BLOCK CONTAINS ZERO RECORDS
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    Post subject:
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    Post subject:
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    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 Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am
No new posts Inserting records based on conditions vickey_dw DFSORT/ICETOOL 9 Wed Feb 22, 2017 1:33 pm
No new posts To Merge mutliple records into a sing... anandgbe DFSORT/ICETOOL 6 Wed Feb 22, 2017 8:49 am


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