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.
Marc, a slight variation on your idea, tested whether targetRtn exists or not. Thanks again!
zn "A" s currRtn=(##class(%Routine).%OpenId(rtnName)) s stream=currRtn.Read() zn "B" s targetRtn=(##class(%Routine).%OpenId(rtnName)) s sc=targetRtn.Write(stream) d 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.
One more question if I may: I try to exclude global subnodes but so far unsuccessfully. Is it possible? This correctly exports the corresponding node only: s items("SOMEGLOBAL(""ABC"",""XYZ"",""USERFORM_ATEST"").GBL") = "" Now if I try to exclude this node from the SOMEGLOBAL like this, s items("SOMEGLOBAL.GBL",'"SOMEGLOBAL(""ABC"",""XYZ"",""USERFORM_ATEST"").GBL") = "", it does not exclude it. There is a barely visible single negating quote in the beginning of the second item.
Robert, thanks a lot! This is what I saw today too in these nodes but not something I saw a few days ago. So I am still perplexed to some extent. I'll try various scenarios later, probably next week and will get back here if anything would be different.
go to post
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.
go to post
Also %RCOPY preserves date modified of the original routine, and I'd rather preserve it. So far other listed approaches do not preserve it.
go to post
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.
go to post
Robert, it does not trigger source control and yes, I'd like it non-interactive too.
go to post
Marc, a slight variation on your idea, tested whether targetRtn exists or not. Thanks again!
s currRtn=(##class(%Routine).%OpenId(rtnName))
s stream=currRtn.Read()
zn "B"
s targetRtn=(##class(%Routine).%OpenId(rtnName))
s sc=targetRtn.Write(stream)
d targetRtn.Save()
go to post
Thanks! Let's see if there are less "clunky" ways
go to post
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.
go to post
One more question if I may: I try to exclude global subnodes but so far unsuccessfully. Is it possible? s items("SOMEGLOBAL(""ABC"",""XYZ"",""USERFORM_ATEST"").GBL") = "" s items("SOMEGLOBAL.GBL",'"SOMEGLOBAL(""ABC"",""XYZ"",""USERFORM_ATEST"").GBL") = "", it does not exclude it. There is a barely visible single negating quote in the beginning of the second item.
This correctly exports the corresponding node only:
Now if I try to exclude this node from the SOMEGLOBAL like this,
go to post
OK, found what the problem was so your answer is, of course, correct.
go to post
Robert, thanks a lot! This is what I saw today too in these nodes but not something I saw a few days ago. So I am still perplexed to some extent. I'll try various scenarios later, probably next week and will get back here if anything would be different.