perm filename STRIP.SA2[UOR,AIL] blob sn#248616 filedate 1976-11-21 generic text, type T, neo UTF8
begin "striplf"
    integer chanin,chanout,dummy,eof,flag;
    string namein,nameout;
    integer tchar;

    print("type in name of input file  ");
    namein ← inchwl;
    print("type in name of output file ");
    open(chanin←getchan,"dsk",0,5,0,dummy,dummy,eof);
    lookup(chanin,namein,flag);
    if flag or eof then
       begin
          print("abort");
          call(0,"exit");
       end;
    open(chanout←getchan,"dsk",0,0,5,dummy,dummy,dummy);
    enter(chanout,nameout,flag);
    
    while true do
    begin
       tchar ← wordin(chanin);
       if eof then done;
       if tchar = 0 then
          continue;
       if tchar = '12 then
          continue;
       if tchar = '15 then
          begin
             wordout(chanout,'15);
             wordout(chanout,'12);
          end
       else
          wordout(chanout,tchar);
    end;
    print('15&'12,successful striping);
end "striplf"