Mumps Class 17

From VistApedia
Jump to: navigation, search

Screen 1:

Using username "worldvistaEHR".
Authenticating with public key "rsa-key-20101206"
Linux cassandra 2.6.26-1-686 #1 SMP Fri Mar 13 18:08:45 UTC 2009 i686

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Mon Mar 14 10:21:05 2011 from 192.168.56.44
worldvistaEHR@cassandra:~$ mumps -dir

GTM>; Lock command

GTM>; Example

GTM>; Lock the patient file (there is deception trick here):

GTM>L +^DPT

GTM>L -^DPT

GTM>L +SAM

GTM>L -SAM

GTM>ZED "KBANLOCK"

GTM>zl

GTM>zp ^KBANLOCK
KBANLOCK ; 3/14/11 5:48pm
 ;;
 LOCK +^SAM
 SET ^SAM=1
 LOCK -^SAM
 QUIT


GTM>D ^KBANLOCK

GTM>ZED

GTM>zl

GTM>rec zp

GTM>zp ^KBANLOCK
KBANLOCK ; 3/14/11 5:49pm
 ;;
 LOCK +^SAM
 SET ^SAM=1
 HANG 20
 LOCK -^SAM
 QUIT


GTM>D ^KBANLOCK

GTM>D ^KBANLOCK

GTM>SET TEST=1

GTM>LOCK:TEST ^DPT

GTM>LOCK -^DPT

GTM>LOCK +^DPT:5

GTM>; colon argument means that:

GTM>; Wait for 5 seconds before giving up!

GTM>LOCK +^DPT:5

GTM>W $TEST
1
GTM>LOCK +^DPT:5

GTM>LOCK  ; lock without argument

GTM>; releases all locks a process holds

GTM>LOCK +^DPT:5

GTM>; :5 --> Wait five seconds to try to get the lock.

GTM>; If you still can't get the lock, set $test to false.

GTM>; Old lock syntax, plus a variation on the new syntax

GTM>LOCK ^DPT:5

GTM>; No plus sign

GTM>; Acquires one lock, and unlocks all others

GTM>ZSHOW "L"
MLG:10,MLT:1
LOCK ^DPT LEVEL=1

GTM>LOCK SAM:5

GTM>ZSHOW "L"
MLG:11,MLT:1
LOCK SAM LEVEL=1

GTM>; If I use the plus sign:

GTM>LOCK +^DPT:5

GTM>ZSHOW "L"
MLG:12,MLT:1
LOCK ^DPT LEVEL=1
LOCK SAM LEVEL=1

GTM>; How would you lock more than 1 node if you are using the old syntax?

GTM>LOCK (^DPT,SAM)

GTM>LOCK (+^DPT,+SAM)
%GTM-E-VAREXPECTED, Variable expected in this context
        LOCK (+^DPT,+SAM)
              ^-----

GTM>LOCK (+^DPT,+SAM)
%GTM-E-VAREXPECTED, Variable expected in this context
        LOCK (+^DPT,+SAM)
              ^-----

GT

GTM>LOCK (+^DPT,+SAM)
%GTM-E-VAREXPECTED, Variable expected in this context
        LOCK (+^DPT,+SAM)
              ^-----

GTM>LOCK +(^DPT,SAM)

GTM>ZSHOW
+1^GTM$DMOD    (Direct mode)

GTM>ZSHOW "L"
MLG:14,MLT:1
LOCK SAM LEVEL=2
LOCK ^DPT LEVEL=2

GTM>; Locking a list of variables in () means that you have to be able to lock

GTM>; all of them at the same time, otherwise, it won't work.

GTM>L -^DPT

GTM>L -^DPT

GTM>; Locking any name will lock all its decendants

GTM>; so if you lock SAM

GTM>; you cannot lock SAM(1) in another process

GTM>; however, you can lock SAM(1) in this process

GTM>; and lock SAM(2) in another process

GTM>; because SAM(2) is not a decendant of SAM(1)

GTM>; but you cannot lock SAM(1,1)

GTM>D ^XUP

Setting up programmer environment
This is a TEST account.

Access Code: *********
Terminal Type set to: C-VT100

Select OPTION NAME: MAILMAN MANAGE ??

Select OPTION NAME: MAILMAN MAN ??

Select OPTION NAME: MAILMAN
     1   MAILMAN MASTER MENU  XMMASTER     MailMan Master Menu
     2   MAILMAN MENU  XMUSER     MailMan Menu
     3   MAILMAN SITE PARAMETERS  XMKSP     MailMan Site Parameters
CHOOSE 1-3: 1  XMMASTER     MailMan Master Menu


   XMM    Manage Mailman ...
   XMN    Network Management ...
   XMU    MailMan Menu ...

