report: procedure options(main); dcl 1 employee static, 2 name character(30) varying, 2 addr, 3 street character(30) varying, 3 city character(10) varying, 3 state character(7) varying, 3 zip fixed dec(5), 2 age fixed dec(3), 2 wage fixed dec(5,2), 2 hours fixed dec(5,1); dcl dashes character(15) static initial ('$--------------'), buff character(20) varying; dcl i fixed, (grosspay, withhold) fixed dec(7,2); dcl (repfile, empfile) file; open file(empfile) keyed env(f(100),b(4000)) title ('$1.EMP'); open file(repfile) stream print title('$2.$2') environment(b(2000)); put list('Set Top of Forms, Type Return'); get skip; do while('1'b); read file(empfile) into(employee); if name = 'EOF' then stop; put file(repfile) skip(2); buff = '[' !! name !! ']^m^j'; write file(repfile) from (buff); grosspay = wage * hours; withhold = grosspay * .15; buff = grosspay - withhold; do i = 1 to 15 while (substr(buff,i,1) = ' '); end; i = i - 1; substr(buff,1,i) = substr(dashes,1,i); write file (repfile) from(buff); end; end report;