Mumpster http://mumpster.org/ |
|
$ZN in MumpsV1 ? http://mumpster.org/viewtopic.php?f=13&t=1749 |
Page 1 of 1 |
Author: | cais28 [ Sun Jul 07, 2013 5:20 am ] |
Post subject: | $ZN in MumpsV1 ? |
Hi Some MUMPS implementation use the $ZN formula for actual routine name string . In MUMPSV1 actual routine name string is = $G(^$J($J,"ROUTINE_NAME")) BUT , if use in routine EXECUTE and in the executed commands string including this $G(^$J($J,"ROUTINE_NAME")) , return a empty string !! My alternate solution , the STACK trace , something like : Code: %ZN() ;Return Main routine name from STACK [ 07/07/2013 14:09 PM ] N S %mref="",%st=0 F Q:$F(%mref,"^")!(%st>99) S %st=%st+1,%mref=^$J($J,"$STACK",^$J($J,"$STACK")-%st,"PLACE") Q $P(%mref,"^",2) Usage : W $$^%ZN Another idea ?? |
Author: | Eugene Karataev [ Mon Jul 08, 2013 3:43 am ] |
Post subject: | Re: $ZN in MumpsV1 ? |
Try to use function $TEXT inside routine context $t(+0) is a special case of the $text argument to return current routine executed. |
Author: | cais28 [ Mon Jul 08, 2013 1:36 pm ] |
Post subject: | Re: $ZN in MumpsV1 ? |
This $t(+0) working inside routine , but in EXECUTE return empty string Code: ;Test EXECUTED $ZN in MumpsV1 W !,"ROUTINE="_$T(+0) S XS="ROUTINE=",XX="W !,XS_$T(+0)" X XX Q [TMP]MCL> D ^BB ROUTINE=BB ROUTINE= [TMP]MCL> |
Author: | sahilbhandari [ Thu Nov 21, 2019 2:00 am ] |
Post subject: | Re: $ZN in MumpsV1 ? |
Great Information.Thank You ![]() |
Author: | sanavigupta [ Mon Nov 25, 2019 11:49 pm ] |
Post subject: | Re: $ZN in MumpsV1 ? |
Great Post ![]() |
Author: | Harmanpubg18 [ Wed Aug 12, 2020 9:24 pm ] |
Post subject: | Re: $ZN in MumpsV1 ? |
Try to use function $TEXT inside routine context |
Author: | Aviyo1 [ Sat Aug 29, 2020 12:07 am ] |
Post subject: | Re: $ZN in MumpsV1 ? |
Very useful post Thanks |
Page 1 of 1 | All times are UTC - 8 hours [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |