Subroutine RZFILE accesses an existing RZ file on the specified logical unit. Should the file not yet exist, the routine RZMAKE should be used.
On return from RZFILE, IQUEST(1)
will be set to 0 if the routine was successful. A non-zero value for IQUEST(1) indicates an error.
N.B. when using option C, the call to RZFILE must immediately follow a call to RZOPEN. This permits the record length of the file to be passed from RZOPEN to RZFILE, where it is stored in an RZ control bank for future use.
CALL RZHOOK (LUN,CHDIR,TARGET,LRECL,CHOPT)
LUN
.
EXTERNAL
in the routine
that calls RZHOOK.
Subroutine RZHOOK accesses an existing RZ file which must already be connected and ready for I/O. RZHOOK calls the routine RZFILE which reads records from the RZ file.
The specifications for the user I/O routine are the same as for FZHOOK.
An example of a user coded I/O routine
SUBROUTINE FMXZIO(IBUF,IOWAY) DIMENSION IBUF(8192) +CDE,ZMACH. +CDE,QUEST. +CDE,FATBUG. CHARACTER*6 CHWAY IRC = 0 IF(IDEBFA.GE.3) PRINT *,'FMXZIO. IQUEST(1-6) = ', + (IQUEST(J),J=1,6) LUN = IQUEST(1) NREC = IQUEST(4) IF(IOWAY.EQ.0) THEN CALL XZREAD(LUN,IBUF,NREC,IQUEST(2)*IQCHAW,NGOT,' ',IRC) ELSEIF(IOWAY.EQ.1) THEN CALL XZRITE(LUN,IBUF,NREC,IQUEST(2)*IQCHAW,' ',IRC) ELSE WRITE(CHWAY,'(I6)') IOWAY CALL ZFATAM('Invalid value for IOWAY in FMXZIO - '//CHWAY) ENDIF IQUEST(1) = IRC END