Mumps Class 19

From VistApedia
Revision as of 10:34, 22 February 2012 by NeilArmstrong (talk | contribs) (Added glossary link to Allergy~)
Jump to: navigation, search
Using username "sam".
sam@172.16.16.142's password:
Linux sam-desktop 2.6.32-30-generic #59-Ubuntu SMP Tue Mar 1 21:30:21 UTC 2011 i686 GNU/Linux
Ubuntu 10.04.2 LTS

Welcome to Ubuntu!
 * Documentation:  https://help.ubuntu.com/

Last login: Wed Mar 23 09:59:00 2011 from 172.16.16.56
sam@sam-desktop:~$ cd pocn-moh/
sam@sam-desktop:~/pocn-moh$ . run_utf8
sam@sam-desktop:~/pocn-moh$ mumps -dir

GTM>zp ^KBANPIPE
KBANPIPE ; Piping In and Out of GT.M ; 3/29/11 9:23am
 ;;
PRINT  ; From GT.M documentation.
 SET p="blahblah"
 OPEN p:(command="lpr":WRITEONLY)::"PIPE"
 U p
 WRITE "Hello Printer!"
 C p
 QUIT
MUMPSP  ; From MSCZJOBU
 SET P="blahblah"
 OPEN P:(COMM="ps -o pid=,pcpu=,user= -C mumps":READONLY)::"PIPE"
 U P
 F  R LINE Q:LINE=""  U $P W LINE,! U P
 C P
 QUIT
