Not quite what I was looking for but very interesting in its own right. Thanks, Alexey!

Hi Cristiano, 
This might do for my ultimate purposes, thanks, but strictly speaking $STACK does not return the line number which in this case is 7 (Teste+2). It returns line number relative to the enclosing function only. So I'll wait in case there is a different solution as well.

I added a picture of what I am looking for to the post (Edit/Find). I think FindInFilesRegex corresponds more or less to Use wildcards on this screen.

Also %RCOPY preserves date modified of the original routine, and I'd rather preserve it. So far other listed approaches do not preserve it.

Yes, that works and assigns the time of copy as the date modified. Thanks, Stephen! BTW, in my experience at least some old-fashioned commands are faster than their modern equivalents though in this case the speed is not an issue.

Robert, it does not trigger source control and yes, I'd like it non-interactive too.

Marc, a slight variation on your idea, tested whether targetRtn exists or not. Thanks again!

zn "A"
currRtn=(##class(%Routine).%OpenId(rtnName))
stream=currRtn.Read()
zn "B"
targetRtn=(##class(%Routine).%OpenId(rtnName))
sc=targetRtn.Write(stream)
targetRtn.Save()

That would make the routine from namespace A immediately available in namespace B as is. The goal is to have routines in two namespaces different until the time comes for the programmer to make them the same via an RCOPY analog. It is also a "per routine" job used for synchronizing.