Formatted I/O statements contain explicit format specifiers that are used to control the translation of data from internal (binary) form within a program to external (readable character) form in the records, or vice versa.Formatted I/O statements must have a format (FMT=) specified in the control list (clist). Additional "clist" elements are required depending on the type of access.
Formatted sequential READ:
READ (UNIT=u,FMT=f[,IOSTAT=ios][,ERR=err][,END=end]) [iolist] READ f [,iolist]
Formatted direct access READ:
READ (UNIT=u,REC=rec,FMT=f[,IOSTAT=ios][,ERR=err]) [iolist] Formatted indexed READ (VMS only):
READ (UNIT=u,FMT=f,KEY=k[,KEYID=n][,IOSTAT=ios][,ERR=err]) [iolist]
Formatted internal READ:
READ (UNIT=u,FMT=f[,IOSTAT=ios][,ERR=err][,END=end]) [iolist]
Formatted sequential WRITE:
WRITE (UNIT=u,FMT=f[,IOSTAT=ios][,ERR=err]) [iolist]
Formatted direct access WRITE:
WRITE (UNIT=u,REC=rec,FMT=f[,IOSTAT=ios][,ERR=err]) [iolist]
Formatted indexed WRITE (VMS only):
WRITE (UNIT=u,FMT=f[,IOSTAT=ios][,ERR=err]) [iolist]
Formatted internal WRITE:
WRITE (UNIT=u,FMT=f[,IOSTAT=ios][,ERR=err]) [iolist]
Unformatted I/O statements do not contain format specifiers and therefore do not translate the data being transferred.Unformatted I/O is especially appropriate where the output data will subsequently be used as input. Unformatted I/O saves execution time by eliminating the data translation process, preserves greater precision in the external data, and usually conserves file storage space.
Unformatted I/O statements do not specify a format (FMT=) in the control list (clist). Other "clist" elements are required depending on the type of access.
Unformatted sequential READ:
READ (UNIT=u[,IOSTAT=ios][,ERR=err][,END=end]) [iolist]
Unformatted direct access READ:
READ (UNIT=u,REC=rec[,IOSTAT=ios][,ERR=err]) [iolist]
Unformatted indexed READ (VMS only):
READ (UNIT=u,KEY=k[,KEYID=n][,IOSTAT=ios][,ERR=err]) [iolist]
Unformatted sequential WRITE:
WRITE (UNIT=u,[,IOSTAT=ios][,ERR=err]) [iolist]
Unformatted direct access WRITE:
WRITE (UNIT=u,REC=rec[,IOSTAT=ios][,ERR=err]) [iolist]
Unformatted indexed WRITE (VMS only):
WRITE (UNIT=u[,IOSTAT=ios][,ERR=err]) [iolist]
List-directed I/O statements are similar to formatted statements in function, but control the translation of data through data types instead of explicit format specifiers.List-directed I/O statements specify a format (FMT=) in the control list (clist). Other "clist" elements are required depending on the type of access.
List-directed sequential READ:
READ (UNIT=u,FMT=*[,IOSTAT=ios][,ERR=err][,END=end]) [iolist] READ * [,iolist]
List-directed internal READ
READ (UNIT=u,FMT=*[,IOSTAT=ios][,ERR=err][,END=end]) [iolist]
List-directed sequential WRITE
WRITE (UNIT=u,FMT=*[,IOSTAT=ios][,ERR=err]) [iolist]
List-directed internal WRITE
WRITE (UNIT=u,FMT=*[,IOSTAT=ios][,ERR=err]) [iolist]
Namelist I/O statements are similar to formatted statements in function, but control the translation of data through data types instead of explicit format specifiers.Namelist I/O statements do not specify a format (FMT=) in the control list (clist).
Namelist sequential READ:
READ (UNIT=u,NML=nml[,IOSTAT=ios][,ERR=err][,END=end]) READ n
Namelist sequential WRITE:
WRITE (UNIT=u,NML=nml[,IOSTAT=ios][,ERR=err])