Is it necessary that block size must be multiple of LRECL?



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Is it necessary that block size must be multiple of LRECL?

Postby arya_starc » Thu Oct 13, 2016 2:45 pm

Hi All,

is it necessary that block size must be multiple of LRECL..as I found in my case it is not multiple.
Can anyone tell why

                             Data Set Information                              
Command ===>                                                                  
                                                                   More:     +
Data Set Name . . . . : AVPS.TEST.DS.SE                              
                                                                               
General Data                           Current Allocation                      
 Management class . . : MCNOMIG         Allocated tracks  . : 1                
 Storage class  . . . : SCNORMAL        Allocated extents . : 1                
  Volume serial . . . : TVP065                                                
  Device type . . . . : 3390                                                  
 Data class . . . . . : DCFBEX                                                
  Organization  . . . : PS             Current Utilization                    
  Record format . . . : VB              Used tracks . . . . : 1                
  Record length . . . : 25              Used extents  . . . : 1                
  Block size  . . . . : 27966                                                  
  1st extent tracks . : 1                                                      
  Secondary tracks  . : 10             Dates                                  
  Data set name type  : EXTENDED        Creation date . . . : 2016/10/13      
                                        Referenced date . . : 2016/10/13      
                                        Expiration date . . : ***None***      
  SMS Compressible  . : NO                                                    
                                                                               
                                                                               
 


this is the properties of file after catalouged
arya_starc
 
Posts: 136
Joined: Mon Sep 21, 2015 1:39 pm
Has thanked: 5 times
Been thanked: 0 time

Re: Is it necessary that block size must be multiple of LREC

Postby Aki88 » Thu Oct 13, 2016 3:28 pm

Hello,

Notice the RECFM VB, which means that your dataset has blocked variable-length records, this makes a difference here. You're correct about the multiples of LRECL logic, for variable length datasets, this changes to (LRECL + 4) and less that 32k.

For optimal space utilization, IBM recommends using half-track blocking for 3390 type DASD. Now, from the 'Using Data Sets Manual':

Block Size (BLKSIZE)
Format-F and format-V records: BLKSIZE specifies the maximum length, in bytes, of a data block. If the records are format-F, the block size must be an integral multiple of the record length, except for SYSOUT data sets. (See Chapter 24, “Spooling and Scheduling Data Sets,” on page 385.) If the records are format-V, you must specify the maximum block size. If format-V records are unblocked, the block size must be 4 bytes greater than the record length (LRECL). If you do not use the large block interface (LBI), the maximum block size is 32 760 except for ISO/ANSI Version 3 records, where the maximum block size is 2048. You can override the 2048 byte limit by a label validation installation exit (see z/OS DFSMS Installation Exits). If you use LBI, the maximum block size is 32 760 except on magnetic tape, where the maximum is larger.


27966 is the recommended block-size for an extended 3390 data sets; 27998 for non-extended 3390 disk data sets.
Aki88
 
Posts: 381
Joined: Tue Jan 28, 2014 1:52 pm
Has thanked: 33 times
Been thanked: 36 times

Re: Is it necessary that block size must be multiple of LREC

Postby steve-myers » Thu Oct 13, 2016 6:29 pm

As Aki88 says, RECFM=VB indicates each record potentially has a different length; the LRECL just specifies the maximum length of any record. As such, there is little point in thinking about making the BLKSIZE a multiple of the LRECL.

Based on experience, many times all of the logical records in a RECFM VB data set are the same length, so it may be worth thinking about making the BLKSIZE 4 + some multiple of the actual record length. The 4 in the equation is because each physical block has a 4 byte overhead data area, even with RECFM V.

However, you then need to determine the actual logical record length. This may be the declared LRECL, but it may be less.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post