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

let database = dbname;

print "abcd" width 4 right, "|", "|", "p", newline
select job_type from rates;
	let x = maxwidth job_type;
	for each record
		print job_type width x right, "|",newline
	end
end
+-+-+-+-+-END-OF-FILE-+-+-+-+-+
chmod 755 script
cat > stdout <<'+-+-+-+-+-END-OF-FILE-+-+-+-+-+'
abcd||p
          Doors|
    Windshields|
         Lights|
        Fenders|
    Lubrication|
Ignition/Sparks|
         Wheels|
          Tires|
   Transmission|
      Body Work|
         Brakes|
        Exhaust|
        Battery|
    Carburettor|
       Radiator|
        Pistons|
         Shocks|
















































+-+-+-+-+-END-OF-FILE-+-+-+-+-+
chmod 644 stdout
cat > tag <<'+-+-+-+-+-END-OF-FILE-+-+-+-+-+'
Test the maxwidth accumulator.
+-+-+-+-+-END-OF-FILE-+-+-+-+-+
chmod 644 tag
