cat > script.ff <<'+-+-+-+-+-END-OF-FILE-+-+-+-+-+'
	subroutine mfmain
	include	'INCLUDE/msf.h'

	integer	empls
	character namev*12, phonev*12

	call mfopen (
     &  'DATABASE'
     &  , 'personnel', 'r')
	print 10
10	format (1x, 'Current Employees of Joe''s Garage', //1x, 
     &		'Name         Phone')

	empls = 0
	call mfgetb ('personnel', char(0))

20	if (mfget () .ne. 1) goto 40
		junk = mfgetv (namev,  12, 'name')
		junk = mfgetv (phonev, 12, 'phone')
		print 30, namev, phonev
30		format (1x, a12, a12)
		empls = empls + 1
		goto 20

40	call mfgete

	print 50, empls
50	format (1x, 'Total Number of Employees = ', i4)

	call mfclos('personnel')
	end
+-+-+-+-+-END-OF-FILE-+-+-+-+-+
chmod 644 script.ff
cat > stdout <<'+-+-+-+-+-END-OF-FILE-+-+-+-+-+'
Current Employees of Joe's Garage

Name         Phone
Kilroy      4269681     
Jones       6672951     
Mosca       5442243     
Waldislaw   7236073     
Peterson    9786060     
Scarlatti   9617363     
Total Number of Employees =    6
+-+-+-+-+-END-OF-FILE-+-+-+-+-+
chmod 644 stdout
cat > tag <<'+-+-+-+-+-END-OF-FILE-+-+-+-+-+'
A simple select
+-+-+-+-+-END-OF-FILE-+-+-+-+-+
chmod 644 tag