Select MailMan Master Menu Option: XMM  Manage Mailman


          Create a Mailbox for a user
          Disk Space Management ...
          Group/Distribution Management ...
          Local Delivery Management ...
          MailMan Site Parameters
          Network Management ...
          New Features for Managing MailMan
          Remote MailLink Directory Menu ...

Select Manage Mailman Option: LOCal Delivery Management


          Active Users/Deliveries Report
          CHECK background filer
          Compile Response Time Statistics
          Deliveries by Group
          Delivery Queue Statistics Collection
          Edit numbers to Normalize Reports
          Graphics Download (TAB separators)
          Log Response Time Toggler
          Mail Delivery Statistics Report
          New Messages and Logon Statistics
          START background filer
          STOP background filer

Select Local Delivery Management Option: START BACKground filer

<< Background Filers will start soon. >>


          Active Users/Deliveries Report
          CHECK background filer
          Compile Response Time Statistics
          Deliveries by Group
          Delivery Queue Statistics Collection
          Edit numbers to Normalize Reports
          Graphics Download (TAB separators)
          Log Response Time Toggler
          Mail Delivery Statistics Report
          New Messages and Logon Statistics
          START background filer
          STOP background filer

Select Local Delivery Management Option:


          Create a Mailbox for a user
          Disk Space Management ...
          Group/Distribution Management ...
          Local Delivery Management ...
          MailMan Site Parameters
          Network Management ...
          New Features for Managing MailMan
          Remote MailLink Directory Menu ...

Select Manage Mailman Option:


   XMM    Manage Mailman ...
   XMN    Network Management ...
   XMU    MailMan Menu ...

Select MailMan Master Menu Option:

Do you really want to halt? YES//
























Logged out at Mar 14, 2011 6:31 pm
EHR:cassandra>L ++^DPT("UJOPID")
%GTM-E-VAREXPECTED, Variable expected in this context
        L ++^DPT("UJOPID")
           ^-----

EHR:cassandra>L +^DPT("UJOPID")

Screen 2

Using username "worldvistaEHR".
Authenticating with public key "rsa-key-20101206"
Linux cassandra 2.6.26-1-686 #1 SMP Fri Mar 13 18:08:45 UTC 2009 i686

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Mon Mar 14 17:40:00 2011 from 192.168.56.44
worldvistaEHR@cassandra:~$ GTM

GTM>L +^DPT

GTM>L +SAM

GTM>SET ^SAM=2

GTM>ZL "KBANLOCK"

GTM>D ^KBANLOCK

GTM>L -^DPT

GTM>LOCK +^DPT:5

GTM>WRITE $TEST
0
GTM>LOCK +^DPT:5  I '$TEST WRITE "No Lock...sorry"
No Lock...sorry
GTM>LOCK +^DPT:5 ELSE  WRITE "No Lock...sorry"
No Lock...sorry
GTM>; Else only executes if $test is false (zero)

GTM>; So it's a good way to get out of a lock if you can't get it.

GTM>LOCK +^DPT:5 ELSE  WRITE "No Lock...sorry"

GTM>; Command to show you what locks you have

GTM>; ZSHOW "L"

GTM>zshow "L"
MLG:4,MLT:3
LOCK ^DPT LEVEL=1
LOCK SAM LEVEL=1

GTM>LOCK +^DPT

GTM>zshow "L"
MLG:5,MLT:3
LOCK ^DPT LEVEL=2
LOCK SAM LEVEL=1

GTM>; This says:

GTM>; ^DPT has two locks on it in this process

GTM>; SAM has one lock on it in this process

GTM>; MLG: In this process, total of 5 locks were granted

GTM>; MLT: In this process, total of 3 locks timed out

GTM>LOCK -^DPT

GTM>ZSHOW "L"
MLG:5,MLT:3
LOCK ^DPT LEVEL=1
LOCK SAM LEVEL=1

GTM>LOCK -^DPT

GTM>ZSHOW "L"
MLG:5,MLT:3
LOCK SAM LEVEL=1

GTM>LOCK -SAM

GTM>ZSHOW "L"
MLG:5,MLT:3

GTM>LOCK +^DPT("UJOPID")
%GTM-I-CTRLC, CTRL_C encountered

GTM>LOCK +^DPT("UJOPID")

GTM>

Screen 3 (LKE):

Using username "worldvistaEHR".
Authenticating with public key "rsa-key-20101206"
Linux cassandra 2.6.26-1-686 #1 SMP Fri Mar 13 18:08:45 UTC 2009 i686

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Mon Mar 14 17:40:06 2011 from 192.168.56.44
worldvistaEHR@cassandra:~$ # LKE utility
worldvistaEHR@cassandra:~$ # LKE shows you the locks in ALL mumps processes
worldvistaEHR@cassandra:~$ # Cache has a routine called ^LOCKTAB that does the same
worldvistaEHR@cassandra:~$ alias lke
alias lke='/opt/lsb-gtm/gtm/lke'
worldvistaEHR@cassandra:~$ lke
LKE> ; SHOW
%GTM-E-CLIERR, Unrecognized command: ;
LKE> ; CLEAR
%GTM-E-CLIERR, Unrecognized command: ;
LKE> ; Don't use CLEAR unless you are debugging something
%GTM-E-CLIERR, Unrecognized command: ;
LKE> ; GT.M Admin manual has info on using LKE
%GTM-E-CLIERR, Unrecognized command: ;
LKE> SHOW

