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

System Determined Blocksize


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

New User


Joined: 01 May 2018
Posts: 2
Location: USA

PostPosted: Thu Mar 14, 2019 9:37 am
Reply with quote

We are using Enterprise COBOL for z/OS, Version 4.2 and trying to use system determined blocksize.

As per the manual, z/OS uses a specific hierarchy to find DCB data:
1. The program
2. The JCL
3. The data set

Also, IBM recommendation for the same is:

For new files, let z/OSĀ® determine the block size. To take advantage of system-determined block size:

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.

To identify the impact, I coded a sample program and opened, wrote a record and closed the file. The FDs are as below:

Code:
FD  OP1-FILE                                     
    LABEL RECORDS ARE STANDARD                   
    BLOCK CONTAINS 100 CHARACTERS                 
    RECORD CONTAINS 100 CHARACTERS               
    RECORDING MODE IS F.                         
01  OUTPUT1-REC                       PIC X(100).
                                                 
FD  OP2-FILE                                     
    LABEL RECORDS ARE STANDARD                   
    BLOCK CONTAINS 800 CHARACTERS                 
    RECORDING MODE IS F.                         
01  OUTPUT2-REC                       PIC X(100).

FD  OP3-FILE                                     
    LABEL RECORDS ARE STANDARD                   
    BLOCK CONTAINS 10 RECORDS                     
    RECORDING MODE IS F.                         
01  OUTPUT3-REC                       PIC X(100).
                                                 
FD  OP4-FILE                                     
    LABEL RECORDS ARE STANDARD                   
    BLOCK CONTAINS 0 RECORDS                     
    RECORDING MODE IS F.                         
01  OUTPUT4-REC                       PIC X(100).
                                                 
FD  OP5-FILE                                     
    LABEL RECORDS ARE STANDARD                   
    RECORDING MODE IS F.                         
01  OUTPUT5-REC                       PIC X(100).

FD  OP6-FILE                                     
    LABEL RECORDS ARE STANDARD                   
    BLOCK CONTAINS 400 CHARACTERS                 
    RECORD CONTAINS 100 CHARACTERS               
    RECORDING MODE IS F.                         
01  OUTPUT6-REC                       PIC X(100).

JCL is coded as:

Code:
//OP1FILE  DD DSN=XXXXXX.OP1FILE,             
//         DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,
//         DCB=(RECFM=FB,LRECL=100,BLKSIZE=0),
//         SPACE=(TRK,(22500,2250),RLSE)       

all the DDN are coded same as above with 2nd qualifier as DDN.

When I ran the job, all the files has same BLKSIZE

Code:
Command - Enter "/" to select action                 Dsorg  Recfm  Lrecl  Blksz
-------------------------------------------------------------------------------
         XXXXXX.OP1FILE                               PS    FB       100  27900
         XXXXXX.OP2FILE                               PS    FB       100  27900
         XXXXXX.OP3FILE                               PS    FB       100  27900
         XXXXXX.OP4FILE                               PS    FB       100  27900
         XXXXXX.OP5FILE                               PS    FB       100  27900
         XXXXXX.OP6FILE                               PS    FB       100  27900


My understanding was it would be different based on RECORD CONTAINS used in the program. Can anybody please explain the reason for it? We do have utilities where we have the concatenation of input files so want to ensure that all have the same BLKSIZE.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Thu Mar 14, 2019 3:18 pm
Reply with quote

You do not need the same blocksize for concatenated datasets. You used to be required to have the dataset with the largest blocksize as the first data set in the concatenation but that is no longer the case.

When posting code and data please use the code tags (available in the "post reply" editor). I have coded your post for you.
Back to top
View user's profile Send private message
SandeepChourasia1985

New User


Joined: 01 May 2018
Posts: 2
Location: USA

PostPosted: Thu Mar 14, 2019 7:24 pm
Reply with quote

Thank you Nic for the response. I am sorry I was not aware of the tags.

Based on your response, now concatenation of input datasets with different block sizes is not the concern. I have tested that with the combinations using SORT utility and job ran fine and the o/p blksize is determined by the system.

Question - Based on the results in my post for BLOCK CONTAINS, can we conclude that DCB change in JCL to remove BLSIZE or code BLKSIZE=0 will be enough to get the system determined blksize even though if we do not remove BLOCK CONTAINS <non zero> or add BLOCK CONTAINS 0 in the program? fyi - Our programs are compiled with NOBLOCK0 compiler option.
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 Sysplex System won't IPL at DR site I... All Other Mainframe Topics 2
No new posts How to delete a user's alias from the... JCL & VSAM 11
No new posts Insert system time/date (timestamp) u... DFSORT/ICETOOL 5
No new posts JCL Dynamic System Symbols JCL & VSAM 3
No new posts the system or user abend SF0F R=NULL COBOL Programming 0
Search our Forums:

Back to Top