       d = open("plan")
       getfirst(d)
       for i = 1 to size(d)
          dbfname = "s" + trim('Номер'.d) + ".btr"
          system("del z.btr")
          system("del z.str")
          comm = "rename " + dbfname  + " Z.BTR"
          system(comm)
          comm = "rename " + "s" + trim('Номер'.d) + ".str"  + " Z.STR"
          system(comm)
          comm = "copy " + "mask_spp.btr " + dbfname
          system(comm)
          comm = "copy " + "mask_spp.str " + "s" + trim('Номер'.d) + ".str"
          system(comm)
          dz = open("z")
          da = open("s" + trim('Номер'.d))
          for j = 1 to size(dz)
             if j = 1 then goto 100
             getnext(dz)
             goto 200
100          getfirst(dz)
200          clearbuf(da)
             'Раб.место'.da = 'Раб.место'.dz
             'N_проводки'.da = 'N_проводки'.dz
             'Дата'.da = 'Дата'.dz
             'Документ'.da = 'Документ'.dz
             'Db_расчеты'.da = 'Db_расчеты'.dz
             'Kr_расчеты'.da = 'Kr_расчеты'.dz
             'Db_счета'.da = 'Db_счета'.dz
             'Kr_счета'.da = 'Kr_счета'.dz
             'Сумма'.da = 'Сумма'.dz
             'Количество'.da = 'Количество'.dz
             'Примечание'.da = 'Примечание'.dz
             insert(da)
          next
          close(da)
          close(dz)
900       getnext(d)
       next
       close(d)
       end