/* compr.sas */ /* Purpose: */ data _NULL_; infile 'dummy.lst' eof=endfile missover lrecl=81 pad; file 'dummy.lll'; array buffer{100} $ 80 _TEMPORARY_; retain endfile 0 lleft 65 i 1; input @1 line $char81.; if 1=0 then do; endfile: endfile=1; end; if rank(substr(line,1,1))=12 OR endfile then do; if i-1 LE lleft-2 then do; *output, same page; if lleft=65 then put @1 ' ' @; else do; put ' '; put '/---------------------------------------' '----------------------------------------' '---/'; end; do j=1 to i-1; put buffer{j} $char80.; end; lleft=lleft-i+1 -2; end; else do; *output, new page; put @1 ' ' @; do j=1 to i-1; put buffer{j} $char80.; end; lleft=65-i+1; end; i=1; buffer{i}=substr(line,2,80); end; else do; buffer{i}=substr(line,1,80); end; i=i+1; if endfile then stop;