To enable shared access to an RZ (or any Fortran direct access) file on systems running MVS, the file should be created as a VSAM file using the following procedure.
Creating an RZ file on MVS systems
//CRVSAM JOB ,CLASS=E,TIME=(0,01),NOTIFY=F99ABC
/*JOBPARM LINES=2
//A EXEC PGM=IDCAMS,REGION=512K
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE /* delete old file, if exists */ -
(F99ABC.KEYEDACC.FILE) -
PRG CLUSTER
DEFINE CLUSTER /* create new keyed access file */ -
(NAME(F99ABC.KEYEDACC.FILE) -
VOLUMES(STR012) -
INDEXED -
RECORDS(10 10) /* primary secondary_space (in records) */ -
KEYS(20 20) /* length and offset (in bytes) */ -
SHAREOPTIONS(4 3) /* multi read + multi write */ -
SPEED -
SPANNED -
REUSE -
RECORDSIZE(23400 23400)) /* average maximum (in bytes) */ -
DATA -
(NAME(F99ABC.KEYEDACC.FILE.DATA)) -
INDEX -
(NAME(F99ABC.KEYEDACC.FILE.INDEX))