Difference between revisions of "MUMPS Code Examples"

From VistApedia
Jump to: navigation, search
 
Line 1: Line 1:
== For each of these code fragments, be sure to put them in CODE tags, and note whether the code is Standard MUMPS, and if not, what MUMPS systems it works on.
+
== Instructions for page ==
 +
For each of these code fragments, be sure to put them in CODE tags, and note whether the code is Standard MUMPS, and if not, what MUMPS systems it works on.
  
== MUMPS Code to iterate over every global ==
+
=== MUMPS Code to iterate over every global ===
 
NOTE: this is NON-STANDARD MUMPS.  Known to work on GT.M
 
NOTE: this is NON-STANDARD MUMPS.  Known to work on GT.M
 
<code>
 
<code>
Line 7: Line 8:
 
</code>
 
</code>
  
== MUMPS Code to iterate over every FileMan File ==
+
=== MUMPS Code to iterate over every FileMan File ===
 
NOTE: Standard MUMPS
 
NOTE: Standard MUMPS
 
<code>
 
<code>
Line 13: Line 14:
 
</code>
 
</code>
  
== MUMPS Code to iterate over Data Dictionary Number of every FileMan File & Subfile ==
+
=== MUMPS Code to iterate over Data Dictionary Number of every FileMan File & Subfile ===
 
NOTE: Standard MUMPS
 
NOTE: Standard MUMPS
 
<code>
 
<code>
 
S DDNUM=0 F  S DDNUM=$O(^DD(DDNUM)) Q:DDNUM'=+DDNUM  D Something(DDNUM)
 
S DDNUM=0 F  S DDNUM=$O(^DD(DDNUM)) Q:DDNUM'=+DDNUM  D Something(DDNUM)
 
</code>
 
</code>

Revision as of 15:45, 27 February 2010

Instructions for page

For each of these code fragments, be sure to put them in CODE tags, and note whether the code is Standard MUMPS, and if not, what MUMPS systems it works on.

MUMPS Code to iterate over every global

NOTE: this is NON-STANDARD MUMPS. Known to work on GT.M SET GBLNAME="^%" FOR SET GBLNAME=$o(@GBLNAME) Q:GBLNAME="" DO Something(GBLNAME)

MUMPS Code to iterate over every FileMan File

NOTE: Standard MUMPS S FILE=0 F S FILE=$O(^DIC(FILE)) Q:FILE'=+FILE D Something(FILE)

MUMPS Code to iterate over Data Dictionary Number of every FileMan File & Subfile

NOTE: Standard MUMPS S DDNUM=0 F S DDNUM=$O(^DD(DDNUM)) Q:DDNUM'=+DDNUM D Something(DDNUM)