DEFAULT
SAM Owned by PID= 3272 which is an existing process
^%ZTSCH("SUBLK","EHR:cassandra",2407)
                         Owned by PID= 2407 which is an existing process
^DPT("UJOPID") Owned by PID= 3273 which is an existing process
No locks were found in MGWGBLS
No locks were found in SCRATCH
LKE> SHOW

DEFAULT
^%ZTSCH("TASK",3526) Owned by PID= 2407 which is an existing process
^DPT("UJOPID") Owned by PID= 3273 which is an existing process
^XMBPOST("POST_Mover") Owned by PID= 2407 which is an existing process
No locks were found in MGWGBLS
No locks were found in SCRATCH
LKE> SHOW

DEFAULT
^%ZTSCH("TASK",3526) Owned by PID= 2407 which is an existing process
^DPT("UJOPID") Owned by PID= 3273 which is an existing process
^XMBPOST("POST_Mover") Owned by PID= 2407 which is an existing process
No locks were found in MGWGBLS
No locks were found in SCRATCH
LKE> SHOW "W"

DEFAULT
^%ZTSCH("TASK",3526) Owned by PID= 2407 which is an existing process
^DPT("UJOPID") Owned by PID= 3273 which is an existing process
^XMBPOST("POST_Mover") Owned by PID= 2407 which is an existing process
No locks were found in MGWGBLS
No locks were found in SCRATCH
LKE> SHOW W

DEFAULT
^%ZTSCH("TASK",3526) Owned by PID= 2407 which is an existing process
^DPT("UJOPID") Owned by PID= 3273 which is an existing process
^XMBPOST("POST_Mover") Owned by PID= 2407 which is an existing process
No locks were found in MGWGBLS
No locks were found in SCRATCH
LKE> SHOW -W

DEFAULT
^DPT("UJOPID") Request  PID= 3272 which is an existing process
No locks were found in MGWGBLS
No locks were found in SCRATCH
LKE> SHOW -L=^DPT

DEFAULT
^DPT("UJOPID") Owned by PID= 3273 which is an existing process
No locks were found in MGWGBLS
No locks were found in SCRATCH
LKE> SHOW -P=3273

DEFAULT
^DPT("UJOPID") Owned by PID= 3273 which is an existing process
No locks were found in MGWGBLS
No locks were found in SCRATCH
LKE> SHOW -P=2333
No locks were found in DEFAULT
No locks were found in MGWGBLS
No locks were found in SCRATCH
LKE> CLEAR

DEFAULT
^%ZTSCH("TASK",3526) Owned by PID= 2407 which is an existing process
Clear lock ? ^DPT("UJOPID") Owned by PID= 3273 which is an existing process
Clear lock ? N
^XMBPOST("POST_Mover") Owned by PID= 2407 which is an existing process
Clear lock ? N
No locks were found in MGWGBLS
No locks were found in SCRATCH
LKE> CLEAR ^DPT

DEFAULT
^%ZTSCH("TASK",3526) Owned by PID= 2407 which is an existing process
Clear lock ? N
^DPT("UJOPID") Owned by PID= 3273 which is an existing process
Clear lock ? N
^XMBPOST("POST_Mover") Owned by PID= 2407 which is an existing process
Clear lock ? N
No locks were found in MGWGBLS
No locks were found in SCRATCH
LKE> CLEAR -L=^DPT

DEFAULT
^DPT("UJOPID") Owned by PID= 3273 which is an existing process
Clear lock ? No locks were found in MGWGBLS
No locks were found in SCRATCH
LKE> CLEAR -P=3526
No locks were found in DEFAULT
No locks were found in MGWGBLS
No locks were found in SCRATCH
LKE> SHOW

DEFAULT
^%ZTSCH("TASK",3526) Owned by PID= 2407 which is an existing process
^DPT("UJOPID") Owned by PID= 3273 which is an existing process
^XMBPOST("POST_Mover") Owned by PID= 2407 which is an existing process
No locks were found in MGWGBLS
No locks were found in SCRATCH
LKE> CLEAR -P=2407

DEFAULT
^%ZTSCH("TASK",3526) Owned by PID= 2407 which is an existing process
Clear lock ? ^XMBPOST("POST_Mover") Owned by PID= 2407 which is an existing process
Clear lock ? N
No locks were found in MGWGBLS
No locks were found in SCRATCH
LKE>