UNLOCK  ; From MSCZJOBU
 SET P="lkeunlock"
 OPEN P:(SHELL="/bin/bash":command="$gtm_dist/lke clear -ALL -nointeractive
-output=/dev/null")::"pipe"
 U P C P
SUBGTM  ; From TMGKERN3
 SET $ZSTEP="U 0 W $T(@$ZPOS),! U P B"
 SET P="SUBGTM"
 OPEN P:(command="$gtm_dist/mumps -dir":stream:nowrap)::"pipe"
 USE P
 HANG 0.2
 R X:0
 WRITE "S DUZ=8 D ^XUP"
 QUIT
 HANG 0.2
 FOR  R X:1 Q:X=""
 . S READ(X)=""
 WRITE !
 WRITE "HALT"
 CLOSE P
 QUIT





GTM>ZED "KBANPIPE"

GTM>ZED "KBANSTAR"

GTM>zed "KBANPIPE"

GTM>h
sam@sam-desktop:~/pocn-moh$ lpstat -a
HP-LaserJet-2200 accepting requests since Tue 22 Mar 2011 04:46:40 PM EET
PHH_GF_LABLABEL accepting requests since Tue 07 Sep 2010 11:11:39 AM EEST
sam@sam-desktop:~/pocn-moh$ mumps -dir

GTM>OPEN "printer":(command="lpr -P HP-LaserJet-2200":WRITEONLY):3:"PIPE"

GTM>USE "printer"

GTM>W "HELLO WORLD!"

GTM>W "HELLO AGAIN!"

GTM>W !

GTM>CLOSE "printer"

GTM>zed "KBANPIPE"

GTM>OPEN "ps":(comm="ps -o pid=,pcpu=,user= -C mumps":READONLY):3:"PIPE"

GTM>USE "ps"

GTM>FOR I=1:1 R X(I):0 QUIT:X(I)=""

GTM>CLOSE "ps"

GTM>zwrite X
X(1)=" 1355  0.0 openvista"
X(2)=" 1504  0.0 openvista"
X(3)=" 1689  0.0 openvista"
X(4)=" 2052  0.0 sam"
X(5)=" 2058  0.0 sam"
X(6)=" 2579  0.0 sam"
X(7)=""

GTM>zsy "cat /tmp/

GTM>zed "KBANPIPE"

GTM>zed "KBANPIPE"

GTM>LOCK ^DPT

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

GTM>D UNLOCK^KBANPIPE

GTM>ZSHOW "L"

GTM>ZED

GTM>OPEN P:(command="$gtm_dist/mumps -dir":stream:nowrap)::"pipe"

GTM>w P

GTM>c P

GTM>OPEN "subgtm":(command="$gtm_dist/mumps -dir":stream:nowrap)::"pipe"

GTM>zshow "D"
/dev/pts/2 OPEN TERMINAL NOPAST NOESCA NOREADS TYPE WIDTH=76 LENG=24
subgtm OPEN PIPE COMMAND="$gtm_dist/mumps -dir" NOWRAP

GTM>w $IO
/dev/pts/2
GTM>USE "subgtm"

GTM>K X

GTM>F I=1:1 R VALUE:0 QUIT:VALUE=""  S X(I)=VALUE

GTM>U $P

GTM>ZWRITE X
%GTM-E-UNDEF, Undefined local variable: X

GTM>ZWRITE VALUE
VALUE=""

GTM>USE "subgtm"

GTM>WRITE "S DUZ=8 D ^XUP"

GTM>WRITE !

GTM>USE $P

GTM>USE "subgtm"

GTM>F I=1:1 R VALUE:0 QUIT:VALUE=""  S X(I)=VALUE

GTM>USE $P

GTM>ZWRITE X
X(1)="GTM>"

GTM>USE "subgtm"

GTM>F I=1:1 R VALUE:0 QUIT:VALUE=""  S X(I)=VALUE

GTM>USE $P

GTM>ZWRITE X
X(1)="Setting up programmer environment"
X(2)="This is a TEST account."

GTM>USE "subgtm"

GTM>CLOSE "subgtm"

GTM>zshow "D"
/dev/pts/2 OPEN TERMINAL NOPAST NOESCA NOREADS TYPE WIDTH=76 LENG=24

GTM>OPEN "subgtm":(command="$gtm_dist/mumps -dir":stream:nowrap)::"pipe"

GTM>USE "subgtm"

GTM>W "S DUZ=8 D ^XUP",!

GTM>F I=1:1 R VALUE:0 QUIT:'$TEST  S X(I)=VALUE

GTM>U $P

GTM>ZWRITE X
X(1)=""
X(2)="GTM>"

GTM>USE "subgtm"

GTM>F I=1:1 R VALUE:0 QUIT:'$TEST  S X(I)=VALUE

GTM>U $P

GTM>ZWRITE X
X(1)=""
X(2)="GTM>"

GTM>USE "subgtm"

GTM>W "S DUZ=8 D ^XUP",!

GTM>F I=1:1 R VALUE:0 QUIT:'$TEST  S X(I)=VALUE

GTM>U $P

GTM>ZWRITE X
X(1)=""
X(2)="GTM>"

GTM>

GTM>zshow "D"
%GTM-E-ZSHOWBADFUNC, An illegal function was specified for ZSHOW

GTM>zshow "d"
%GTM-E-ZSHOWBADFUNC, An illegal function was specified for ZSHOW

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

GTM>zshow "D"
/dev/pts/2 OPEN TERMINAL NOPAST NOESCA NOREADS TYPE WIDTH=76 LENG=24
subgtm OPEN PIPE COMMAND="$gtm_dist/mumps -dir" NOWRAP

GTM>close "subgtm"

GTM>D P^DI


VA FileMan 22.0

Your Identity(DUZ) is 0(zero).
Please identify yourself.

Access Code:
Your Identity(DUZ) is still 0(zero).
You need to identify yourself!

New Person?: 111  HABIEL,SAM M     SMH          THE WIZARD
         ...OK? Yes//   (Yes)


Select OPTION:
GTM>D P^DI


VA FileMan 22.0


Select OPTION: ENTER OR EDIT FILE ENTRIES



INPUT TO WHAT FILE: BSDX APPOINTMENT// DEVICE    (79 entries)
EDIT WHICH FIELD: ALL//


Select DEVICE NAME: ??

   Choose from:
   BROWSER (CIRN)       Text Browser Utility     NUL
   BROWSER CACHE/NT       HFS/CRT     C:\TEMP\DDBR.TXT
   BROWSER DSM/VMS       HFS/CRT     DDBR.TXT
   BROWSER MSM/DOS       HFS/CRT     51
   BROWSER MSM/NT       HFS/CRT     51
   CHRIS       CHRIS     |PRN|CHRIS
   CONSOLE       Console (GT.M)     /dev/tty
   DG FIELD MONITOR       DG field editing protocol     DG FIELD MONITOR

   DSM-NULL       Bit Bucket     _NLA0:
   EHS-3RD-FL-LANDSCAPE       EHS 3rd Floor     <pipe>
   EHS-3RD-FLOOR       EHS 3RD FLOOR     <pipe>
   FAUX PRINTER       LAT TERMINAL     LC-
   GMRA UPDATE RESOURCE       Allergy update control     GMRA UPDATE RESOURC
E
   HDIS STATUS RESOURCE DEVICE       Resource Device     HDIS STATUS RESOURC
E DEVICE
   HDIS VUID RESOURCE DEVICE       Resource Device     HDIS VUID RESOURCE DE
VICE
                ^

     You may enter a new DEVICE, if you wish
     NAME BY WHICH TO REFER TO THE DEVICE, Must start with 1 UPPERcase and
     not contain lowercase, or ';', or '.'.
Select DEVICE NAME: EHS-3RD-FLOOR      EHS 3RD FLOOR     <pipe>
NAME: EHS-3RD-FLOOR//
LOCATION OF TERMINAL: EHS 3RD FLOOR//
Select MNEMONIC:
LOCAL SYNONYM:
$I: <pipe>//
VOLUME SET(CPU):
SIGN-ON/SYSTEM DEVICE:
TYPE: OTHER//
SUBTYPE: P-OTHER80//
ASK DEVICE:
ASK PARAMETERS:
ASK HOST FILE:
ASK HFS I/O OPERATION:
QUEUING:
OUT-OF-SERVICE DATE:
NEAREST PHONE:
KEY OPERATOR:
MARGIN WIDTH:
PAGE LENGTH:
SUPPRESS FORM FEED AT CLOSE:
SECURITY:
CLOSEST PRINTER:
FORM CURRENTLY MOUNTED:
OPEN PARAMETERS:
CLOSE PARAMETERS:
USE PARAMETERS:
PRE-OPEN EXECUTE: X "o ""p"":(command=""paps --font='Monospace 10'|lpr"")::"
"pipe"" s IO=""p"""  Replace
POST-CLOSE EXECUTE: X "c ""p"""//
MICOM PRINTER CONTENTION PORT: ^


Select DEVICE NAME: ??

   Choose from:
   BROWSER (CIRN)       Text Browser Utility     NUL
   BROWSER CACHE/NT       HFS/CRT     C:\TEMP\DDBR.TXT
   BROWSER DSM/VMS       HFS/CRT     DDBR.TXT
   BROWSER MSM/DOS       HFS/CRT     51
   BROWSER MSM/NT       HFS/CRT     51
   CHRIS       CHRIS     |PRN|CHRIS
   CONSOLE       Console (GT.M)     /dev/tty
   DG FIELD MONITOR       DG field editing protocol     DG FIELD MONITOR

   DSM-NULL       Bit Bucket     _NLA0:
   EHS-3RD-FL-LANDSCAPE       EHS 3rd Floor     <pipe>
   EHS-3RD-FLOOR       EHS 3RD FLOOR     <pipe>
   FAUX PRINTER       LAT TERMINAL     LC-
   GMRA UPDATE RESOURCE       [[Allergy~|Allergy]] update control     GMRA UPDATE RESOURC
E
   HDIS STATUS RESOURCE DEVICE       Resource Device     HDIS STATUS RESOURC
E DEVICE
   HDIS VUID RESOURCE DEVICE       Resource Device     HDIS VUID RESOURCE DE
VICE
                ^

     You may enter a new DEVICE, if you wish
     NAME BY WHICH TO REFER TO THE DEVICE, Must start with 1 UPPERcase and
     not contain lowercase, or ';', or '.'.
Select DEVICE NAME: EHS-3RD-FL-LANDSCAPE      EHS 3rd Floor     <pipe>
NAME: EHS-3RD-FL-LANDSCAPE  Replace
LOCATION OF TERMINAL: EHS 3rd Floor// ^


Select DEVICE NAME: NULL DEVICE 2
  Are you adding 'NULL DEVICE 2' as a new DEVICE (the 80TH)? No// Y  (Yes)
   DEVICE LOCATION OF TERMINAL: GT.M NULL DEVICE
   DEVICE $I: /dev/null        This $I in use by other Devices.
   DEVICE VOLUME SET(CPU):
   DEVICE TYPE: ?
     Choose from:
       TRM      TERMINAL
       OTH      OTHER
       MT       MAGTAPE
       SDP      SDP
       SPL      SPOOL
       BAR      BARCODE READER
       HFS      HOST FILE SERVER
       VTRM     VIRTUAL TERMINAL
       HG       HUNT GROUP
       RES      RESOURCES
       CHAN     NETWORK CHANNEL
       IMPC     IMAGING WORK STATION
   DEVICE TYPE: trm  TERMINAL
LOCATION OF TERMINAL: GT.M NULL DEVICE// ^


Select DEVICE NAME:




Select OPTION: print FILE ENTRIES

OUTPUT FROM WHAT FILE: DEVICE//
SORT BY: NAME//
START WITH NAME: FIRST//
FIRST PRINT FIELD: name
THEN PRINT FIELD:
Heading (S/C): DEVICE LIST//
DEVICE: NULL  Bit Bucket (GT.M-Unix)

Do you want your output QUEUED? No// ^

DEVICE:    GT.M NULL DEVICE

Do you want your output QUEUED? No// ^

DEVICE: NULL DEVICE 2  GT.M NULL DEVICE

Do you want your output QUEUED? No//   (No)





Select OPTION: ENTER OR EDIT FILE ENTRIES



INPUT TO WHAT FILE: DEVICE//
EDIT WHICH FIELD: ALL// ^




Select OPTION: INQUIRE TO FILE ENTRIES



OUTPUT FROM WHAT FILE: DEVICE//
Select DEVICE NAME: TELNET      TELNET     /dev/pts/
ANOTHER ONE:
STANDARD CAPTIONED OUTPUT? Yes//   (Yes)
Include COMPUTED fields:  (N/Y/R/B): NO//  - No record number (IEN), no Comp
uted Fields

NAME: TELNET                            $I: /dev/pts/
  ASK DEVICE: YES                       QUEUING: NOT ALLOWED
  LOCATION OF TERMINAL: TELNET          ASK HOST FILE: YES
  OPEN COUNT: 30005
MNEMONIC: TELNET
  SUBTYPE: C-VT320                      TYPE: VIRTUAL TERMINAL



Select DEVICE NAME: CONSOLE      Console (GT.M)     /dev/tty
ANOTHER ONE:
STANDARD CAPTIONED OUTPUT? Yes//   (Yes)
Include COMPUTED fields:  (N/Y/R/B): NO//  - No record number (IEN), no Computed
 Fields

NAME: CONSOLE                           $I: /dev/tty
  ASK DEVICE: YES                       LOCATION OF TERMINAL: Console (GT.M)
MNEMONIC: CONSOLE
  SUBTYPE: C-VT100                      TYPE: VIRTUAL TERMINAL



Select DEVICE NAME:




Select OPTION:
GTM>^
%GTM-E-CMD, Command expected but not found
        ^
        ^-----

GTM>ZWRITE IO
IO="/dev/pts/2"
IO(0)="/dev/pts/2"
IO(1,"/dev/pts/2")=""
IO("CLOSE")="/dev/null"
IO("ERROR")=""
IO("HOME")="50^/dev/pts/2"

GTM>H
sam@sam-desktop:~/pocn-moh$ mumps -dir

GTM>S DUZ=8 D ^XUP

Setting up programmer environment
This is a TEST account.

Terminal Type set to: C-VT102

You have 49 new messages.
Select OPTION NAME:
GTM>ZWRITE IO
IO="/dev/pts/2"
IO(0)="/dev/pts/2"
IO(1,"/dev/pts/2")=""
IO("ERROR")=""
IO("HOME")="50^/dev/pts/2"
IO("IP")="172.16.16.56"
IO("ZIO")="/dev/pts/2"

GTM>D ^%ZIS

DEVICE: HOME// EHS

 1 EHS-3RD-FL-LANDSCAPE   EHS 3rd Floor
 2 EHS-3RD-FLOOR   EHS 3RD FLOOR
Choose 1-2> 2  EHS-3RD-FLOOR  EHS 3RD FLOOR

GTM>ZWRITE IO
IO="p"
IO(0)="/dev/pts/2"
IO(1,"/dev/pts/2")=""
IO(1,"p")=""
IO("ERROR")=""
IO("HOME")="50^/dev/pts/2"
IO("IP")="172.16.16.56"
IO("ZIO")="/dev/pts/2"

GTM>W $IO
/dev/pts/2
GTM>USE IO

GTM>W "HELLO printer",!

GTM>W "I am writing from %ZIS",!

GTM>W "Bye",!

GTM>D ^%ZISC

GTM>W "HELLO"
HELLO
GTM>ZWRITE IO
IO="/dev/pts/2"
IO(0)="/dev/pts/2"
IO(1,"/dev/pts/2")=""
IO("CLOSE")="p"
IO("HOME")="50^/dev/pts/2"
IO("IP")="172.16.16.56"
IO("ZIO")="/dev/pts/2"

GTM>S IOP="EHS-3RD-FLOOR"

GTM>D ^%ZIS

GTM>W POP
0
GTM>; Pop is used by VISTA to tell you whether the device was successfully e
d.

GTM>;opened

GTM>zwrite IO
IO="p"
IO(0)="/dev/pts/2"
IO(1,"/dev/pts/2")=""
IO(1,"p")=""
IO("CLOSE")="p"
IO("ERROR")=""
IO("HOME")="50^/dev/pts/2"
IO("IP")="172.16.16.56"
IO("ZIO")="/dev/pts/2"

GTM>USE IO

GTM>W "BLAH BLAH",!

GTM>D ^%ZISC

GTM>; SET IOP to be the DEVICE NAME or `IEN

GTM>; D ^%ZIS

GTM>; Check POP to see if the device opened

GTM>; if it opened, then USE IO

GTM>; Write to the device

GTM>; Close device with ^%ZISC

GTM>h
sam@sam-desktop:~/pocn-moh$ cd routines/
sam@sam-desktop:~/pocn-moh/routines$ grep
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
sam@sam-desktop:~/pocn-moh/routines$ grep "\^\%ZIS" OR*
ORB3MGR1.m: S IOP=0 D ^%ZIS K IOP W @IOF
ORB3REC.m: S IOP=0 D ^%ZIS K IOP W @IOF
ORB3SPEC.m: ..I ORBZ="%ZIS(1," S ORBDEV=$P(ORBE,";") I $L(ORBDEV),$D(^%ZIS(1,ORBDEV))>0 D
ORB3SPEC.m: ...S ORBDEV=$G(^%ZIS(1,ORBDEV,0)) I $D(ORBDEV) D
ORB3U1.m: D ^%ZIS
ORB3U1.m: .D HOME^%ZIS
ORB3U1.m: D ^%ZISC
ORB3U2.m: D ^%ZIS
ORB3U2.m: .D HOME^%ZIS
ORB3U2.m: D ^%ZISC
ORCK101.m: D ^%ZIS
ORCK101.m: D HOME^%ZIS
ORCK101.m: D ^%ZISC K CTR,DONE,ORTOP
ORCK101.m: D ^%ZIS
ORCK101.m: D HOME^%ZIS
ORCK101.m: S %ZIS="QM" D ^%ZIS I POP D CLEAN Q
ORCK101.m: I $D(IO("Q")) D QUE,^%ZISC,CLEAN Q
ORCMGMCK.m: S %ZIS="QM" D ^%ZIS Q:POP
ORCMGMCK.m: I $D(IO("Q")) D  D ^%ZISC,HOME^%ZIS Q
ORCMGMCK.m: D:$E(IOST,1,2)'="C-" ^%ZISC
ORCMGMCK.m: D HOME^%ZIS
ORCNOTE.m:PRINTX N IOSTBM D ^%ZISC,FIXLST^TIULM
ORCPOST.m: S DIC(0)="QMXZ",DIC="^%ZIS(2,",X="P-OTHER" D ^DIC
OREORV.m: ;  ^%ZIS    - DBIA 10086
OREORV.m: ;  ^%ZISC   - DBIA 10089
OREORV.m: ;  %ZIS   - Input specification variable, ^%ZIS
OREORV.m: ;  POP    - Exit Status, output variable ^%ZIS
OREORV.m: S %ZIS="Q" D ^%ZIS
OREORV.m: D ^%ZISC
ORGUEM3.m: S %ZIS="Q" D ^%ZIS I POP D HOME^%ZIS Q
ORGUEM3.m: . D HOME^%ZIS
ORGUEM3.m: I '$D(ZTQUEUED) D ^%ZISC
ORGUEM.m: D HOME^%ZIS S X="IOINHI;IOINLOW" D ENDR^%ZISS
ORKMGR.m: S IOP=0 D ^%ZIS K IOP W @IOF
ORKREC.m: S IOP=0 D ^%ZIS K IOP W @IOF
ORKUTL.m: D ^%ZIS
ORKUTL.m: .D HOME^%ZIS
ORKUTL.m: D ^%ZISC
ORLP3MGR.m: S IOP=0 D ^%ZIS K IOP W @IOF
ORLP3USR.m: S IOP=0 D ^%ZIS K IOP W @IOF
ORLPSRA.m:      D ^%ZISC
ORLPSR.m:       S %ZIS="Q" D ^%ZIS I POP Q
ORLPSR.m:       D ^%ZISC
ORPKFIX.m: S %ZIS="Q" D ^%ZIS G QUIT:POP
ORPKFIX.m:QUIT D ^%ZISC K %ZIS,DIR,DIROUT,DIRUT,ORCNT,ORJOB,ORNUM,ORNODE,ORPAGE,POP,Y,ZTREQ,ZTQUEUED,^TMP("ORPKFIX")
ORPKFIX.m: D HOME^%ZIS
ORPR02.m: D HOME^%ZIS
ORPR03.m: I '$G(TASK) D ^%ZISC I $D(ZTSK) D KILL^%ZTLOAD K ZTSK
ORPR03.m: I '$G(TASK) D ^%ZISC I $D(ZTSK) D KILL^%ZTLOAD K ZTSK
ORPR03.m: I $D(ZTSK),'$G(TASK) D ^%ZISC,KILL^%ZTLOAD K ZTSK
ORPR03.m: I '$G(TASK) D ^%ZISC I $D(ZTSK) D KILL^%ZTLOAD K ZTSK
ORPR03.m: I '$G(TASK) D ^%ZISC I $D(ZTSK) D KILL^%ZTLOAD K ZTSK
ORPRS01.m: I $D(IOST),$L(IOST) S X=$O(^%ZIS(2,"B",IOST,0)) I X,$D(^%ZIS(2,X)) S ORTERM(5)=$S($D(^(X,5)):$P(^(5),"^",4,5),1:""),ORTERM(7)=$S($D(^(7)):$P(^(7),"^",1,3),1:"") S:'$L($P(ORTERM(7),"^",3)) $P(ORTERM(7),"^",3)=$P(ORTERM(7),"^",2)
ORPRS06.m: D ^%ZISC
ORPRS06.m: D ^%ZISC
ORPRS07.m:      . I $L(ORMETHOD) X ORMETHOD I $G(ION)'=ORION S IOP=ORION D ^%ZIS
ORPRS07.m:      S %ZIS="Q",%ZIS("B")="HOME" D ^%ZIS Q:POP
ORPRS07.m:      K ZTSK,ZTDESC,ZTDTH,ZTIO,ZTRTN,ZTSAVE D ^%ZISC
ORPRS07.m:      D ^%ZISC
ORQPTQ1.m:      I '$D(^%ZIS(1,ORDEV,0)) D  ;ORDEV is not an ien
ORQPTQ1.m:      .S ORDEVIEN=0,ORDEVIEN=$O(^%ZIS(1,"B",$P(ORDEV,U),ORDEVIEN))
ORRCOA.m: S %ZIS="M" D ^%ZIS U IO
ORRCOA.m: D ^%ZISC
ORS100A.m: D ^%ZISC
ORS100.m: S %ZIS="Q" D ^%ZIS I POP Q
ORS100.m: D ^%ZISC
ORSNAST1.m: D ^%ZISC
ORSNAST.m: S %ZIS="Q" D ^%ZIS I POP Q
ORSNAST.m: D ^%ZISC
ORUHDR.m: I '$D(IOF) S IOP=ORIO D ^%ZIS Q:POP  S X=0 X ^%ZOSF("RM") S (ORFT,ORANSI)=0
ORULG.m: D HOME^%ZIS N ZTDESC,ZTDTH,ZTIO,ZTRTN,ZTSAVE,ZTSK
ORULG.m: K IOP,%ZIS S %ZIS="NQM",%IS("B")="" D ^%ZIS K %ZIS
ORULG.m: I '$D(IO("Q")) D ^%ZIS G START
ORULG.m: K IO("Q") D ^%ZTLOAD D HOME^%ZIS G END
ORUS.m:EN S Y=-1 Q:'$D(ORUS)!('$D(ORUS(0)))  S:'($D(IO)#2) IO="HOME" I 'IO S IOP=$S($D(ORIO):ORIO,1:"") D ^%ZIS
ORUTL1.m:       I $G(QUE) S:%ZIS'["Q" %ZIS=%ZIS_"Q" S %ZIS("S")="I $S($G(^%ZIS(2,+$G(^(""SUBTYPE"")),0))'[""C-"":1,1:0)",%ZIS("B")=""
ORUTL1.m:       D ^%ZIS
ORUTL1.m:       . D ^%ZISC
ORUTL1.m:       D ^%ZISC
ORVOM.m: I '$D(IOBS) D HOME^%ZIS
ORWDBA14.m: ; ^%ZIS         DBIA 10086
ORWDBA14.m: ; ^%ZISC        DBIA 10089
ORWDBA14.m: ; POP      Cancel device select, program run output from ^%ZIS
ORWDBA14.m: S %ZIS="Q" D ^%ZIS I POP G EXIT
ORWDBA14.m: D ^%ZISC
ORWDBA14.m: D ^%ZISC
ORWDBA5.m: D:'$D(IO)!('$D(IOF)) HOME^%ZIS
ORWPFSS0.m: ;  HOME^%ZIS   DBIA 10086, User console device set up
ORWPFSS0.m: D:'$D(IO)!('$D(IOF)) HOME^%ZIS
ORWRP16.m: D ^%ZIS K IOP,%ZIS
ORWRP16.m: IF IO=ORIO D ^%ZISC
ORWRP16.m: ; D OPEN^%ZISH(ORSUB,"",ORHFS,"R") I POP Q
ORWRP16.m: S OROK=$$FTG^%ZISH(,ORHFS,$NA(^TMP($J,"ORTMPLST",1)),3)
ORWRP16.m: ; D CLOSE^%ZISH(ORSUB)
ORWRP16.m: S OROK=$$DEL^%ZISH("",$NA(ORARR))
ORWRP16.m: . ;F  U IO R X:5 D  Q:$$STATUS^%ZISH
ORWRP.m:        I $D(ORHANDLE) D CLOSE^%ZISH(ORHANDLE)
ORWRP.m:        . S ORARR(ORHFS)="",OROK=$$DEL^%ZISH("",$NA(ORARR)) ;delete HFS file
ORWRP.m:        D OPEN^%ZISH(HANDLE,,ORHFS,$G(ORMODE,"W")) Q:POP
ORWRP.m:        I $O(^%ZIS(1,"B",ORIO,0)) S IFN=$O(^(0)),IOS=IFN
ORWRP.m:        I $D(^%ZIS(1,IFN,0)) S IOST(0)=+$G(^("SUBTYPE")),IOT=$G(ORIOT,^("TYPE")),IOST=$G(ORIOST,$P($G(^%ZIS(2,IOST(0),0),IOST),"^"))
ORWRP.m:        I $O(^%ZIS(2,"B",IOST,0)) S IFN=$O(^(0)) I IFN S IOST(0)=IFN,IFN1=$G(^%ZIS(2,IFN,1)),IOM=$G(ORRM,$P(IFN1,"^")),IOF=$G(ORIOF,$P(IFN1,"^",2)),IOSL=$G(ORIOSL,$P(IFN1,"^",3))
ORWRP.m:        I IO[ORHFS D CLOSE^%ZISH(HANDLE)
ORWRP.m:        S X=$$FTG^%ZISH(,ORHFS,$NA(@ROOT@(1)),4)
ORWRP.m:        S X=$$DEL^%ZISH(,$NA(ORDEL))
ORWRP.m:        S OROK=$$FTG^%ZISH(,ORHFS,$NA(@ROOT@(1)),4) I 'OROK Q
ORWRP.m:        S OROK=$$DEL^%ZISH("",$NA(ORARR))
ORWRP.m:        Q:'$D(^%ZIS(1,IEN,0))  S X0=^(0)
ORWU16.m: F  S DEV=$O(^%ZIS(1,"B",DEV)) Q:DEV=""  S IEN=$O(^(DEV,0)) D
ORWU16.m: . I $E($G(^%ZIS(2,+$G(^%ZIS(1,IEN,"SUBTYPE")),0)))'="P" Q
ORWU16.m: . I $P($G(^%ZIS(1,IEN,0)),U,12)=2 Q
ORWU16.m: . S I=I+1,Y(I)=IEN_";"_$P(^%ZIS(1,IEN,0),U)_U_DEV_U_$P($G(^(1)),U)_U_$P($G(^(90)),U)_U_$P(^(91),U)_U_$P(^(91),U,3)
ORWU.m: F  Q:I'<CNT  S FROM=$O(^%ZIS(1,"B",FROM),DIR) Q:FROM=""  D
ORWU.m: . S IEN=0 F  S IEN=$O(^%ZIS(1,"B",FROM,IEN)) Q:'IEN  D
ORWU.m: .. Q:'$D(^%ZIS(1,IEN,0))  S X0=^(0),X1=$G(^(1)),X90=$G(^(90)),X91=$G(^(91)),X95=$G(^(95)),XSTYPE=$G(^("SUBTYPE")),XTIME=$G(^("TIME")),XTYPE=$G(^("TYPE"))
ORWU.m: .. I $E($G(^%ZIS(2,+XSTYPE,0)))'="P" Q  ;Printers only
sam@sam-desktop:~/pocn-moh/routines$ ^C
sam@sam-desktop:~/pocn-moh/routines$ vim ORUTL1.m
sam@sam-desktop:~/pocn-moh/routines$