*--this is sascode(editlog)--; *---Use this code to edit SAS .log files. Intended for interactive use, and assume we have pointed to the current directory where we have run &pgm..sas in batch to create &pgm..log . Initially we just remove repeated WARNING: messages (5+). ---*; filename logout clear; filename login "&pgm..log"; filename logout "&pgm..log.edited"; data _null_; infile login ; input; if nwarns >= 5 and (_infile_=:'0C'x or _infile_=' ') then delete; *---New page line during run of Warnings gets deleted---; if _infile_ =:'WARNING:' then nwarns+1; else nwarns=0; file logout; if nwarns=6 then put / '***Warnings messages are being deleted here***' / ; if nwarns gt 5 then delete; put _infile_; run; filename login clear;