SandeepChourasia1985
New User
Joined: 01 May 2018 Posts: 2 Location: USA
|
|
|
|
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. |
|
SandeepChourasia1985
New User
Joined: 01 May 2018 Posts: 2 Location: USA
|
|
|
|
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. |
|