155 lines
15 KiB
Plaintext
155 lines
15 KiB
Plaintext
FirstRelease WVEHR VER VOE1.0
|
|
Cache 31-Jan-2008 23:07:04 ZWR
|
|
^%Z="N %RN S %NX=""LOCK"" X ^%Z(0) F %IED=0:0 X ^%Z(%NX) Q:'$D(%NX)"
|
|
^%Z(0)="S %9=84000,%SL=0,%RM=80,XY="""",%S=0,%ST="""" X ^%Z(""TERM1""),^%Z(""TERM3"") W !,""%Z Editing: "",$T(+0),"" Terminal type: "",%ST I $D(%TG) S %T=%TG X ^%Z(""TAG"") K:%L="""" %TG"
|
|
^%Z(1)="S %NX=2 R !,""Edit: "",%X:%9"
|
|
^%Z(2)="S %NX=$S(%X="""":31,%X?1A1"" "".E:""EXEC"",%X?1""+"".N:10,%X?1""""""""""+"".N:35,%X?1""^"".E:""GLO"",%X=""*"":""GT3"",%X?1""*"".E:""LOCAL"",%X?1""-"".N:26,%X?1""Z""1A1"" "".E:""EXEC"",%X?1""."".E:""FUNC"",%X?1""?"".E:""?"",%X[""-"":25,1:""EDIT"")"
|
|
^%Z(10)="S %NX=32 S:%X=""+"" %X=""+1"" I $D(%TG),%TG'?1""+"".E S %A=$P(%TG,""+"",2)+$E(%X,2,9),%TG=$P(%TG,""+"",1),%NX=31 S:%A %TG=%TG_""+""_%A"
|
|
^%Z(25)="S %NX=27,%B=$P(%X,""-"",1),%A=0-$P(%X,""-"",2)"
|
|
^%Z(26)="S %NX=32 S:%X=""-"" %X=""-1"" I $D(%TG),%TG'?1""+"".E S %A=$P(%TG,""+"",2)-$E(%X,2,9),%B=$P(%TG,""+"",1),%NX=27 I %A'<0 S %TG=%B,%NX=31 I %A S %TG=%TG_""+""_%A"
|
|
^%Z(27)="S %NX=""what"" F %I=1:1 S %C=$T(+%I) Q:%C="""" I $P($P(%C,"" ""),""("")=%B S %A=%I+%A S:%A>0 %NX=28 Q"
|
|
^%Z(28)="S %NX=29,%B=0 F %I=1:1:%A S %C=$P($P($T(+%I),"" ""),""(""),%B=%B+1 I %C]"""" S %TG=%C,%B=0"
|
|
^%Z(29)="S %NX=31 I %B S %TG=%TG_""+""_%B"
|
|
^%Z(31)="S:'$D(%TG) %TG=""+1"" W "" "",%TG S %X=%TG,%NX=""EDIT"""
|
|
^%Z(32)="S:'$D(%TG)&(%X<0) %NX=""what"" S:'$D(%TG) %TG="""" S %TG=%TG+%X S:%TG<0 %NX=""what"" S:%TG'<0 %TG=""+""_%TG,%NX=31"
|
|
^%Z(35)="S %X=$E(%X,3,99),%NX=$S(%X>0:""EDIT"",1:""what"") I %X=""+0"" W !,$T(+0) S %NX=1"
|
|
^%Z("?")="S %NX=1 F %X=1,$S(XY]"""":2,1:3) F %=0:0 S %=$O(^%Z(""?"",%X,%)) Q:%="""" W !,^(%)"
|
|
^%Z("?",1,1)=".ACTION menu .BREAK line .CHANGE every"
|
|
^%Z("?",1,2)=".FILE routine .INSERT after .JOIN lines"
|
|
^%Z("?",1,3)=".MOVE lines .REMOVE lines .SEARCH for"
|
|
^%Z("?",1,4)=".TERMinal type .XY change to/from replace-with"
|
|
^%Z("?",1,5)=". -TO EXIT THE EDITOR"
|
|
^%Z("?",1,6)="""""+n Absolute line n +n To advance n lines -n To backup n lines"
|
|
^%Z("?",1,7)=" use '*' to get last line"
|
|
^%Z("?",1,8)=""
|
|
^%Z("?",1,9)="^NAME - to edit a GLOBAL node *NAME - to edit a LOCAL variable"
|
|
^%Z("?",1,10)="MUMPS command line (mumps command <space> or Z command <space>)"
|
|
^%Z("?",1,11)=""
|
|
^%Z("?",2,1)="In the line mode,"
|
|
^%Z("?",2,2)="Spacebar moves to the next space or comma. Dot to the next char."
|
|
^%Z("?",2,3)="'>' To move forward 80 char or to end of line."
|
|
^%Z("?",2,4)="Backspace to back up one char. E to enter new char's at the cursor."
|
|
^%Z("?",2,5)="CR to exit enter mode, return to start of line or EDIT prompt."
|
|
^%Z("?",2,6)="D to delete from the cursor to the next space or comma."
|
|
^%Z("?",2,7)="Delete (Rub) to delete the char under the cursor."
|
|
^%Z("?",2,8)="CTRL-R to restore line and start back at the beginning."
|
|
^%Z("?",2,9)=" "
|
|
^%Z("?",3,1)="In the replace/with mode,"
|
|
^%Z("?",3,2)="SPECIAL <REPLACE> STRINGS:"
|
|
^%Z("?",3,3)=" END -to add to the END of a line"
|
|
^%Z("?",3,4)=" ... -to replace a line"
|
|
^%Z("?",3,5)=" A...B -to specify a string that begins with ""A"" and ends with ""B"""
|
|
^%Z("?",3,6)=" A... -to specify a string that begins with ""A"" to the end of the line "
|
|
^%Z("?",3,7)="CTRL-R to restore line."
|
|
^%Z("?",99,1)="Bytes in routine Checksum Restore lines"
|
|
^%Z("?",99,2)="Save lines Version #"
|
|
^%Z("?A")="S %NX=""ACTION"" F %=0:0 S %=$O(^%Z(""?"",99,%)) Q:%="""" W !,^(%)"
|
|
^%Z("A66")="S %NX=""A661"",%Y=0 F %=1:1 S %X=$T(+%) Q:%X="""" S %Y=%Y+2+$L(%X) I $L(%X)>245 W !,""Line '+"",%,""' is longer than 245"""
|
|
^%Z("A661")="S %NX=""A99"" W ?20,""Routine is "",%Y,"" Bytes in size."""
|
|
^%Z("A67")="X ^%Z(""A671"") W !,?20,""Checksum is "",%Y S %NX=""A99"""
|
|
^%Z("A671")="S %Y=0 F %=1,3:1 S %1=$T(+%),%3=$F(%1,"" "") Q:'%3 S %3=$S($E(%1,%3)'="";"":$L(%1),$E(%1,%3+1)="";"":$L(%1),1:%3-2) F %2=1:1:%3 S %Y=$A(%1,%2)*%2+%Y"
|
|
^%Z("A82")="X ^%Z(""MV100""),^%Z(""A99"")"
|
|
^%Z("A83")="X ^%Z(""MV1""),^%Z(""A99"")"
|
|
^%Z("A86")="W !,""%Z editor version "",^%Z(""VR"") X ^%Z(""A99"")"
|
|
^%Z("A99")="S %NX=""ACTION"""
|
|
^%Z("ACTION")="R !,""Action: "",%X:%9 S %X=$S(%X?1""."".E:$E(%X,2),1:$E(%X)),%NX=$S(%X="""":1,""BCRSV""[%X:""A""_$A(%X),""bcrsv""[%X:""A""_($A(%X)-32),%X=""?"":""?A"",1:""what2"")"
|
|
^%Z("BR2")="S %NX=1 R "" after characters: "",%R:%9 I %R'="""",%L[%R S %LS=$P(%L,%R,2,999),%LS=$E("" "",%LS'?1"" "".E)_%LS,%L=$P(%L,%R,1)_%R ZR @%TG ZI %L,%LS W !,%L,!,%LS"
|
|
^%Z("BREAK")="S %NX=""what"" W ""reak line: "" X ^%Z(""GTAG"") Q:%L="""" S %NX=""BR2"" W:%X'=%T "" "",%T S %TG=%T"
|
|
^%Z("CH2")="S %NX=1 F %A=%A:1:%I S %L=$T(+%A),%F=$F(%L,%R),%X=%F X:%X>0 ^%Z(""CH3"") S:$P(%L,"" "")]"""" %T=$P(%L,"" ""),%C=0,%B=$P(%T,""("") S %T=$S(%C:%B_""+""_%C,1:%T),%C=%C+1 W:%X>0 !,%T,?6,"" "",$P(%L,"" "",2,99)"
|
|
^%Z("CH3")="X ^%Z(""CH4"") ZR +%A ZI %L"
|
|
^%Z("CH4")="F %IED=0:0 S %L=$E(%L,0,%F-$L(%R)-1)_%W_$E(%L,%F,999),%F=$F(%L,%R,%F+%D) Q:%F<1"
|
|
^%Z("CHANGE")="S %NX=1 R ""hange every: "",%R:%9 Q:%R="""" R "" to: "",%W:%9,! X ^%Z(""SELALL"") S %D=$L(%W)-$L(%R),%NX=$S(%POP:""what"",1:""CH2"")"
|
|
^%Z("E1")="S DX=0,DY=%SL,%A=1,%N=""E2"" W !!!! X ^%Z(""EWL""),^%Z(""EW1"")"
|
|
^%Z("E2")="S DX=%A-1#%RM,DY=%A-1\%RM+%SL,%EX=$L(%L)#%RM,%EY=$L(%L)\%RM+%SL,%N=""E3"""
|
|
^%Z("E3")="S %N=""E4"" X:DX'<%RM ^%Z(""ER"") X XY"
|
|
^%Z("E4")="R *%X:%9 S %X=$S($C(%X)?1L:%X-32,1:%X),%N=$S(%X=69:""EE"",%X=8:""EB"",%X=13!(%X=27):""EOL"",%A>$L(%L):""E4"",%X=32:""ES"",%X=46:""EP"",%X=127:""ERUB"",%X=68:""EDEL"",%X=18:""EUD"",%X=62:""EL"",1:""E4"")"
|
|
^%Z("EB")="S %N=""E3"" Q:%A=1 S DX=DX-1,%A=%A-1 I DX=-1 S DX=%RM-1,DY=DY-1"
|
|
^%Z("ED")="F %IED=0:0 R "" r "",%R:%9 Q:%R="""" X ^%Z($S(%R=""END"":""ED16"",%L[%R:""ED14"",%R[""..."":""ED20"",%R=$C(18):""ED15"",1:""ED17""))"
|
|
^%Z("ED14")="R "" w "",%W:%9 S %L=$P(%L,%R,1)_%W_$P(%L,%R,2,999)"
|
|
^%Z("ED15")="S %L=%LO W !,""Line restored"",!,%L,!"
|
|
^%Z("ED16")="R "" w "",%W:%9 S %L=%L_%W"
|
|
^%Z("ED17")="W "" ???"""
|
|
^%Z("ED20")="S %A=$P(%R,""..."",1),%B=$P(%R,""..."",2,999),%J=$F(%L,%A),%C=%J-1-$L(%A),%D=$S(%B="""":999,1:$F(%L,%B,%J)) W:%C<0!(%D<1) "" ???"" Q:%C<0!(%D<1) R "" w "",%W:%9 S %L=$E(%L,1,%C)_%W_$E(%L,%D,999)"
|
|
^%Z("EDEL")="S %N=""EDEL2"" F %IED=%A+1:1 S %E=$E(%L,%IED) Q:%E="" ""!(%E="""")!(%E="","")"
|
|
^%Z("EDEL2")="S %N=""E4"",%E1=$L(%L),%L=$E(%L,1,%A-1)_$E(%L,%IED,999),%E2=$L(%L),%L=%L_$J("""",%E1-%E2) X ^%Z(""EWL"") S %L=$E(%L,1,%E2) X XY"
|
|
^%Z("EDIT")="S %T=%X,%NX=""what"" X ^%Z(""TAG"") Q:%L="""" S %NX=1 W:%X'=%T "" "",%T S %TG=%T,%LO=%L X ^%Z(""EDITLINE"") S %NX=""STORE"""
|
|
^%Z("EDITLINE")="W:XY="""" !,%L,! X $S(XY]"""":^%Z(""EDXY""),1:^%Z(""ED"")) W:XY="""" !,%L"
|
|
^%Z("EDXY")="S %N=""E1"",X=0 X ^%ZOSF(""RM""),^%ZOSF(""EOFF"") F %IED=0:0 X ^%Z(%N) Q:'$D(%N)"
|
|
^%Z("EE")="S %C=%A,%B=$E(%L,%A,999),%Y="""",%D=0,%N=""EEN"""
|
|
^%Z("EE1")="W $C(%X) S DX=DX+1,%D=%D+1,%Y=%Y_$C(%X) X:DX'<%RM ^%Z(""ERE"") X ^%Z(""EWL"") X XY S %N=""EEN"""
|
|
^%Z("EE4")="S:$Y=%EY&(%EX<$X) %EX=$X S %D=%D+1,%Y=%Y_$C(%X),%N=""EEN"" X XY"
|
|
^%Z("EEE")="S %L=$E(%L,1,%A-1)_%Y_$E(%L,%C,999),%N=""E2"",%A=%A+$L(%Y) X ^%Z(""EW2"") I $X>%EX,DY=%EY S %EX=$S(%RM>$X:$X,1:%RM)"
|
|
^%Z("EEN")="X XY R *%X:%9 S %N=$S(%X=127&%D:""EER"",%X=13!(%X=27):""EEE"",$C(%X)?1C:""EEN"",1:""EE1"")"
|
|
^%Z("EER")="S %D=%D-1,%Y=$E(%Y,1,%D),%N=$S(DX:""EER1"",1:""EER2"")"
|
|
^%Z("EER1")="S DX=DX-1,%N=""EEN"" X ^%Z(""EWL"") W "" """
|
|
^%Z("EER2")="S DX=%RM-1,DY=DY-1,%N=""EEN"" X ^%Z(""EWL"") W !,"" "" X XY"
|
|
^%Z("EL")="S %N=""E3"",%A=$S(%A+%RM'>$L(%L):%A+%RM,1:$L(%L)+1),DX=%A-1#%RM,DY=%A\%RM+%SL"
|
|
^%Z("ELONG")="W !,*7,"" Line too long for programming standard ("",$L(%L),"") "",!!! S %N=""E1"""
|
|
^%Z("EOL")="S %N=$S(%A=1:""EXY"",1:""E2""),%A=1"
|
|
^%Z("EP")="S %A=%A+1,DX=DX+1,%N=""E3"""
|
|
^%Z("ER")="S DX=DX#%RM,DY=DY+1 X XY"
|
|
^%Z("ERE")="S DX=0,DY=DY+1 X XY"
|
|
^%Z("ERUB")="S %IED=%A+1,%N=""EDEL2"""
|
|
^%Z("ES")="S %N=""E3"" F %IED=%A:1:$L(%L) S %A=%A+1,DX=DX+1 Q:$E(%L,%A)="" ""!($E(%L,%A)="","")"
|
|
^%Z("EUD")="S %L=%LO,%N=""E1"""
|
|
^%Z("EW1")="S %SX=DX,%SY=DY,DX=0,DY=%SL-1 X XY W ""Length: "",$J($L(%L),3) W:$D(%T) "" Line: "",%T,"" "" S DX=%SX,DY=%SY X XY"
|
|
^%Z("EW2")="S %SX=DX,%SY=DY,DX=8,DY=%SL-1 X XY W $J($L(%L),3) S DX=%SX,DY=%SY X XY"
|
|
^%Z("EWL")="X XY S %EX=%A,%EY=%RM-DX-1+%A,%=DY-%SL+1 F %=%:1:4 W $E(%L,%EX,%EY) S %EX=%EY+1,%EY=%EY+%RM Q:%EX>$L(%L) W:%<4 !"
|
|
^%Z("EXEC")="W ! S %A=%X_"" W *0"" X %A,^%Z(0):'$D(%RM) S %NX=1,%IED=0"
|
|
^%Z("EXIT")="X ^%Z(""LOCKX"") S X=%RM+1 X ^%ZOSF(""RM"") K %,%A,%B,%C,%CTG,%D,%DT,%E,%F,%FI,%GLO,%I,%IED,%J,%K,%L,%LCL,%LO,%LS,%M,%N,%NX,%POP,%R,%RM,%RN,%S,%SL,%ST,%SX,%SY,%T,%W,%X,%XY,%Y,%Z,DX,DY"
|
|
^%Z("EXY")="X ^%Z(""EW2""),^%Z(""ELONG""):$L(%L)>245 S %N=""E1"" Q:$L(%L)>255 X ^%ZOSF(""EON"") S DX=0,DY=%EY,X=%RM+1 X ^%ZOSF(""RM""),XY K %EX,%EY,%E1,%E2,DX,DY,%N Q"
|
|
^%Z("F10")="S %NX=1 X ^%Z(""F11"") I %A>0 X ^%ZOSF(""UCI"") S ^DIC(9.8,%A,23,%C,0)=%DT_""^""_$I_""^""_Y_""^""_$S($D(DUZ)#2:DUZ,1:"""") X ^%Z(""F14"")"
|
|
^%Z("F11")="S %A="""" Q:'$D(^DIC(9.8,0)) L +^DIC(9.8,0) S %A=$O(^DIC(9.8,""B"",%X,0)) X ^%Z(""F12""):%A'>0,^%Z(""F13"") L -^DIC(9.8,0)"
|
|
^%Z("F12")="S %A=$P(^DIC(9.8,0),""^"",3)+1,%C=$P(^(0),""^"",4)+1 X ""F %=0:0 Q:'$D(^DIC(9.8,%A,0)) S %A=%A+1"" S $P(^DIC(9.8,0),""^"",3,4)=%A_""^""_%C,^DIC(9.8,%A,0)=%X_""^R"",^DIC(9.8,""B"",%X,%A)="""""
|
|
^%Z("F13")="S:'$D(^DIC(9.8,%A,23,0)) ^(0)=""^9.823^^"" S %C=1+$P(^DIC(9.8,%A,23,0),""^"",3),$P(^(0),""^"",3,4)=%C_""^""_(1+$P(^(0),""^"",4))"
|
|
^%Z("F14")="S:$D(DUZ)[0 DUZ=0,DUZ=0,DUZ(0)="""" X:'%POP ^%Z(""F15"") S X=""XTVRC1Z"" X ^%ZOSF(""TEST"") D:$T ^XTVRC1Z"
|
|
^%Z("F15")="S DWPK=1,DIC=""^DIC(9.8,""_%A_"",23,""_%C_"",1,"" W !,""Edit comment:"" N %X,%NX,%TG D EN^DIWE W !,""Return"""
|
|
^%Z("F2")="S %=$H>21549+$H-.1,%Y=%\365.25+141,%=%#365.25\1,%D=%+306#(%Y#4=0+365)#153#61#31+1,%M=%-%D\29+1,%DT=%Y_""00""+%M_""00""+%D,%D=%M_""/""_%D_""/""_$E(%Y,2,3)"
|
|
^%Z("F3")="S %A=$P($H,"","",2),%=(%A#3600\60)/100+(%A\3600)/100,%DT=%DT+%,%A=$E(%_""0000"",2,5) S %C=$E(%A,1,2)_"":""_$E(%A,3,4)"
|
|
^%Z("F30")="W *7,"" No name, Can't FILE."" S %NX=1"
|
|
^%Z("FILE")="S %NX=""F30"",%POP=(""Ff""[$E(%X_"" "",3)),%X=$T(+0) W ""ile "",%X I %X]"""" X ^%Z(""F2""),^%Z(""F3"") S %NX=""F10"",%L=$T(+1),$P(%L,"" ;"",3,9)=%D_"" ""_%C ZR +1 ZI %L ZS"
|
|
^%Z("FUNC")="S %A=$E(%X,2),%A=$S(%A?1L:$C($A(%A)-32),1:%A),%NX=$S(%A="""":""EXIT"",%A=""I"":""INSERT"",%A=""C"":""CHANGE"",%A=""S"":""SEARCH"",%A=""R"":""REMOVE"",%A=""F"":""FILE"",%A=""M"":""MV"",%A=""B"":""BREAK"",1:""FUNC2"")"
|
|
^%Z("FUNC2")="S %NX=$S(%A=""J"":""JOIN"",%A=""X"":""MODE"",%A=""T"":""TERM"",%A=""A"":""ACTION"",1:""what"")"
|
|
^%Z("GLO")="S %NX=""what"" W:%X=""^""&$D(%GLO) $E(%GLO,2,99) S:%X=""^""&$D(%GLO) %X=%GLO I (%X?1.2P1.8AN)!(%X?1.2P1.8AN1""("".E1"")""),$D(@%X)#2 S %GLO=%X,%T=%X,%L=@%X X ^%Z(""EDITLINE"") S @%GLO=%L,%NX=1"
|
|
^%Z("GT2")="S %D="""",%E=0 F %I=1:1 S %L=$T(+%I),%E=%E+1 Q:%L="""" S:$P(%L,"" "")]"""" %D=$P($P(%L,"" ""),""(""),%E=0 S %X=$S(%E:%D_""+""_%E,1:%D)"
|
|
^%Z("GT3")="X ^%Z(""GT2"") S %NX=""EDIT"""
|
|
^%Z("GTAG")="W:$D(%TG) %TG,""//"" R %X:%9 X ^%Z(""GT2""):%X=""*"" S %L="""",%T=$S(%X?1.P:"""",%X]"""":%X,$D(%TG):%TG,1:"""") S:%T="""" %NX=1 Q:%T="""" X ^%Z(""TAG"") S:%T]"""" %TG=%T"
|
|
^%Z("IN2")="S %NX=1 R !,""Line: "",%L:%9 Q:%L="""" X ^%Z(""LN1"") S %NX=""IN2"" W:%POP *7,!,?5,""[tag syntax]"" I '%POP ZI %L S %A=$P(%L,"" ""),%B=$S(%A]"""":$P(%A,""(""),1:$P(%TG,""+"")_""+""_($P(%TG,""+"",2)+1)),%TG=%B"
|
|
^%Z("INSERT")="S %NX=1 W ""nsert after: "" X ^%Z(""GTAG"") Q:%L="""" ZR @%T ZI %L S %NX=""IN2"",%TG=%T"
|
|
^%Z("JO2")="W:%X'=%TG "" "",%TG S %NX=1,%X=$L(%LS)+$L(%L)>245 W:%X "" ... too long"" I '%X ZR @%T,@%TG ZI %LS_%L W !,%LS_%L"
|
|
^%Z("JOIN")="S %NX=1 W ""oin line: "" X ^%Z(""GTAG"") Q:%T="""" S %LS=%L,%TG=%T,%T=%D_""+""_(%E+1) X ^%Z(""TAG"") S %NX=$S(%L="""":""what"",1:""JO2"")"
|
|
^%Z("LN1")="S:$P(%L,"" "")[$C(9) %L=$P(%L,$C(9))_"" ""_$P(%L,$C(9),2,99) S %T=$P($P(%L,"" ""),""(""),%POP=$P(%L,"" "",2)']"""" I '%POP,%T'?.N,%T'?1A.7AN,%T'?1""%"".7AN S %POP=1"
|
|
^%Z("LOCAL")="S %NX=""what"" S:%X'=""*"" %LCL=$E(%X,2,99) Q:'$D(%LCL) Q:'$D(@%LCL)#2 S %T=""*""_%LCL,%L=@%LCL X ^%Z(""EDITLINE"") S @%LCL=%L,%NX=1"
|
|
^%Z("LOCK")="S %NX=1,%RN=$T(+0) Q:'$L(%RN) L +@%RN:1 E S %NX=""EXIT"" W !,""This routine is being edited by another user."""
|
|
^%Z("LOCKX")="I %RN]"""" L -@%RN"
|
|
^%Z("MODE")="W "" mode change"" S:XY]"""" %XY=XY S %NX=1,XY=$S(XY]"""":"""",1:$S($D(%XY):%XY,1:"""")) W !,$S(XY="""":""replace-with"",1:""line editor""),!"
|
|
^%Z("MV")="W ""ove lines"" K %ST,%EN S %NX=1 X ^%Z(""MV1"") Q:'($D(%ST)&$D(%EN)) ZR @(%ST_"":""_%EN) X ^%Z(""MV102"") W !,$T(@%D+%E),!,$T(@%D+%E+1)"
|
|
^%Z("MV1")="S %POP=0 W !,""Begin: "" X ^%Z(""GTAG"") Q:%T="""" K ^TMP(""%Z"",$J) S %ST=%T X ^%Z(""MV2"")"
|
|
^%Z("MV100")="S %L="""" W !,""Insert after: "" X ^%Z(""GTAG"") Q:%T="""" S %TG=%T X ^%Z(""MV101""),^%Z(""MV99"")"
|
|
^%Z("MV101")="I $D(^TMP(""%Z"",$J,1)) S %A=^(1) ZR @%T ZI %L F %J=1:1 Q:'$D(^TMP(""%Z"",$J,%J)) S %A=^(%J) ZI %A"
|
|
^%Z("MV102")="X ^%Z(""MV100"") I $D(%L) W !,""The lines removed have NOT been inserted back into the routine"",!,""use the .Action menu to Restore lines."""
|
|
^%Z("MV2")="W "" End:"" X ^%Z(""GTAG"") Q:%T="""" S %X=%T X ^%Z($S(%X=""*"":""MV3"",1:""MV20"")),^%Z(""MV99"")"
|
|
^%Z("MV20")="S %T=%X X ^%Z(""TAG"") Q:%L="""" S %EN=%T X ^%Z(""MV21"")"
|
|
^%Z("MV21")="S %J=1,%B=$P(%ST,""+"",1),%I=+$P(%ST,""+"",2) F %I=%I:1 S %T=$S(%I:%B_""+""_%I,1:%B),@(""%L=$T(""_%T_"")"") X ^%Z(""MV22"") S:$P(%L,"" "",1)]"""" %B=$P($P(%L,"" ""),""(""),%I=0,%T=%B Q:%T=%EN"
|
|
^%Z("MV22")="S ^TMP(""%Z"",$J,%J)=%L,%J=%J+1"
|
|
^%Z("MV3")="S %J=1,%B=$P(%ST,""+"",1),%I=+$P(%ST,""+"",2) F %I=%I:1 S %T=%B_""+""_%I,@(""%L=$T(""_%T_"")"") Q:%L="""" S %EN=%T,^TMP(""%Z"",$J,%J)=%L,%J=%J+1"
|
|
^%Z("MV99")="K %A,%B,%I,%J,%T,%L,%X"
|
|
^%Z("R10")="S %NX=1 ZR +%A:+%I W "" ...deleted lines"",!"
|
|
^%Z("R5")="S %NX=1 W "" [no change]"",!"
|
|
^%Z("REMOVE")="W ""emove lines: "" X ^%Z(""SELECT"") S %NX=""what"" Q:%POP R !,""OK to remove lines? "",%R:%9 S %NX=$S(%R?1""Y"".E:""R10"",%R?1""y"".E:""R10"",1:""R5"")"
|
|
^%Z("S55")="S %NX=1,%T=$S(%C:%B_""+""_%C,1:%B) F %A=%A:1:%I S %L=$T(+%A) S:$P(%L,"" "")]"""" %T=$P($P(%L,"" ""),""(""),%C=0,%B=$P(%T,""("") W:%L[%R !,%T,?6,"" "",$P(%L,"" "",2,999),! S %C=%C+1,%T=%B_""+""_%C"
|
|
^%Z("SEARCH")="S %NX=1 R ""earch for: "",%R:%9 Q:%R="""" X ^%Z(""SELALL"") S %NX=$S(%POP:""what"",1:""S55"")"
|
|
^%Z("SEL3")="F %I=1:1 S %L=$T(+%I) Q:%L="""" I $P($P(%L,"" ""),""("")=%D,%D]"""" S %I=%I+%E Q"
|
|
^%Z("SELALL")="S %POP=1 R "" from line: BEG=> "",%T:%9 S:%T="""" %T=""+1"" X ^%Z(""TAG"") Q:%L="""" S %B=%D,%C=%E X ^%Z(""SEL3"") S %A=%I R "" to line: END=> "",%T:%9 S (%D,%E)="""" X ^%Z(""TAG""):%T]"""" S %POP=%L=""""&(%T]"""") Q:%POP X ^%Z(""SEL3"") S %POP=%A>%I"
|
|
^%Z("SELECT")="S %POP=1 W "" from line: "" X ^%Z(""GTAG"") Q:%L="""" S %ST=%T,%B=%D,%C=%E X ^%Z(""SEL3"") S %A=%I W "" to line: "" X ^%Z(""GTAG"") Q:%L="""" X ^%Z(""SEL3"") S %POP=%A>%I"
|
|
^%Z("STORE")="ZR @%TG ZI:%L]"""" %L S %A=$P($P(%L,"" ""),""(""),%NX=1 S:%A]"""" %TG=%A"
|
|
^%Z("TAG")="S:%T?1""""""""""+"".N %T=$E(%T,3,9) S %L="""",%D=$P(%T,""+"",1),%E=$P(%T,""+"",2) Q:%D'?1.8AN&(%D'?1""%"".AN)&(%D]"""")!(%E'?.N) S:%D="""" %D=$P($P($T(+1),"" ""),""(""),%E=%E-1 X ^(""TAG2"")"
|
|
^%Z("TAG2")="S %T=%D,%I=%E,%E=-1 F %I=0:1:%I S %E=%E+1,%T=$S(%E>0:%D_""+""_%E,1:%D),@(""%L=$T(""_%T_"")"") I $P(%L,"" "",1)]"""" S %D=$P($P(%L,"" ""),""(""),%E=0,%T=%D"
|
|
^%Z("TERM")="S %NX=1 X ^%Z(""TERM1""),^%Z(""TERM2""),^%Z(""TERM3"")"
|
|
^%Z("TERM1")="S %S=$O(^%ZIS(2,""B"",""C-VT100"",0)),%S=$G(^VA(200,+$G(DUZ),1.2),%S) I %S'>0 W !,""Terminal Type not found."""
|
|
^%Z("TERM2")="W !,""TERMINAL TYPE: "",$S(%S'>0:"""",$D(^%ZIS(2,%S,0)):$P(^(0),""^"",1)_""//"",1:"""") R %X:999 Q:%X="""" S %S=$S($D(^%ZIS(2,""B"",%X)):$O(^(%X,0)),1:0)"
|
|
^%Z("TERM3")="Q:%S<1 S %ST=$P(^%ZIS(2,%S,0),""^"",1),%=^(1),%RM=%-1,%SL=$P(%,""^"",3)-4,XY=$P(%,""^"",5),DX=0,DY=%SL,X=%RM+1 X ^%ZOSF(""RM"") X XY W !!!"
|
|
^%Z("VR")="7.3"
|
|
^%Z("what")="W "" what?"" S %NX=1"
|
|
^%Z("what2")="W "" ??? Just the first letter please. "" S %NX=""ACTION"""
|