go to post Manel Trèmols · Feb 3, 2017 Hi, You can do a routine for to do it, for example: set rou="" for { set rou=$o(^rMAC(rou)) quit:rou="" write !,rou set lines=^rMAC(rou,0,0) for x=lines:-1:2 { set ^rMAC(rou,0,x+1)=^rMAC(rou,0,x) } set ^rMAC(rou,0,2)=$c(9)_"#include %occInclude" set ^rMAC(rou,0,0)=lines+1 set ^rMAC(rou,0)=$now() do COMPILE^%RCOMPIL(rou,"MAC",.success) } Regards Manel