Fortran Programming Guide

The dd Conversion Utility

An end-of-file record in Fortran maps directly into a tape mark. In this respect, Fortran files are the same as tape system files. But since the representation of Fortran files on tape is the same as that used in the rest of UNIX, naive Fortran programs cannot read 80-column card images on tape. If you have an existing Fortran program and an existing data tape to read with it, translate the tape using the dd(1) utility, which adds newlines and strips trailing blanks.

Example: Convert a tape on mt0 and pipe that to the executable ftnprg:


demo% dd if=/dev/rmt0 ibs=20b cbs=80 conv=unblock | ftnprg