cat > script <<'+-+-+-+-+-END-OF-FILE-+-+-+-+-+'
parameters
	char	dbname;
end

let database = dbname;

select job_type, tenth_hours, rate from rates, worked 
	where tenth_hours > 1000 and
	      worked.code = rates.code
        sort by job_type;

for each record
	print job_type, tenth_hours, rate, newline;
	end;

print "end of file:";

end;
+-+-+-+-+-END-OF-FILE-+-+-+-+-+
chmod 755 script
cat > stdout <<'+-+-+-+-+-END-OF-FILE-+-+-+-+-+'
end of file:

































































+-+-+-+-+-END-OF-FILE-+-+-+-+-+
chmod 644 stdout
cat > tag <<'+-+-+-+-+-END-OF-FILE-+-+-+-+-+'
check that an empty select works
+-+-+-+-+-END-OF-FILE-+-+-+-+-+
chmod 644 tag
