Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
System Determined Blocksize

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: System Determined Blocksize
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: 2220
Location: Hampshire, UK

PostPosted: Thu Mar 14, 2019 3:18 pm    Post subject: Reply to: System Determined Blocksize
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    Post subject: Reply to: System Determined Blocksize
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    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 REXX exec (opercmd) failing quietly o... Mike.Fulton All Other Mainframe Topics 2 Sat Aug 03, 2019 4:45 am
No new posts UNIX System Services Resource Busy Martin Wickenden All Other Mainframe Topics 7 Thu Jun 14, 2018 5:51 pm
No new posts How system know which REXX to excute? jackzhang75 CLIST & REXX 14 Thu Jul 06, 2017 1:09 am
No new posts Overlay the system date Danielle.Filteau SYNCSORT 4 Fri Mar 03, 2017 1:16 am
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm

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