GT.M equivalent for Cache's ZR ZI and ZS command?

167 views
Skip to first unread message

Bernard

unread,
Sep 6, 2007, 9:33:05 PM9/6/07
to Hardhats
Anyone know the GT.M equivalent of Cache's ZR, ZI and ZS command?

I've been searching http://www.fidelityinfoservices.com/user_documentation/GTM-PG-VMS43/wwhelp/wwhimpl/js/html/wwhelp.htm
but need help from the MUMPS gurus.

TIA

Bernard

unread,
Sep 6, 2007, 11:02:48 PM9/6/07
to Hardhats
Also ZL which is Cache's ZLOAD. Looking for GT.M equivalents.

Thanks.

On Sep 6, 3:33 pm, Bernard <bvillan...@gmail.com> wrote:
> Anyone know the GT.M equivalent of Cache's ZR, ZI and ZS command?
>

> I've been searchinghttp://www.fidelityinfoservices.com/user_documentation/GTM-PG-VMS43/w...

K.S. Bhaskar

unread,
Sep 6, 2007, 11:16:47 PM9/6/07
to Hardhats
http://www.fidelityinfoservices.com/user_documentation/GTM-PG-UNIX44
may be more helpful for GT.M on x86 Linux (unless you are using GT.M
on Alpha/AXP OpenVMS, which is also FOSS).

Never having used any other MUMPS, I have no idea what ZR, ZI and ZS,
and ZLOAD do, so I can't tell you the GT.M equivalents. But if you
are playing with GT.M for the first time, may I recommend the GT.M
Acculturation live CD 0.4 (http://sourceforge.net/projects/sanchez-
gtm). Burn it and boot it on a PC with a 512MB or larger USB drive,
and it's a self paced course. Errata: where it says to use
count=716800 for the dd command (it will be obvious when you get to
it), use count=800000 or more.

Regards
-- Bhaskar

Jim Self

unread,
Sep 7, 2007, 12:29:52 AM9/7/07
to Hard...@googlegroups.com
As I recall, these are commands were for rudimentary editing of M
routines (remove a routine, insert a line in a routine, save a routine).
There is no need for such commands in GT.M because the needed
functionality is already available in the host operating system.

An M routine in GT.M/Linux is represented by a pair of files in a Linux
file system, one for the source code and one for the object code. For
instance, routine ^example would be represented by files example.m (M
source code) and example.o (object code). Normally, you just edit the
source code and run it.

GT.M does have some commands for working with routines (ZEdit, ZLink,
ZCompile), but I never use them in my own work developing web applications.

ZEdit - invoke the text editor of your choice to edit and compile and
link a routine, useful for editing and testing routines in a single window.

ZCompile - force recompilation of a given source file. Normally
automatic when a routine is invoked after modification of the source file.

ZLink - link a fresh version of a given routine into the current process
image. Only needed in special circumstances, such as updating routines
accessed by long running processes without restarting those processes.

--

---------------------------------------
Jim Self
Systems Architect, Lead Developer
VMTH Information Technology Services, UC Davis
(http://www.vmth.ucdavis.edu/us/jaself)
---------------------------------------
M2Web Demonstration with VistA
(http://vista.vmth.ucdavis.edu/)
---------------------------------------


Woodhouse Gregory

unread,
Sep 7, 2007, 12:31:19 AM9/7/07
to Hard...@googlegroups.com
These are all very low level commands. You might use them to write a more user-friendly routine editor, but no one is likely to use them directly (except in an emergency).

ZR = ZREMOVE - remove a routine from memory (but not disk storage) or (I think) remove a line of code. A ZR followed by ZS name is one way to delete a routine (but use D ^%ZTRDEL instead)
ZS = ZSAVE - save the routine currently in memory (but use ^%ZOSF("SAVE") instead).
ZL = ZLOAD - load a routine in memory.
ZI = ZINSERT - insert a line into the routine currently in memory.

What I almost always do when I need to deal with routine text is use ^%ZOSF("LOAD") to load the routine into a temporary global, and then work with the global.


But in GT.M, none of this is necessary because routines are just stored as disk files, so you can use an editor like vi or emacs. Once you've modified the .m file, though, you will probably need to ZLINK the routine name to force recompilation.

"In the human mind, one-sidedness has 
always been the rule and many-sidedness the
 exception. Hence, even in revolutions of 
thought, one part of the truth usually sets while
 another rises."
--John Stuart Mill



Chris Richardson

unread,
Sep 7, 2007, 12:46:43 AM9/7/07
to Hard...@googlegroups.com
Bhaskar;

Many of these Z commands have to do with the routine buffer which GTM has
not included in their design. Basicaly, the ZREMOVE removes a line of code
if a label is provided, or the whole routine buffer (one routine at a time
is stored in the routine buffer). ZINSERT adds a line to the current
routine in the routine buffer after the currently active line. The
currently active line is indicated by the ZPRINT command which takes a label
with an optional + offset. ZSAVE saves the modified routine buffer as the
routine name specified in the one argument. Other implementors have done
slightly different behavior, but this is pretty close to theoperations of
these commands.

Jim Self

unread,
Sep 7, 2007, 1:21:06 AM9/7/07
to Hard...@googlegroups.com
Woodhouse Gregory wrote:
> But in GT.M, none of this is necessary because routines are just
> stored as disk files, so you can use an editor like vi or emacs. Once
> you've modified the .m file, though, you will probably need to ZLINK
> the routine name to force recompilation.
Hey Gregory,
Does this mean that you have GT.M and VistA running on your Mac now? If
so, do you also have M2Web or other web interface to VistA?

The ZLink command is not needed if you invoke your routine editor via
the ZEdit command or if you test the changes in a new M process.

Woodhouse Gregory

unread,
Sep 7, 2007, 1:50:26 AM9/7/07
to Hard...@googlegroups.com

On Sep 6, 2007, at 10:21 PM, Jim Self wrote:

Hey Gregory,

Does this mean that you have GT.M and VistA running on your Mac now? If 

so, do you also have M2Web or other web interface to VistA?


The ZLink command is not needed if you invoke your routine editor via 

the ZEdit command or if you test the changes in a new M process.



Well, I installed Ubuntu under Parallels, but haven't had much time to work with it.  Some day, I'd like to learn more about how M2Web works and how to use it, but I've really been more focused an the Java side of things lately. My latest project uses Swing for the UI and VistaLink to talk to VistA, but it could just as well use servlets or JSP for the UI. I like Swing, and think standalone applications have been getting a bit of a raw deal of late (perhaps because people seem to think it implies tighter coupling than is really necessary). One thing I've been interested in exploring further is web services, probably in an application server environment.

"We may with advantage at times forget what we know."
--Publilius Cyrus, c. 100 B.C.



Reply all
Reply to author
Forward
0 new messages