☜ | Local Variables (Job)M[UMPS] by Example | ☞ |
The code fragment below will make a copy of the complete symbol table, without changing a single local variable:
Do
. New %
. Set %=$Reference
. Kill ^TMP("ErrorLog",$Job)
. Set ^TMP("ErrorLog",$Job,"$Reference")=%
. For %="$ECode","$EStack","$ETrap","$Horolog","$IO","$Job","$Storage" Do
. . Set ^TMP("ErrorLog",$Job,%)=@%
. . Quit
. For %="$STack","$X","$Y","$ZA","$ZB","$ZC","$ZError","$ZTrap","$ZVersion" Do
. . Set ^TMP("ErrorLog",$Job,%)=@%
. . Quit
. Set %="%" For
Set %=$Order(^$Job($Job,"VAR",%))
Quit:%="" Merge ^TMP("ErrorLog",$Job,%)=@%
. ; Actually, the above line should be equivalent to:
. Merge ^TMP("ErrorLog",$Job)=^$Job($Job,"VAR")
. For %=1:1:$STack Do
. . Set ^TMP("ErrorLog",$Job,"$STack",%,"M")=$STack(%,"MCODE")
. . Set ^TMP("ErrorLog",$Job,"$STack",%,"P")=$STack(%,"PLACE")
. . Set ^TMP("ErrorLog",$Job,"$STack",%,"E")=$STack(%,"ECODE")
. . Quit
. Quit
Merge ^TMP("ErrorLog",$Job,"%")=%
Copyright © Standard Documents; 1977-2024 MUMPS Development Committee;
Copyright © Examples: 1995-2024 Ed de Moel;
Copyright © Annotations: 2003-2008 Jacquard Systems Research
Copyright © Annotations: 2008-2024 Ed de Moel.
The information in this page is
NOT authoritative and subject to be modified
at any moment.
Please consult the
appropriate (draft) language standard for an
authoritative definition.
Some specifications are "approved for inclusion in a future standard". Note that the MUMPS Development Committee cannot guarantee that such future standards will indeed be published.
This page most recently updated on 28-Nov-2011, 21:33:03.
For comments, contact Ed de Moel (demoel@jacquardsystems.com)