Changeset 636 for FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED
- Timestamp:
- Dec 4, 2009, 8:26:01 PM (15 years ago)
- Location:
- FOIAVistA/tag/r
- Files:
-
- 72 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XGKB.m
r628 r636 1 XGKB ;SFISC/VYD - Read with Escape Processing ; 10/23/20062 ;;8.0;KERNEL;**34,244 ,365**;Jul 10, 1995;Build51 XGKB ;SFISC/VYD - Read with Escape Processing ;07/10/2002 10:58 2 ;;8.0;KERNEL;**34,244**;Jul 10, 1995 3 3 ;;Special thanks to MELDRUM.KEVIN@ISC-SLC.VA.GOV 4 4 ; … … 8 8 I %OS["MSM" U $I:(0::::64) D:'$D(^XUTL("XGKB")) MSM^XGKB1 9 9 I %OS["DTM" U $I:(VT=1:ESCAPE=1) D:'$D(^XUTL("XGKB")) DTM^XGKB1 10 I %OS["OpenM" U $I:(:"CT") D:'$D(^XUTL("XGKB")) DTM^XGKB1 S:$G(XGTRM)="*" XGTRM=""10 I %OS["OpenM" U $I:(:"CT") D:'$D(^XUTL("XGKB")) DTM^XGKB1 11 11 I %OS["GT.M" U $I:(ESCAPE) D:'$D(^XUTL("XGKB")) GTM^XGKB1 12 12 I $G(XGTRM)="*" X ^%ZOSF("TRMON") I 1 ;turn all on -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XPDDP.m
r628 r636 1 XPDDP ;SFISC/RSD - Display a package ;03/18/2008 2 ;;8.0;KERNEL;**21,28,44,68,100,108,229,304,346,463,488**;Jul 10, 1995;Build 6 3 ; Per VHA Directive 2004-038, this routine should not be modified. 4 ; Options: XPD PRINT BUILD calls EN1 5 ; XPD PRINT INSTALL calls EN2 6 EN1 ; Print from Build file 7 N DIC,D0,XPD,XPDT,XPDST,Y 1 XPDDP ;SFISC/RSD - Display a package ;6/21/07 09:44 2 ;;8.0;KERNEL;**21,28,44,68,100,108,229,304,346,463**;Jul 10, 1995;Build 4 3 EN1 ;print from Build file 4 N DIC,D0,XPD,XPDT,XPDST,Y,Z 8 5 S XPDST=$$LOOK^XPDB1 Q:XPDST<0 9 S XPD("XPDT(")="" 10 D EN^XUTMDEVQ( "LST1^XPDDP","Build File Print",.XPD)6 S XPD("XPDT(")="",Y="LST1^XPDDP",Z="Build File Print" 7 D EN^XUTMDEVQ(Y,Z,.XPD) 11 8 Q 12 EN2 ; Print from Distribution9 EN2 ;print from Distribution 13 10 N D0,DIC,POP,XPD,XPDA,XPDNM,XPDT,XPDST,Y,Z,%ZIS 14 11 S XPDST=$$LOOK^XPDI1("I $D(^XTMP(""XPDI"",Y))",1) 15 S D0=$O(^XTMP("XPDI",XPDST,"BLD",0)) Q:'D016 S XPD("XPDT(")=""17 D EN^XUTMDEVQ( "LST2^XPDDP","Transport Global Print",.XPD)12 S XPD("XPDT(")="",Y="LST2^XPDDP",Z="Transport Global Print",D0=$O(^XTMP("XPDI",XPDST,"BLD",0)) 13 Q:'D0 14 D EN^XUTMDEVQ(Y,Z,.XPD) 18 15 Q 19 LST1 ; Print from Build file 20 K DIRUT N XPDIT,XPDCNT S (XPDIT,XPDCNT)=0 21 F S XPDIT=$O(XPDT(XPDIT)) Q:$D(DIRUT)!(XPDIT'>0) D Q:$D(DIRUT) 22 . I XPDCNT Q:'$$CONT 23 . S XPDCNT=XPDCNT+1 16 ; 17 LST1 ; 18 K DIRUT N XPDIT S XPDIT=0 19 F S XPDIT=$O(XPDT(XPDIT)) Q:$D(DIRUT)!(XPDIT'>0) D 24 20 . S D0=+XPDT(XPDIT) D PNT("XPD(9.6,D0)") 25 D WAIT26 21 Q 27 LST2 ; Print from XPDT array 28 K DIRUT N XPDIT,XPDCNT S (XPDIT,XPDCNT)=0 29 F S XPDIT=$O(XPDT(XPDIT)) Q:$D(DIRUT)!(XPDIT'>0) D Q:$D(DIRUT) 30 . I XPDCNT Q:'$$CONT 31 . S XPDCNT=XPDCNT+1 22 ; 23 LST2 ;Print from XPDT array 24 K DIRUT N XPDIT S XPDIT=0 25 F S XPDIT=$O(XPDT(XPDIT)) Q:$D(DIRUT)!(XPDIT'>0) D 32 26 . S XPDA=+XPDT(XPDIT),D0=$O(^XTMP("XPDI",XPDA,"BLD",0)) D PNT("XTMP(""XPDI"",XPDA,""BLD"",D0)") 33 D WAIT34 27 Q 35 WAIT ; Pause on last page or not? It depends on whether there's enough room 36 ; left on the page to display the KIDS menu. 37 Q:$E($G(IOST),1,2)'="C-" 38 Q:$D(DIRUT) 39 ; DUZ("AUTO")=1 means show menu option choices 40 I IOSL-$Y<$S($G(DUZ("AUTO")):14,1:3) D WAIT^XMXUTIL 41 Q 42 PNT(XPDGR) ; Print a package, XPDGR=global root 43 ;XPDFL=0 - Build - ^XPD(9.7 global root 44 ; 1 - Install - ^XTMP global root 45 ; 2 - Packman - ^TMP($J, global root 46 N I,J,K,X,XPD,XPDDT,XPDI,XPD0,XPDFL,XPDPG,XPDUL,XPDTYPE,XPDTRACK,XPDTXT 28 ; 29 PNT(XPDGR) ;print a package, XPDGR=global root 30 ;XPDFL=0 - Build - ^XPD(9.7 global root, 1 - Install - ^XTMP global root 31 ;2 - Packman ^TMP($J, global root 32 N I,J,K,X,XPD,XPDDT,XPDI,XPD0,XPDFL,XPDPG,XPDUL,XPDTYPE,XPDTRACK,XPDTXT,XPDOUT 47 33 Q:$G(XPDGR)="" S XPDGR="^"_XPDGR 48 34 Q:'$D(@XPDGR@(0)) 49 D ID ; Package Identification 50 D DESCR Q:$D(DIRUT) ; Description 51 I XPDTYPE=1 D MULT Q ; Multi-Package 52 D PREPOST Q:$D(DIRUT) ; Environment check & Pre/Post Routines 53 I XPDTYPE=2 D GLOBAL Q ; Global Package 54 D FILES Q:$D(DIRUT) ; Files/DDs 55 D COMP Q:$D(DIRUT) ; Build Components 56 Q:XPDFL=2 ; Packman message, called from XMP2 - Summarize 57 D QUESTS Q:$D(DIRUT) ; Install Questions 58 D ALFABETA Q:$D(DIRUT) ; Alpha/Beta Testing 59 D NAMESP Q:$D(DIRUT) ; Include/Exclude Namespaces 60 D REQDBLD Q:$D(DIRUT) ; Required Builds 35 S XPD0=^(0),XPDPG=1,XPDFL=$S($E(XPDGR,1,5)="^TMP(":2,1:$E(XPDGR,1,5)="^XTMP"),$P(XPDUL,"-",IOM)="",XPDDT=$$HTE^XLFDT($H,"1PM"),XPDTYPE=+$P(XPD0,U,3),XPDTRACK=$P(XPD0,U,5) 36 W:$E(IOST,1,2)="C-" @IOF D HDR W XPDUL,! 37 W "TYPE: ",$$EXTERNAL^DILFD(9.6,2,"",XPDTYPE) 38 W !,"TRACK NATIONALLY: ",$$EXTERNAL^DILFD(9.6,5,"",XPDTRACK) 39 W !,"NATIONAL PACKAGE: ",$P($G(^DIC(9.4,+$P(XPD0,U,2),0),$P(XPD0,U,2)),U) 40 W !,"ALPHA/BETA TESTING: ",$S($P($G(@XPDGR@("ABPKG")),U)="y":"YES",1:"NO") ; new line added. 41 W !,"DESCRIPTION:" 42 S (XPDI,XPDOUT)=0 43 F S XPDI=$O(@XPDGR@(1,XPDI)) Q:'XPDI S XPDTXT=$G(^(XPDI,0)) D Q:XPDOUT 44 . I $L(XPDTXT)'<IOM,$E(XPDTXT,$L(XPDTXT))=" " F S XPDTXT=$E(XPDTXT,1,$L(XPDTXT)-1) Q:$E(XPDTXT,$L(XPDTXT))'=" " 45 . F D Q:$L(XPDTXT)<IOM!XPDOUT!(IOM<2) S XPDTXT=$E(XPDTXT,IOM,999) 46 . . W $S(IOM>1:$E(XPDTXT,1,IOM-1),1:XPDTXT),! 47 . . S XPDOUT=$$CHK(2) 48 Q:$D(DIRUT) G:XPDTYPE=1 MULT 49 W !,"ENVIRONMENT CHECK : ",$G(@XPDGR@("PRE")) 50 W ?47,"DELETE ENV ROUTINE: ",$S($P($G(@XPDGR@("INID")),U)="y":"Yes",1:"No") 51 W ! 52 I 'XPDTYPE D 53 . W " PRE-INIT ROUTINE : ",$G(@XPDGR@("INI")) 54 . W ?42,"DELETE PRE-INIT ROUTINE: ",$S($P($G(@XPDGR@("INID")),U,3)="y":"Yes",1:"No") 55 . W ! 56 Q:$$CHK(4) W "POST-INIT ROUTINE : ",$G(@XPDGR@("INIT")) 57 W ?41,"DELETE POST-INIT ROUTINE: ",$S($P($G(@XPDGR@("INID")),U,2)="y":"Yes",1:"No") 58 W ! 59 W:'XPDTYPE "PRE-TRANSPORT RTN : ",$G(@XPDGR@("PRET")),! 60 G:XPDTYPE=2 GLOBAL 61 I '$O(@XPDGR@(4,0)) Q:$$CHK(4) G COMP 62 S I=$$CHK(10,1) Q:I I '$P(I,"^",2) W !! D HDR1 W XPDUL,! 63 PNT2 S XPDI=0 F S XPDI=$O(@XPDGR@(4,XPDI)) Q:'XPDI S XPD=$G(^(XPDI,222)) Q:$$CHK(4,1) D 64 .;file number, file name, partial DD 65 .W !,XPDI,?12,$S('XPDFL:$P($G(^DIC(XPDI,0),"**unknown**"),U),1:$G(^XTMP("XPDI",XPDA,"FIA",XPDI))) 66 .W ?41,$$EXTERNAL^DILFD(9.64,222.1,"",$P(XPD,U)),?47,$$EXTERNAL^DILFD(9.64,222.2,"",$P(XPD,U,2)),?53,$$EXTERNAL^DILFD(9.64,222.7,"",$P(XPD,U,7)) 67 .W ?60,$E($$EXTERNAL^DILFD(9.64,222.8,"",$P(XPD,U,8)),1,4),?67,$$EXTERNAL^DILFD(9.64,222.5,"",$P(XPD,U,5)),?73,$$EXTERNAL^DILFD(9.64,222.9,"",$P(XPD,U,9)),! 68 .;print partial DD information 69 .I $P(XPD,U,3)="p" S J=0 D 70 ..W "Partial DD:" 71 ..F S J=$O(@XPDGR@(4,"APDD",XPDI,J)) Q:'J W ?12,"subDD: ",J D Q:$$CHK(4,1) 72 ...I '$O(@XPDGR@(4,"APDD",XPDI,J,0)) W ! Q 73 ...S I=0 F S I=$O(@XPDGR@(4,"APDD",XPDI,J,I)) Q:'I W ?30,"fld: ",I,! 74 .I $D(@XPDGR@(4,XPDI,223)) W ?2,"DD SCREEN : ",^(223),! 75 .I $D(@XPDGR@(4,XPDI,224)) W ?2,"DATA SCREEN: ",^(224),! 76 COMP Q:$D(DIRUT) W ! Q:$$CHK(3) S I=0,XPD=$P(^DD(9.68,.03,0),U,3) 77 ;print build components 78 F S I=$O(@XPDGR@("KRN",I)),K=0,J="" Q:$D(DIRUT)!'I F S J=$O(@XPDGR@("KRN",I,"NM","B",J)) Q:J="" S X=$O(^(J,0)) Q:$$CHK(4) D:X 79 .S X=$G(@XPDGR@("KRN",I,"NM",X,0)) Q:X="" 80 .;K is flag to write type of component 81 .I 'K W !,$S($D(^DIC(I,0)):$P(^(0),U),XPDFL:$G(^XTMP("XPDI",XPDA,"FIA",I),"UNKNOWN"),1:"UNKNOWN")_":",! S K=1 82 .;write the entry name and write the action 83 .W ?3,$P(X,U),?50,$P($P(XPD,";",$P(X,U,3)+1),":",2),! 84 Q:XPDFL=2 85 ;XPDFL=2 this is a Packman message, called from XMP2 - Summarize 86 ;XPDFL=1 this is a Install, the call backs are already Build Components 87 Q:$D(DIRUT) Q:$$CHK(3) 88 I $O(@XPDGR@("QUES",0))!($D(@XPDGR@("QDEF"))#2) W !,"INSTALL QUESTIONS: " S I=0 D 89 .F S I=$O(@XPDGR@("QUES",I)) Q:'I S X=$P(^(I,0),U),J=$G(^(1)),K=$G(^("A")) Q:$$CHK(5) D 90 ..W !?5,"SUBSCRIPT: ",X,!,"DIR(0)=",J W:K]"" !,"DIR(""A"")=",K,! 91 ..F J=1:1 Q:'$D(@XPDGR@("QUES",I,"A1",J,0)) W "DIR(""A"",",J,")=",^(0),! 92 ..I $G(@XPDGR@("QUES",I,"B"))]"" W "DIR(""B"")=",^("B"),! 93 ..I $G(@XPDGR@("QUES",I,"Q"))]"" W "DIR(""?"")=",^("Q"),! 94 ..F J=1:1 Q:'$D(@XPDGR@("QUES",I,"Q1",J,0)) W "DIR(""?"",",J,")=",^(0),! 95 ..I $G(@XPDGR@("QUES",I,"QQ"))]"" W "DIR(""??"")=",^("QQ"),! 96 ..I $G(@XPDGR@("QUES",I,"M"))]"" W "M CODE: ",^("M"),! 97 . Q:$D(DIRUT) Q:$$CHK(3) 98 . ;Show new Defaults for KIDS questions. p463 99 . I $D(@XPDGR@("QDEF"))#2 S X=$G(@XPDGR@("QDEF")) D 100 . . W:$X>1 ! 101 . . I $L($P(X,U,9)) W " Default Rebuild Menu Trees Upon Completion of Install: ",$P(X,U,9),! 102 . . I $L($P(X,U,5)) W " Default INHIBIT LOGONs during the install: ",$P(X,U,5),! 103 . . I $L($P(X,U,11)) W " Default DISABLE Scheduled Options, Menu Options, and Protocols: ",$P(X,U,11) 104 . . Q 105 . Q 106 Q:$D(DIRUT) Q:$$CHK(3) 107 I $L($G(@XPDGR@("ABPKG"))) S XPD=^("ABPKG") D:$P(XPD,U)="y" 108 .W !,"ALPHA/BETA TESTING:",$$EXTERNAL^DILFD(9.6,20,"",$P(XPD,U)),?40,"INSTALLATION MESSAGE: ",$$EXTERNAL^DILFD(9.6,21,"",$P(XPD,U,2)) 109 .W !,"ADDRESS: ",$P(XPD,U,3),!!,"INCLUDE NAMESPACE",?30,"EXCLUDE NAMESPACE" S I=0 110 .F S I=$O(@XPDGR@("ABNS",I)),J=0 Q:'I W !?5,^(I,0) F S J=$O(@XPDGR@("ABNS",I,1,J)) Q:'J W ?35,^(J,0),! Q:$$CHK(3) 111 REQB Q:$D(DIRUT) Q:$$CHK(4) 112 I $O(@XPDGR@("REQB",0)) W !,"REQUIRED BUILDS:",?50,"ACTION:" D 113 .S XPDI=0 F S XPDI=$O(@XPDGR@("REQB",XPDI)) Q:'XPDI S XPD=$G(^(XPDI,0)) Q:$$CHK(4,1) D 114 ..W !?3,$P(XPD,U),?50,$$EXTERNAL^DILFD(9.611,1,"",$P(XPD,U,2)) 61 115 Q 62 ID ; Identify the package 63 S XPD0=^(0),XPDPG=1,XPDFL=$S($E(XPDGR,1,5)="^TMP(":2,1:$E(XPDGR,1,5)="^XTMP"),$P(XPDUL,"-",IOM)="",XPDDT=$$HTE^XLFDT($H,"1PM"),XPDTYPE=+$P(XPD0,U,3),XPDTRACK=$P(XPD0,U,5) 64 W:$E(IOST,1,2)="C-" @IOF D HDR W !,XPDUL 65 W !,"TYPE: ",$$EXTERNAL^DILFD(9.6,2,"",XPDTYPE) 66 W ?51,"TRACK NATIONALLY: ",$$EXTERNAL^DILFD(9.6,5,"",XPDTRACK) 67 W !,"NATIONAL PACKAGE: ",$P($G(^DIC(9.4,+$P(XPD0,U,2),0),$P(XPD0,U,2)),U) 68 W ?49,"ALPHA/BETA TESTING: ",$S($P($G(@XPDGR@("ABPKG")),U)="y":"YES",1:"NO") 69 Q 70 DESCR ; Show patch description 71 W !!,"DESCRIPTION:" 72 S XPDI=0 73 F S XPDI=$O(@XPDGR@(1,XPDI)) Q:'XPDI S XPDTXT=$G(^(XPDI,0)) D Q:$D(DIRUT) 74 . I $L(XPDTXT)'<IOM,$E(XPDTXT,$L(XPDTXT))=" " F S XPDTXT=$E(XPDTXT,1,$L(XPDTXT)-1) Q:$E(XPDTXT,$L(XPDTXT))'=" " 75 . F D Q:$L(XPDTXT)<IOM!$D(DIRUT)!(IOM<2) S XPDTXT=$E(XPDTXT,IOM,999) 76 . . Q:$$CHK(2) 77 . . W !,$S(IOM>1:$E(XPDTXT,1,IOM-1),1:XPDTXT) 78 Q 79 PREPOST ; Environment check and pre/post routines 80 Q:$$CHK(3) 81 W !!,"ENVIRONMENT CHECK: ",$G(@XPDGR@("PRE")) 82 W ?49,"DELETE ENV ROUTINE: " I $G(@XPDGR@("PRE"))]"" W $S($P($G(@XPDGR@("INID")),U)="y":"Yes",1:"No") 83 I 'XPDTYPE D Q:$D(DIRUT) 84 . Q:$$CHK(2) 85 . W !," PRE-INIT ROUTINE: ",$G(@XPDGR@("INI")) 86 . W ?44,"DELETE PRE-INIT ROUTINE: " I $G(@XPDGR@("INI"))]"" W $S($P($G(@XPDGR@("INID")),U,3)="y":"Yes",1:"No") 87 Q:$$CHK(2) 88 W !,"POST-INIT ROUTINE: ",$G(@XPDGR@("INIT")) 89 W ?43,"DELETE POST-INIT ROUTINE: " I $G(@XPDGR@("INIT"))]"" W $S($P($G(@XPDGR@("INID")),U,2)="y":"Yes",1:"No") 90 I 'XPDTYPE Q:$$CHK(2) W !,"PRE-TRANSPORT RTN: ",$G(@XPDGR@("PRET")) 91 Q 92 FILES ; Show files/DDs 93 Q:'$O(@XPDGR@(4,0)) ; Quit if no files 94 S I=$$CHK(8,1) Q:I I '$P(I,"^",2) D HDR1 W !,XPDUL 95 S XPDI=0 96 F S XPDI=$O(@XPDGR@(4,XPDI)) Q:'XPDI S XPD=$G(^(XPDI,222)) Q:$$CHK(3,1) D 97 . ;file number, file name, partial DD 98 . W !!,XPDI,?12,$S('XPDFL:$P($G(^DIC(XPDI,0),"**unknown**"),U),1:$G(^XTMP("XPDI",XPDA,"FIA",XPDI))) 99 . ; update DD, send security code, data comes with file 100 . W ?43,$$EXTERNAL^DILFD(9.64,222.1,"",$P(XPD,U)),?49,$$EXTERNAL^DILFD(9.64,222.2,"",$P(XPD,U,2)),?55,$$EXTERNAL^DILFD(9.64,222.7,"",$P(XPD,U,7)) 101 . ; override site data, resolve pointers, user override 102 . W ?63,$E($$EXTERNAL^DILFD(9.64,222.8,"",$P(XPD,U,8)),1,4),?69,$$EXTERNAL^DILFD(9.64,222.5,"",$P(XPD,U,5)),?75,$$EXTERNAL^DILFD(9.64,222.9,"",$P(XPD,U,9)) 103 . I $P(XPD,U,3)="p" D Q:$D(DIRUT) 104 . . ; Print partial DD information 105 . . N XPDSUB,XPDFLD 106 . . Q:$$CHK(2,1) 107 . . W !,"Partial DD:" 108 . . S (J,XPDSUB)=0 109 . . F S J=$O(@XPDGR@(4,"APDD",XPDI,J)) Q:'J D Q:$D(DIRUT) 110 . . . I XPDSUB Q:$$CHK(2,1) W ! 111 . . . W ?12,"subDD: ",J 112 . . . S XPDSUB=1,(I,XPDFLD)=0 113 . . . F S I=$O(@XPDGR@(4,"APDD",XPDI,J,I)) Q:'I D Q:$D(DIRUT) 114 . . . . I XPDFLD Q:$$CHK(2,1) W ! 115 . . . . W ?30,"fld: ",I S XPDFLD=1 116 . I " "'[$G(@XPDGR@(4,XPDI,223)) Q:$$CHK(2,1) W !,?2,"DD SCREEN : ",^(223) 117 . I " "'[$G(@XPDGR@(4,XPDI,224)) Q:$$CHK(2,1) W !,?2,"DATA SCREEN: ",^(224) 118 Q 119 COMP ; Print Build components 120 S I=0,XPD=$P(^DD(9.68,.03,0),U,3) 121 F S I=$O(@XPDGR@("KRN",I)) Q:'I D Q:$D(DIRUT) 122 . Q:'$D(@XPDGR@("KRN",I,"NM","B")) 123 . Q:$$CHK(4) 124 . W !!,$S($D(^DIC(I,0)):$P(^(0),U),XPDFL:$G(^XTMP("XPDI",XPDA,"FIA",I),"UNKNOWN"),1:"UNKNOWN")_":",?47,"ACTION:" 125 . S J="" 126 . F S J=$O(@XPDGR@("KRN",I,"NM","B",J)) Q:J="" S X=$O(^(J,0)) D Q:$D(DIRUT) 127 . . Q:'X 128 . . S X=$G(@XPDGR@("KRN",I,"NM",X,0)) Q:X="" 129 . . Q:$$CHK(2) 130 . . ;write the entry name and write the action 131 . . W !,?3,$P(X,U),?50,$P($P(XPD,";",$P(X,U,3)+1),":",2) 132 Q 133 QUESTS ; Show Install Questions 134 I '$O(@XPDGR@("QUES",0)),'($D(@XPDGR@("QDEF"))#2) Q 135 Q:$$CHK(6) 136 W !!,"INSTALL QUESTIONS: " 137 S I=0 138 F S I=$O(@XPDGR@("QUES",I)) Q:'I S X=$P(^(I,0),U),J=$G(^(1)),K=$G(^("A")) D Q:$D(DIRUT) 139 . Q:$$CHK(4) 140 . W !!?5,"SUBSCRIPT: ",X 141 . W !,"DIR(0)=",J 142 . S J=0 143 . F S J=$O(@XPDGR@("QUES",I,"A1",J)) Q:'J Q:$$CHK(2) W !,"DIR(""A"",",J,")=",^(J,0) 144 . I K]"" Q:$$CHK(2) W !,"DIR(""A"")=",K 145 . I $G(@XPDGR@("QUES",I,"B"))]"" Q:$$CHK(2) W !,"DIR(""B"")=",^("B") 146 . S J=0 147 . F S J=$O(@XPDGR@("QUES",I,"Q1",J)) Q:'J Q:$$CHK(2) W !,"DIR(""?"",",J,")=",^(J,0) 148 . I $G(@XPDGR@("QUES",I,"Q"))]"" Q:$$CHK(2) W !,"DIR(""?"")=",^("Q") 149 . I $G(@XPDGR@("QUES",I,"QQ"))]"" Q:$$CHK(2) W !,"DIR(""??"")=",^("QQ") 150 . I $G(@XPDGR@("QUES",I,"M"))]"" Q:$$CHK(2) W !,"M CODE: ",^("M") 151 Q:$D(DIRUT) 152 ;Show new Defaults for KIDS questions. p463 153 S X=$G(@XPDGR@("QDEF")) Q:X="" 154 I '$L($P(X,U,9)),'$L($P(X,U,5)),'$L($P(X,U,11)) Q 155 Q:$$CHK(3) W ! 156 I $L($P(X,U,9)) Q:$$CHK(2) W !," Default Rebuild Menu Trees Upon Completion of Install: ",$P(X,U,9) 157 I $L($P(X,U,5)) Q:$$CHK(2) W !," Default INHIBIT LOGONs during the install: ",$P(X,U,5) 158 I $L($P(X,U,11)) Q:$$CHK(2) W !," Default DISABLE Scheduled Options, Menu Options, and Protocols: ",$P(X,U,11) 159 Q 160 ALFABETA ; Alpha/Beta Testing 161 S XPD=$G(@XPDGR@("ABPKG")) Q:XPD="" 162 Q:$P(XPD,U)'="y" 163 Q:$$CHK(4) 164 W !!,"ALPHA/BETA TESTING: ",$$EXTERNAL^DILFD(9.6,20,"",$P(XPD,U)),?47,"INSTALLATION MESSAGE: ",$$EXTERNAL^DILFD(9.6,21,"",$P(XPD,U,2)) 165 W !,"ADDRESS: ",$P(XPD,U,3) 166 Q 167 NAMESP ; Namespaces 168 Q:'$O(@XPDGR@("ABNS",0)) 169 Q:$$CHK(4) 170 W !!,"INCLUDE NAMESPACE:",?47,"EXCLUDE NAMESPACE:" 171 S I=0 172 F S I=$O(@XPDGR@("ABNS",I)) Q:'I Q:$$CHK(2) W !?3,^(I,0) D Q:$D(DIRUT) 173 . N XPDNMSP,XPDLF 174 . S (J,XPDLF)=0 175 . F S J=$O(@XPDGR@("ABNS",I,1,J)) Q:'J S XPDNMSP=^(J,0) D Q:$D(DIRUT) 176 . . I XPDLF Q:$$CHK(2) W ! 177 . . W ?50,XPDNMSP 178 . . S XPDLF=1 179 Q 180 REQDBLD ; Required Builds 181 Q:'$O(@XPDGR@("REQB",0)) 182 Q:$$CHK(4) 183 W !!,"REQUIRED BUILDS:",?47,"ACTION:" 184 S XPDI=0 185 F S XPDI=$O(@XPDGR@("REQB",XPDI)) Q:'XPDI S XPD=$G(^(XPDI,0)) Q:$$CHK(2) D 186 . W !?3,$P(XPD,U),?50,$$EXTERNAL^DILFD(9.611,1,"",$P(XPD,U,2)) 187 Q 188 GLOBAL ; Global Package 189 Q:$$CHK(4) 190 W !!,"GLOBAL:",?47,"KILL GLOBAL BEFORE INSTALL:" 191 S XPDI=0 192 F S XPDI=$O(@XPDGR@("GLO",XPDI)) Q:'XPDI S XPD=$G(^(XPDI,0)) Q:$$CHK(2) D 193 . W !?3,$P(XPD,U),?50,$$EXTERNAL^DILFD(9.65,1,"",$P(XPD,U,2)) 194 Q 195 MULT ; Multi-Package 196 Q:$$CHK(4) 197 W !!,"SEQUENCE OF BUILDS:" 198 S XPDI=0 199 F S XPDI=$O(@XPDGR@(10,XPDI)) Q:'XPDI S XPD=$G(^(XPDI,0)) Q:$$CHK(2) D 200 . W !?2,XPDI,?8,$E($P(XPD,U),1,44),?54,$S($P(XPD,U,2)=1:"",1:"Not ")_"Required to Continue" 201 Q 116 GLOBAL ;globals listing 117 S I=$$CHK(8,1) Q:I I '$P(I,"^",2) W !!,"GLOBAL:",?20,"KILL GLOBAL BEFORE INSTALL:" 118 S XPDI=0 F S XPDI=$O(@XPDGR@("GLO",XPDI)) Q:'XPDI S XPD=$G(^(XPDI,0)) Q:$$CHK(4,1) D 119 .W !?3,$P(XPD,U),?33,$$EXTERNAL^DILFD(9.65,1,"",$P(XPD,U,2)) 120 W ! Q 121 ; 122 MULT ;multiple-package 123 S I=$$CHK(10,1) Q:I I '$P(I,"^",2) W !,"SEQUENCE OF BUILDS:" 124 S XPDI=0 F S XPDI=$O(@XPDGR@(10,XPDI)) Q:'XPDI S XPD=$G(^(XPDI,0)) Q:$$CHK(4,1) D 125 .W !?2,XPDI,?8,$E($P(XPD,U),1,44),?54,$S($P(XPD,U,2)=1:"",1:"Not ")_"Required to Continue" 126 W ! Q 127 ; 128 ;return 0 if header was not written, else "0^1" 202 129 CHK(Y,XPD) ;Y=excess lines XPD=1 print file header, return 1 to exit 203 ;return 0 if header was not written, else "0^1"204 130 Q:$Y<(IOSL-Y) 0 205 Q:'$$CONT 1 131 I $E(IOST,1,2)="C-" D Q:'Y 1 132 .N DIR,I,J,K,X 133 .S DIR(0)="E" D ^DIR 206 134 S XPD=$G(XPD),XPDPG=XPDPG+1 207 135 W @IOF D HDR,HDR1:XPD 208 W !,XPDUL136 W XPDUL,! 209 137 Q "0^1" 210 CONT() ; Press Return to continue; ^ to exit. 211 Q:$D(DIRUT) 0 212 Q:$E(IOST,1,2)'="C-" 1 213 N DIR,I,J,K,X,Y 214 S DIR(0)="E" D ^DIR 215 Q Y 138 ; 216 139 XMP2(X,D0) ;called from ^XMP2 217 140 N XPDA S XPDA=-1 218 D PNT(X) 141 D PNT(X) Q 142 ; 143 HDR W !,"PACKAGE: ",$P(XPD0,U)," ",XPDDT,?70,"PAGE ",XPDPG,! 219 144 Q 220 HDR ;221 W "PACKAGE: ",$P(XPD0,U)," ",XPDDT,?70,$$RJ^XLFSTR("PAGE "_XPDPG,9)145 HDR1 W ?41,"UP",?47,"SEND",?53,"DATA",?73,"USER",!,?41,"DATE",?47,"SEC.",?53,"COMES",?60,"SITE",?67,"RSLV",?73,"OVER" 146 W !,"FILE #",?12,"NAME",?41,"DD",?47,"CODE",?53,"W/FILE",?60,"DATA",?67,"PTS",?73,"RIDE",! 222 147 Q 223 HDR1 ;224 W !!,?43,"UP SEND DATA USER"225 W !,?43,"DATE SEC. COMES SITE RSLV OVER"226 W !,"FILE #",?12,"FILE NAME",?43,"DD CODE W/FILE DATA PTRS RIDE"227 Q -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XPDI.m
r628 r636 1 XPDI ;SFISC/RSD - Install Process ;9 /16/02 13:291 XPDI ;SFISC/RSD - Install Process ;9:53 AM 31 Jan 2008 2 2 ;;8.0;KERNEL;**10,21,39,41,44,58,68,108,145,184,229**;Jul 10, 1995 3 3 EN ;install … … 6 6 Q:'XPDST!$D(XPDQUIT) 7 7 S XPDIT=0,(XPDSET,XPDSET1)=$P(^XPD(9.7,XPDST,0),U) K ^TMP($J) 8 ;; 9 ;; Patch checker , points to file # 9.6 ; RED 10 D EN^VEPEFKPC(.XPDT,.XPDQUIT,1053) Q:$D(XPDQUIT) ;VOE 1 Patch 11 D EN^VEPEFKPC(.XPDT,.XPDQUIT,1054) Q:$D(XPDQUIT) ;VOE 1.1 Patch 12 D EN^VEPEFKPC(.XPDT,.XPDQUIT,7397) Q:$D(XPDQUIT) ;NO HOME 1.0 Patch 13 ; 8 14 ;Check each part of XPDT array 9 15 F S XPDIT=$O(XPDT(XPDIT)) Q:'XPDIT D Q:'$D(XPDT)!$D(XPDQUIT) -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XPDI1.m
r628 r636 1 XPDI1 ;SFISC/RSD - Cont of Install Process ; 10/28/2002 17:142 ;;8.0;KERNEL;**58,61,95,108,229,275 **;Jul 10, 19951 XPDI1 ;SFISC/RSD - Cont of Install Process ; 8/30/04 9:45am 2 ;;8.0;KERNEL;**58,61,95,108,229,275,L33**;Jul 10, 1995 3 3 ;lookup into file 9.7, XPDS=DIC("S") for lookup 4 4 ;return 0-fail or ien, XPDT=array of linked builds 5 5 LOOK(XPDS,XPDL) ;lookup Install 6 6 N DIC,Y,XPD,XPDIT,% 7 S:$D(AAQP) DIC("B")=AAQP ;MPLS XU*L33 used only by XPDZPAT and AAQMENU 7 8 S DIC(0)="QEAMZ",DIC="^XPD(9.7," 8 9 S:$L($G(XPDS)) DIC("S")=XPDS -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XPDIL.m
r628 r636 1 XPDIL ;SFISC/RSD - load Distribution Global ; 05/17/20061 XPDIL ;SFISC/RSD - load Distribution Global ;10/10/06 17:00 2 2 ;;8.0;KERNEL;**15,44,58,68,108,422**;Jul 10, 1995;Build 2 3 3 ;This routine has the changes made for patch 345 but was released as 422 to fix a read HFS problem … … 41 41 I '$G(XPDAUTO) D HOME^%ZIS 42 42 I $G(XPDAUTO) S IO(0)=XPDDEV 43 S:$D(AAQFILE) DIR("B")=AAQFILE ;L33 used only by XPDZPAT 44 S:$D(AAQFILE) DIR("B")=AAQFILE ;L33 used only by XPDZPAT - line added for VOE 43 45 S DIR(0)="F^3:75",DIR("A")="Enter a Host File",DIR("?")="Enter a filename and/or path to input Distribution." 44 46 ;p345-rename AND* to XPD* -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XPDIST.m
r628 r636 1 XPDIST ;SFISC/RSD - site tracking; 06/01/2006 ;03/05/2008 2 ;;8.0;KERNEL;**66,108,185,233,350,393,486**;Jul 10, 1995;Build 5 3 ; Per VHA Directive 2004-038, this routine should not be modified. 1 XPDIST ;SFISC/RSD - site tracking; 06/01/2006 2 ;;8.0;KERNEL;**66,108,185,233,350,393**;Jul 10, 1995;Build 12 4 3 ;Returns ""=failed, XMZ=sent 5 4 ;D0=ien in file 9.7, XPY=national site tracking^address(optional) 6 5 EN(D0,XPY) ;send message 7 N %,DIFROM,XPD,XPD0,XPD1,XPD2,XPDV,XP Z,X,X1,Z,Y,XPD6,XPDTRACK6 N %,DIFROM,XPD,XPD0,XPD1,XPD2,XPDV,XPDTEXT,XPZ,XMDUZ,XMSUB,XMTEXT,XMY,XMZ,X,X1,Z,Y,XPD6 8 7 ;Get data needed 9 8 I '$D(^XPD(9.7,$G(D0),0)) D BMES^XPDUTL(" INSTALL file entry missing") Q "" … … 16 15 S XPZ(1)=$P(XPD1,U),XPZ(2)=$P(XPD1,U,3),XPZ(3)=$$FMDIFF^XLFDT(XPZ(2),XPZ(1),3),XPZ(1)=$$FMTE^XLFDT(XPZ(1)),XPZ(2)=$$FMTE^XLFDT(XPZ(2)) 17 16 D LOCAL 18 S XPDTRACK=$$TRACK19 17 D REMEDY ;p350 -REM 20 18 Q $$FORUM() 19 ; 20 ; 21 FORUM() ;send to Server on FORUM 22 K XMY,XPDTEXT ;393 23 Q:$G(XPY)="" "" 24 S:XPY XMY("S.A5CSTS@FORUM.VA.GOV")="" ;,XMY("ESSRESOURCE@MED.VA.GOV")="" 25 S:$L($P(XPY,U,2)) XMY($P(XPY,U,2))="" 26 K ^TMP($J) 27 ;Quit if not VA production primary domain 28 I $G(^XMB("NETNAME"))'[".VA.GOV" D BMES^XPDUTL(" Not a VA primary domain") Q "" 29 X ^%ZOSF("UCI") S %=^%ZOSF("PROD") 30 S:%'["," Y=$P(Y,",") 31 I Y'=% D BMES^XPDUTL(" Not a production UCI") Q "" 32 ;Message for server 33 S XPDTEXT(1,0)="PACKAGE INSTALL" 34 S XPDTEXT(2,0)="SITE: "_$G(^XMB("NETNAME")) 35 S XPDTEXT(3,0)="PACKAGE: "_XPD 36 S XPDTEXT(4,0)="VERSION: "_XPDV 37 S XPDTEXT(5,0)="Start time: "_XPZ(1) 38 S XPDTEXT(6,0)="Completion time: "_XPZ(2) 39 S XPDTEXT(7,0)="Run time: "_XPZ(3) 40 S XPDTEXT(8,0)="DATE: "_DT 41 S XPDTEXT(9,0)="Installed by: "_$P($G(^VA(200,+$P(XPD0,U,11),0)),U) 42 S XPDTEXT(10,0)="Install Name: "_$P(XPD0,U) 43 S XPDTEXT(11,0)="Distribution Date: "_$P(XPD1,U,4) 44 S XPDTEXT(12,0)=XPD2 45 S XMDUZ=$S($P(XPD0,U,11):+$P(XPD0,U,11),1:.5),XMTEXT="XPDTEXT(",XMSUB=$P(XPD0,U)_" INSTALLATION" 46 D ^XMD 47 Q "#"_$G(XMZ) 48 ; 21 49 LOCAL ;Send a message to local mail group 22 N XMY,XPDTEXT,XMTEXT,XMDUZ,XMSUB,XMZ 23 K ^TMP($J) 50 K ^TMP($J),XMY,XPDTEXT,XMTEXT 24 51 S X=$$MAILGRP^XPDUTL(XPD) Q:X="" 25 52 S XMY(X)="" D GETENV^%ZOSV … … 38 65 D ^XMD 39 66 Q 40 TRACK() ; Should VA track the installation of this patch at a national level? 41 Q:$G(XPY)="" 0 ; No - National site tracking was not requested 42 ;Quit if not VA production primary domain 43 I $G(^XMB("NETNAME"))'[".VA.GOV" D BMES^XPDUTL(" Not a VA primary domain") Q 0 44 ;X ^%ZOSF("UCI") S %=^%ZOSF("PROD") 45 ;S:%'["," Y=$P(Y,",") 46 ;I Y'=% D BMES^XPDUTL(" Not a production UCI") Q "" 47 ; 486/GMB Replaced the above 3 lines with the following line: 48 I '$$PROD^XUPROD D BMES^XPDUTL(" Not a production UCI") Q 0 49 Q 1 67 ; 50 68 REMEDY ;Send to Remedy Server - ESSRESOURCE@MED.VA.GOV *p350 -REM 51 Q:'XPDTRACK 52 N XMY,XPDTEXT,XMTEXT,XMDUZ,XMSUB,XMZ 53 K ^TMP($J) 69 K ^TMP($J),XMY,XPDTEXT,XMTEXT ;393 70 Q:$G(XPY)="" 54 71 S:XPY XMY("ESSRESOURCE@MED.VA.GOV")="" 55 72 S:$L($P(XPY,U,2)) XMY($P(XPY,U,2))="" 73 ;Quit if not VA production primary domain 74 I $G(^XMB("NETNAME"))'[".VA.GOV" D BMES^XPDUTL(" Not a VA primary domain") Q 75 X ^%ZOSF("UCI") S %=^%ZOSF("PROD") 76 S:%'["," Y=$P(Y,",") 77 I Y'=% D BMES^XPDUTL(" Not a production UCI") Q 56 78 ;Message for server (all in one string) 57 79 ;XMTEXT=Type(1),Domain(2-65),Pkg(66-95),Version(96-125), … … 68 90 D ^XMD 69 91 Q 70 FORUM() ;send to Server on FORUM71 Q:'XPDTRACK ""72 N XMY,XPDTEXT,XMTEXT,XMDUZ,XMSUB,XMZ73 K ^TMP($J)74 S:XPY XMY("S.A5CSTS@FORUM.VA.GOV")=""75 S:$L($P(XPY,U,2)) XMY($P(XPY,U,2))=""76 ;Message for server77 S XPDTEXT(1,0)="PACKAGE INSTALL"78 S XPDTEXT(2,0)="SITE: "_$G(^XMB("NETNAME"))79 S XPDTEXT(3,0)="PACKAGE: "_XPD80 S XPDTEXT(4,0)="VERSION: "_XPDV81 S XPDTEXT(5,0)="Start time: "_XPZ(1)82 S XPDTEXT(6,0)="Completion time: "_XPZ(2)83 S XPDTEXT(7,0)="Run time: "_XPZ(3)84 S XPDTEXT(8,0)="DATE: "_DT85 S XPDTEXT(9,0)="Installed by: "_$P($G(^VA(200,+$P(XPD0,U,11),0)),U)86 S XPDTEXT(10,0)="Install Name: "_$P(XPD0,U)87 S XPDTEXT(11,0)="Distribution Date: "_$P(XPD1,U,4)88 S XPDTEXT(12,0)=XPD289 S XMDUZ=$S($P(XPD0,U,11):+$P(XPD0,U,11),1:.5),XMTEXT="XPDTEXT(",XMSUB=$P(XPD0,U)_" INSTALLATION"90 D ^XMD91 Q "#"_$G(XMZ) -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQ3.m
r628 r636 1 XQ3 ;LL/THM,SF/GJL,SEA/JLI - CLEANUP DANGLING POINTERS IN OPTION OR HELP FRAME FILES ;04/ 30/08 17:062 ;;8.0;KERNEL;**80 ,501**;Jul 10, 1995;Build 11 XQ3 ;LL/THM,SF/GJL,SEA/JLI - CLEANUP DANGLING POINTERS IN OPTION OR HELP FRAME FILES ;04/21/98 13:20 2 ;;8.0;KERNEL;**80**;Jul 10, 1995 3 3 Q 4 4 ENASK ;Ask to fix up dirty OPTION/HELP FRAME File 5 N IX,XUT,J,K,XQFL,X6 5 I '$D(%) W !,$C(7),"ENTRY MUST BE WITH THE VARIABLE '%' SET TO INDICATE DESIRED FILE.",$C(7),! Q 7 6 S XQFL=$S(%=1:"OPTION",%=2:"PROTOCOL",1:"HELP FRAME") … … 22 21 W !!,"Enter: NO or ^ to continue on without effecting the ",XQFL," File." 23 22 W ! G ENASK 24 REMOVE D:%=1 OPFIX D:%=2 PFIX D:'% HFFIX W !,"Your ",XQFL," File is OK " I 'XUT W "(no bad pointers)." 25 E W "now (",XUT," pointer" W:XUT>1 "s" W " fixed)." 26 W ! S X="Y" 23 REMOVE D:%=1 ENFIX D:%=2 PFIX D:'% HFFIX W !,"Your ",XQFL," File is OK " I 'X W "(no bad pointers)." 24 E W "now (",X," pointer" W:X>1 "s" W " fixed)." 25 W ! S X="Y" Q 26 ENFIX ;Kill any dangling pointers in the OPTION File (#19) 27 S (I,X)=0 ;X=Total Deletions 28 L1 S I=$O(^DIC(19,I)) I I>0 S (Y,J)=0 G L2 ;Loop through menus 27 29 Q 28 OPFIX ;Kill any dangling pointers in the OPTION File (#19) 29 N %,IX,J,XQ3 30 S (IX,XUT)=0 ;XUT=Total Deletions 31 F S IX=$O(^DIC(19,IX)) Q:'IX W:'(IX#100) ". " S (XQ3,J)=0 D L2 ;Loop through Options 32 D NPF 30 L2 S J=$O(^DIC(19,I,10,J)) I J>0 G ITEM ;Loop through menu items 31 I '$D(^DIC(19,I,10,0)) G L1 32 S (K,J)=0 F L=1:1 S J=$O(^DIC(19,I,10,J)) Q:J'>0 S K=J ;K=Last item 33 S J=^DIC(19,I,10,0),^(0)=$P(J,"^",1,2)_"^"_K_"^"_Y ;fix counters 34 G XREFS 35 ITEM S K=+^DIC(19,I,10,J,0) I $D(^DIC(19,K,0)) S Y=Y+1 G L2 ;Y=No. of items 36 W !,"Option ",$P(^DIC(19,I,0),U,1)," points to missing option ",K 37 S X=X+1 K ^DIC(19,I,10,J) ;Kill invalid menu item 38 G L2 39 XREFS S K=":" 40 L3 S K=$O(^DIC(19,I,10,K)) I K="" G L1 ;Loop through cross references 41 S L=-1 42 L4 S L=$O(^DIC(19,I,10,K,L)) I L="" G L3 43 S J=0 44 L5 S J=$O(^DIC(19,I,10,K,L,J)) I J'>0 G L4 45 I '$D(^DIC(19,I,10,J,0)) G KILLXR ;kill xref to invalid item 46 L6 S M=^DIC(19,I,10,J,0) I (M=L)!(M[L_"^") G L5 47 KILLXR K ^DIC(19,I,10,K,L,J) I $O(^DIC(19,I,10,K,L,-1))="" K ^DIC(19,I,10,K,L) 48 G L5 49 HFFIX ; Fix dangling pointers on help frame file 50 S (X,I)=0 F S I=$O(^DIC(9.2,I)) Q:I'>0 I $D(^(I,2)) D HF1,HF2,HF3 33 51 Q 34 L2 ;One Option 35 I '$D(^DIC(19,IX,10,0)) Q ;Not a Menu 36 K ^DIC(19,IX,10,"B") ;Rebuild "B" X-ref 37 F S J=$O(^DIC(19,IX,10,J)) Q:'J D ITEM ;Loop through menu items 38 S (K,J)=0 F S J=$O(^DIC(19,IX,10,J)) Q:J'>0 S K=J ;K=Last item 39 S J=^DIC(19,IX,10,0),^(0)=$P(J,"^",1,2)_"^"_K_"^"_XQ3 ;fix counters 52 HF1 S (Y,J)=0 F S J=$O(^DIC(9.2,I,2,J)) Q:J'>0 I $D(^(J,0)) S K=$P(^(0),U,2),Y=Y+1 I $L(K),'$D(^DIC(9.2,K)) S Y=Y-1,X=X+1 K ^DIC(9.2,I,2,J,0) 40 53 Q 41 ; 42 ITEM ;One Menu item 43 N DA,DIK 44 S K=+^DIC(19,IX,10,J,0) 45 I $D(^DIC(19,K,0)) S XQ3=XQ3+1,^DIC(19,IX,10,"B",K,J)="" Q ;Y=No. of items 46 W !,"Option ",$P(^DIC(19,IX,0),U,1)," points to missing option ",K 47 ;S XUT=XUT+1 K ^DIC(19,IX,10,J) ;Kill invalid menu item 48 S XUT=XUT+1,DIK="^DIC(19,DA(1),10,",DA=J,DA(1)=IX D ^DIK ;Trigger Menu-rebuild 54 HF2 S (K,J)=0 F S J=$O(^DIC(9.2,I,2,J)) Q:J'>0 S K=J 55 S J=^DIC(9.2,I,2,0),^(0)=$P(J,U,1,2)_U_K_U_Y 49 56 Q 50 ; 51 NPF ;Fix the New Person File Option Pointers 52 N IX,I2,J,P,DIK,DIE,DR,DA,XUT 53 S (XUT,IX)=0 54 F S IX=$O(^VA(200,IX)) Q:'IX D 55 . S P=+$G(^VA(200,IX,201)) 56 . I P,'$D(^DIC(19,P,0)) D 57 . . W !,"User: ",$P(^VA(200,IX,0),U),", Primary Menu points to missing option ",P 58 . . S XUT=XUT+1,DIE="^VA(200,",DA=IX,DR="201///@" D ^DIE 59 . . Q 60 . S I2=0 61 . F S I2=$O(^VA(200,IX,203,I2)) Q:'I2 D 62 . . S P=+$G(^VA(200,IX,203,I2,0)) 63 . . I P,'$D(^DIC(19,P,0)) D 64 . . . W !,"User: ",$P(^VA(200,IX,0),U),", Secondary Menu points to missing option ",P 65 . . . S XUT=XUT+1,DIK="^VA(200,DA(1),203,",DA=I2,DA(1)=IX D ^DIK 66 . . . Q 67 . . Q 68 . Q 69 I XUT W !,"Menu pointers fixed." 57 HF3 S K=":" F S K=$O(^DIC(9.2,I,2,K)) Q:K="" S J=-1 F S J=$O(^DIC(9.2,I,2,K,J)) Q:J="" D HF4 70 58 Q 71 HFFIX ; Fix dangling pointers on help frame file 72 N % 73 S (XUT,IX)=0 F S IX=$O(^DIC(9.2,IX)) Q:IX'>0 I $D(^(IX,2)) D HF1,HF2,HF3 74 Q 75 HF1 S (Y,J)=0 F S J=$O(^DIC(9.2,IX,2,J)) Q:J'>0 I $D(^(J,0)) S K=$P(^(0),U,2),Y=Y+1 I $L(K),'$D(^DIC(9.2,K)) S Y=Y-1,XUT=XUT+1 K ^DIC(9.2,IX,2,J,0) 76 Q 77 HF2 S (K,J)=0 F S J=$O(^DIC(9.2,IX,2,J)) Q:J'>0 S K=J 78 S J=^DIC(9.2,IX,2,0),^(0)=$P(J,U,1,2)_U_K_U_Y 79 Q 80 HF3 S K=":" F S K=$O(^DIC(9.2,IX,2,K)) Q:K="" S J=-1 F S J=$O(^DIC(9.2,IX,2,K,J)) Q:J="" D HF4 81 Q 82 HF4 S JJ=0 F S JJ=$O(^DIC(9.2,IX,2,K,J,JJ)) Q:JJ'>0 I '$D(^DIC(9.2,IX,2,JJ,0)) K ^DIC(9.2,IX,2,K,J,JJ) 59 HF4 S JJ=0 F S JJ=$O(^DIC(9.2,I,2,K,J,JJ)) Q:JJ'>0 I '$D(^DIC(9.2,I,2,JJ,0)) K ^DIC(9.2,I,2,K,J,JJ) 83 60 Q 84 61 PFIX ;Kill any dangling pointers in the PROTOCOL File (#101) 85 N % 86 S (IX,XUT)=0 ;XUT=Total Deletions 87 P1 S IX=$O(^ORD(101,IX)) I IX>0 S (Y,J)=0 G P2 ;Loop through protocols 62 S (I,X)=0 ;X=Total Deletions 63 P1 S I=$O(^ORD(101,I)) I I>0 S (Y,J)=0 G P2 ;Loop through protocols 88 64 Q 89 P2 S J=$O(^ORD(101,I X,10,J)) I J>0 G PITEM ;Loop through items90 I '$D(^ORD(101,I X,10,0)) G P191 S (K,J)=0 F L=1:1 S J=$O(^ORD(101,I X,10,J)) Q:J'>0 S K=J ;K=Last item92 S J=^ORD(101,I X,10,0),^(0)=$P(J,"^",1,2)_"^"_K_"^"_Y ;fix counters65 P2 S J=$O(^ORD(101,I,10,J)) I J>0 G PITEM ;Loop through items 66 I '$D(^ORD(101,I,10,0)) G P1 67 S (K,J)=0 F L=1:1 S J=$O(^ORD(101,I,10,J)) Q:J'>0 S K=J ;K=Last item 68 S J=^ORD(101,I,10,0),^(0)=$P(J,"^",1,2)_"^"_K_"^"_Y ;fix counters 93 69 G PXREFS 94 PITEM S K=+^ORD(101,IX,10,J,0) I $D(^ORD(101,K,0)) S Y=Y+1 G P2 ;Y=No. of items 95 W !,"Protocol ",$P(^ORD(101,IX,0),U,1)," points to missing protocol ",K 96 ;S XUT=XUT+1 K ^ORD(101,IX,10,J) ;Kill invalid menu item 97 S XUT=XUT+1,DIK="^ORD(101,IX,10,",DA=J,DA(1)=IX D ^DIK ;Delete invalid menu item 70 PITEM S K=+^ORD(101,I,10,J,0) I $D(^ORD(101,K,0)) S Y=Y+1 G P2 ;Y=No. of items 71 W !,"Option ",$P(^ORD(101,I,0),U,1)," points to missing option ",K 72 S X=X+1 K ^ORD(101,I,10,J) ;Kill invalid menu item 98 73 G P2 99 74 PXREFS S K=":" 100 P3 S K=$O(^ORD(101,I X,10,K)) I K="" G P1 ;Loop through cross references75 P3 S K=$O(^ORD(101,I,10,K)) I K="" G P1 ;Loop through cross references 101 76 S L=-1 102 P4 S L=$O(^ORD(101,I X,10,K,L)) I L="" G P377 P4 S L=$O(^ORD(101,I,10,K,L)) I L="" G P3 103 78 S J=0 104 P5 S J=$O(^ORD(101,I X,10,K,L,J)) I J'>0 G P4105 I '$D(^ORD(101,I X,10,J,0)) G PKILLXR ;kill xref to invalid item106 P6 S M=^ORD(101,I X,10,J,0) I (M=L)!(M[L_"^") G P5107 PKILLXR K ^ORD(101,I X,10,K,L,J) I $O(^ORD(101,IX,10,K,L,-1))="" K ^ORD(101,IX,10,K,L)79 P5 S J=$O(^ORD(101,I,10,K,L,J)) I J'>0 G P4 80 I '$D(^ORD(101,I,10,J,0)) G PKILLXR ;kill xref to invalid item 81 P6 S M=^ORD(101,I,10,J,0) I (M=L)!(M[L_"^") G P5 82 PKILLXR K ^ORD(101,I,10,K,L,J) I $O(^ORD(101,I,10,K,L,-1))="" K ^ORD(101,I,10,K,L) 108 83 G P5 -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQ5.m
r628 r636 1 XQ5 ;SF/GFT,MJM,KLD - Menu edit utilities [XUEDITOPT] ;01/30/2008 2 ;;8.0;KERNEL;**44,130,484**;Jul 10, 1995;Build 2 3 ; Per VHA Directive 2004-038, this routine should not be modified. 4 ; Option & Input Template: XUEDITOPT 1 XQ5 ;SF/GFT,MJM,KLD - Menu edit utilities [XUEDITOPT] ;09/20/96 15:33 2 ;;8.0;KERNEL;**44,130**;Jul 10, 1995 5 3 DIP ; 6 4 K DIC S DIC=.4,DIC(0)="AEQMZ" I $D(^DIC(19,DA,63)),^(63)?1"[".E1"]" S DIC("B")=$E(^(63),2,$L(^(63))-1) … … 33 31 Q1 K XQDIC,XQ,Y S DIC=DIE Q 34 32 ; 35 DIC S XQ=$P(^DIC(XQDIC,0),U,1),XQ(30)=$P(^(0,"GL"),U,2) 36 S XQ(31)=$G(^DIC(19,DA,31)) S:XQ(31)="" XQ(31)="AEMQ" 33 DIC S XQ=$P(^DIC(XQDIC,0),U,1),XQ(30)=$P(^(0,"GL"),U,2),XQ(31)="AEMQ" 37 34 I $D(^DIC(XQDIC,0,"LAYGO")),DUZ(0)'="@" S Y=$L(^("LAYGO")) I Y F %=1:1 I DUZ(0)[$E(^("LAYGO"),%) G A:%>Y Q 38 35 W !,"WHEN USER SELECTS AN ENTRY IN THE '"_XQ_"' FILE,",!,"WILL ADDING A NEW ENTRY AT THAT TIME ('LAYGO') BE ALLOWED" 39 S %=$S(XQ(31)["L":0,1:2) D YN^DICN 40 I %=1 I XQ(31)'["L" S XQ(31)=XQ(31)_"L" 41 I %=2 I XQ(31)["L" S XQ(31)=$TR(XQ(31),"L") 36 S %=$S($D(^DIC(19,DA,31)):^(31)'["L"+1,1:0) D YN^DICN I %=1 S XQ(31)="AEMQL" 42 37 A Q 43 38 ; … … 48 43 G:DUZ0 DIQ1 S DIC("S")="I 1 Q:'$D(^(0,""RD"")) F %=1:1:$L(^(""RD"")) I DUZ(0)[$E(^(""RD""),%) Q" 49 44 DIQ1 ; 50 D ^DIC K DIC G:Y<0 Q S (XQ(80),XQ(30))=$P(^(0,"GL"),U,2) 51 S XQ(31)=$G(^DIC(19,DA,31)) S:XQ(31)="" XQ(31)="AEMQ" 52 D PUT G Q1 45 D ^DIC K DIC G:Y<0 Q S XQ(31)="AEMQ",(XQ(80),XQ(30))=$P(^(0,"GL"),U,2) D PUT G Q1 53 46 ; 54 47 NAME ; … … 67 60 PRNT W !,?16,"*** IMPORTANT PLEASE READ ***",! 68 61 W !,"By selecting a new Print/Sort Template below, your defaults will" 69 W !,"be changed. Your defaults are currently set as follows 62 W !,"be changed. Your defaults are currently set as follows(see below)." 70 63 W !,"Should you desire to keep the defaults as they are, or to revise" 71 64 W !,"one or more, enter an '^' up-arrow, without selecting a new" 72 65 W !,"template name." 73 66 W !!,?23,"Default Values",!,?23,"==============",! 74 W !,? 5,"DIC {DIP}: "_$$GET1^DIQ(19,DA,60)67 W !,?17,"DIC {DIP}: "_$$GET1^DIQ(19,DA,60) 75 68 W ?40,"L.: "_$$GET1^DIQ(19,DA,62) 76 W !,? 5,"FLDS: "_$$GET1^DIQ(19,DA,63)69 W !,?17,"FLDS: "_$$GET1^DIQ(19,DA,63) 77 70 W ?40,"BY: "_$$GET1^DIQ(19,DA,64) 78 W !,? 5,"FR: "_$$GET1^DIQ(19,DA,65)71 W !,?17,"FR: "_$$GET1^DIQ(19,DA,65) 79 72 W ?40,"TO: "_$$GET1^DIQ(19,DA,66),!! 80 73 Q … … 82 75 SORT W !,?16,"*** IMPORTANT PLEASE READ ***",! 83 76 W !,"By selecting a new Sort Template below, your defaults will be" 84 W !,"changed. Your defaults are currently set as follow s(see below)."77 W !,"changed. Your defaults are currently set as follow(see below)." 85 78 W !,"Should you desire to keep the defaults as they are, or to revise" 86 79 W !,"one or more, enter an '^' up-arrow, without selecting a new Sort" 87 80 W !,"Template." 88 81 W !!,?23,"Default Values",!,?23,"==============",! 89 W ? 5,"BY: "_$$GET1^DIQ(19,DA,64)90 W !,? 5,"FR: "_$$GET1^DIQ(19,DA,65)82 W ?17,"BY: "_$$GET1^DIQ(19,DA,64) 83 W !,?17,"FR: "_$$GET1^DIQ(19,DA,65) 91 84 W ?40,"TO: "_$$GET1^DIQ(19,DA,66),!! 92 85 Q -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQ55.m
r628 r636 1 XQ55 ; SEA/AMF,MJM,JLI - SEARCH FOR USERS ACCESS TO AN OPTION [4/12/04 4:36am] ;1/29/08 09:50 2 ;;8.0;KERNEL;**140,342,483**;Jul 10, 1995;Build 15 3 ;;Per VHA Directive 2004-038, this routine should not be modified 1 XQ55 ; SEA/AMF,MJM,JLI - SEARCH FOR USERS ACCESS TO AN OPTION [4/12/04 4:36am] 2 ;;8.0;KERNEL;**140,342**;Jul 10, 1995 4 3 INIT ; 5 4 S XQDSH="-------------------------------------------------------------------------------" … … 8 7 MPAT W !!,"Show menu paths" S %=2 D YN^DICN G:%<0 OUT S XQMP=2-% I '% W !!,"If you answer 'YES', the listing will include the menu path(s) each user has",!,"to access the specified option." G MPAT 9 8 K ^TMP($J),XQR,XQP 10 S K=^DIC(19,XQOPT,0),XQHDR="Access to '"_$P(K,U,2)_"' ["_$P(K,U,1)_"]",XQSCD=0 ,XQCOM=0,XQNOPRNT=09 S K=^DIC(19,XQOPT,0),XQHDR="Access to '"_$P(K,U,2)_"' ["_$P(K,U,1)_"]",XQSCD=0 11 10 LOOP1 S K=XQOPT,(L,X(0))=0,XQD=K K XQR,XQA,XQK,XQRV S XQR(K)="" I '$L($P(^DIC(19,K,0),U,3)) D TREE1 12 11 G LOOP2 … … 26 25 LOOP2 ; 27 26 S XQPA(0)=0,XQP=0 F S XQP=$O(^TMP($J,XQP)) Q:XQP="" S XQN=^TMP($J,XQP,0) S XQPS="AP" D USERS S XQPS="AD" D USERS 28 D USERS1 I XQNOPRNT G MUS ; 080115 - add in options from the common menu29 27 G LOOP3 30 28 USERS ; 31 29 S XQU=0 F S XQU=$O(^VA(200,XQPS,XQP,XQU)) Q:XQU'>0 I $D(^VA(200,XQU,.1)),+$$ACTIVE^XUSER(XQU) D EACHU 32 30 Q 33 USERS1 ; 080115 code added to handle options on the COMMON (XUCOMMAND) menu34 N XUCOMMON35 S XUCOMMON=$O(^DIC(19,"B","XUCOMMAND",0))36 S XQP=0 F S XQP=$O(^TMP($J,XQP)) Q:XQP="" S XQN=^TMP($J,XQP,0) F J=1:1:XQN Q:'$D(^TMP($J,XQP,J)) I $P($P(^TMP($J,XQP,J),U,2),",")=XUCOMMON D37 . D Q:'Y38 . . W !,"***"39 . . W !,"*** This option is available from the 'SYSTEM COMMAND OPTIONS' ***"40 . . W !,"*** (XUCOMMAND) menu available to all active users unless ***"41 . . W !,"*** protected by a KEY - DO YOU REALLY WANT THE ENTIRE LIST ***"42 . . W !,"*** OF THESE USERS??? ***",!43 . . N DIR S DIR(0)="Y" D ^DIR S:'Y XQNOPRNT=1 Q:'Y44 . . Q45 . S XQU=0,XQPS="(C)" F S XQU=$O(^VA(200,XQU)) Q:XQU'>0 I $D(^VA(200,XQU,.1)),+$$ACTIVE^XUSER(XQU),$$KEYCHECK() S II=1 D SETU46 Q47 ;48 31 EACHU ; 49 32 S II=1 50 F J=1:1:XQN Q:'$D(^TMP($J,XQP,J)) I $$KEYCHECK() D SETU ; 080115 33 F J=1:1:XQN Q:'$D(^TMP($J,XQP,J)) D 34 .S XQK=$P(^TMP($J,XQP,J),U,1),XX=$L(XQK,",")-1,XQGO=1 35 .I XX F X=1:1:XX S Y=$P(XQK,",",X) I Y'="",('$D(^XUSEC(Y,XQU))) S XQGO=0 36 .S XQK=$P(^TMP($J,XQP,J),U,3),XX=$L(XQK,",")-1 37 .I XX F X=1:1:XX S Y=$P(XQK,",",X) I Y'="",($D(^XUSEC(Y,XQU))) S XQGO=0 38 .D:XQGO SETU 51 39 Q 52 ;53 KEYCHECK() ; 080115 extracted common code54 ; returns 1 if user has access to the option, 0 if the user does not have access55 S XQK=$P(^TMP($J,XQP,J),U,1),XX=$L(XQK,",")-1,XQGO=156 I XX F X=1:1:XX S Y=$P(XQK,",",X) I Y'="",('$D(^XUSEC(Y,XQU))) S XQGO=057 S XQK=$P(^TMP($J,XQP,J),U,3),XX=$L(XQK,",")-158 I XX F X=1:1:XX S Y=$P(XQK,",",X) I Y'="",($D(^XUSEC(Y,XQU))) S XQGO=059 Q XQGO60 ;61 40 SETU ; 62 41 S XQPA=$P(^TMP($J,XQP,J),U,2) 63 42 I '$D(XQPA(XQPA)) S I=XQPA(0)+1,XQPA(0)=I,XQPA(0,I)=XQPA,XQPA(XQPA)=I 64 S XQPA=XQPA(XQPA) S:XQPS="AD" XQPA=XQPA_"(S)",XQSCD=1 S:XQPS="(C)" XQPA=XQPA_"(C)",XQCOM=1 ; 08011543 S XQPA=XQPA(XQPA) S:XQPS="AD" XQPA=XQPA_"(S)",XQSCD=1 65 44 S I=$P(^VA(200,XQU,0),U,1)_U_XQU S:$D(^TMP($J,0,I)) II=$O(^TMP($J,0,I,"A"),-1)+1 S ^TMP($J,0,I,II)=XQPA 66 45 Q … … 102 81 F I=1:1:XQPA(0) S K=XQPA(0,I) W !,I,".",?4 F N=1:1 Q:'$L($P(K,",",N)) W:N>1 " ... " W $P(^DIC(19,$P(K,",",N),0),U,1) 103 82 I XQSCD W !,"(S) - secondary menu pathway" 104 I XQCOM W !,"(C) - SYSTEM COMMAND OPTIONS (XUCOMMAND) menu pathway"105 83 Q 106 84 MUS G:X="^" OUT I XQPG,$E(IOST,1)="C" W !!,"Press return when finished viewing " R X:DTIME W @IOF G OUT … … 109 87 D ^%ZISC 110 88 KILL K XQDT,XQGO,XQN,XQP,XQR,XQRV,XQOPT,XQPA,XQUI,XQSCD,XQDSH,XQU,N,K,J,X,XQA,XQD,XQHDR,XQK,XQP,XQPS,XQMP,XQPG,XX 111 K DIC,I,II,JJ,L,POP,Y ,XQNOPRNTI $D(ZTQUEUED),$D(ZTSK),ZTSK>0 K ^%ZTSK(ZTSK)89 K DIC,I,II,JJ,L,POP,Y I $D(ZTQUEUED),$D(ZTSK),ZTSK>0 K ^%ZTSK(ZTSK) 112 90 Q -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQ81.m
r628 r636 1 XQ81 ;SEA/AMF/LUKE,SF/RWF - Build menu trees ; 12/10/072 ;;8.0;KERNEL;**81,116,157,253 ,478**;Jul 10, 1995;Build 31 XQ81 ;SEA/AMF/LUKE,SF/RWF - Build menu trees ;03/03/2003 10:00 2 ;;8.0;KERNEL;**81,116,157,253**;Jul 10, 1995 3 3 BUILD ; 4 4 ; … … 10 10 S XQSTART=$$HTE^XLFDT($H) 11 11 K XQFG W !!,"This option will build menu trees for each primary and secondary menu.",!,"You may build all the trees, or build them selectively, using 'verify'.",!,"Note that the 'compiled menus' will only be built into ^XUTL on this CPU.",! 12 S DIR(0)="Y",DIR("A")="Do you wish to verify each primary menu",DIR("B")="NO",DIR("??")="XQBUILDTREE-VER" D ^DIR K DIR G:$D(DIRUT) BLDEND 1S XQVE=(Y=1)13 S DIR(0)="Y",DIR("A")="Would you like to build secondary menu trees too",DIR("B")="YES",DIR("??")="XQBUILDTREE-SEC" D ^DIR G:$D(DIRUT) BLDEND 1S XQBSEC=(Y=1)14 ; 15 I 'XQVE S DIR(0)="Y",DIR("A")="Would you like to queue this job",DIR("B")="YES" D ^DIR K DIR G:$D(DIRUT) BLDEND 1I Y=1 D12 S DIR(0)="Y",DIR("A")="Do you wish to verify each primary menu",DIR("B")="NO",DIR("??")="XQBUILDTREE-VER" D ^DIR K DIR G:$D(DIRUT) BLDEND S XQVE=(Y=1) 13 S DIR(0)="Y",DIR("A")="Would you like to build secondary menu trees too",DIR("B")="YES",DIR("??")="XQBUILDTREE-SEC" D ^DIR G:$D(DIRUT) BLDEND S XQBSEC=(Y=1) 14 ; 15 I 'XQVE S DIR(0)="Y",DIR("A")="Would you like to queue this job",DIR("B")="YES" D ^DIR K DIR G:$D(DIRUT) BLDEND I Y=1 D 16 16 .S ZTRTN="QUE^XQ81",ZTIO="" 17 17 .S ZTSAVE("XQVE")="",ZTSAVE("XQBSEC")="",ZTSAVE("XQSTART")="" … … 24 24 E S ^DIC(19,"AXQ","P0")=$H L +^DIC(19,"AXQ","P0") 25 25 ; 26 I 'XQVE S DIR(0)="Y",DIR("A")="Do you really wish to run this DIRECTLY (it may take some time)",DIR("B")="NO" D ^DIR K DIR G:$D(DIRUT) BLDEND 1G:Y'=1 RD226 I 'XQVE S DIR(0)="Y",DIR("A")="Do you really wish to run this DIRECTLY (it may take some time)",DIR("B")="NO" D ^DIR K DIR G:$D(DIRUT) BLDEND G:Y'=1 RD2 27 27 ; 28 28 KIDS ;Entry from KIDS … … 251 251 G UNWIND^%ZTER 252 252 Q 253 ;254 BLDEND1 ;Quit and clean255 K %,%H,%TG,C,D,DIC,DIR,I,J,K,L,V,XQBSEC,X,Y,Z,XQL,XQN,XQRE,XQK,XQI,XQII,UU,XQH,XQPX,XQSAV,XQXUF,XQ81T,XQDATE,XQSEC,XQVE,XQBLD,XQP,XQR,XQJ256 Q -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQALDATA.m
r628 r636 1 XQALDATA ;ISC-SF/JLI - PROVIDE DATA ON ALERTS ; 4/9/07 13:392 ;;8.0;KERNEL;**207,285 ,443**;Jul 10, 1995;Build 41 XQALDATA ;ISC-SF/JLI - PROVIDE DATA ON ALERTS ;9/9/03 15:13 2 ;;8.0;KERNEL;**207,285**;Jul 10, 1995 3 3 Q 4 4 GETUSER(ROOT,XQAUSER,FRSTDATE,LASTDATE) ; 5 N XREF,XVAL ,X,X2,X3,I,NCNT ; P4435 N XREF,XVAL 6 6 S:$G(XQAUSER)'>0 XQAUSER=DUZ 7 7 S:$G(FRSTDATE)'>0 FRSTDATE=0 … … 9 9 S NCNT=0 K @ROOT 10 10 I FRSTDATE=0 D Q 11 . F I=0:0 S I=$O(^XTV(8992,XQAUSER,"XQA",I)) Q:I'>0 S X=^(I,0),X3=$G(^(3)) ,X2=$G(^(2))D11 . F I=0:0 S I=$O(^XTV(8992,XQAUSER,"XQA",I)) Q:I'>0 S X=^(I,0),X3=$G(^(3)) D 12 12 . . S NCNT=NCNT+1 13 . . S @ROOT@(NCNT)=$S($P(X3,U)'="":"G ",$P(X,U,7,8)="^ ":"I ",1:" ")_$P(X,U,3)_U_$P(X,U,2) _$S($P(X2,U,3)'="":U_$P(X2,U,3),1:"") ; P44313 . . S @ROOT@(NCNT)=$S($P(X3,U)'="":"G ",$P(X,U,7,8)="^ ":"I ",1:" ")_$P(X,U,3)_U_$P(X,U,2) 14 14 . S @ROOT=NCNT 15 15 S XREF="R" … … 18 18 Q 19 19 GETPAT(ROOT,PATIENT,FRSTDATE,LASTDATE) ; 20 N XREF,XVAL ,NCNT20 N XREF,XVAL 21 21 S NCNT=0 K @ROOT 22 22 I $G(PATIENT)'>0 S @ROOT=0 Q … … 26 26 Q 27 27 CHKTRAIL ; 28 N XQ1,X,X1,X2,X329 ; ZEXCEPT: FRSTDATE,LASTDATE,NCNT,ROOT,XREF,XVAL -- from GETPAT or GETUSER30 28 F XQ1=0:0 S XQ1=$O(^XTV(8992.1,XREF,XVAL,XQ1)) Q:XQ1'>0 D 31 . S X=$G(^XTV(8992.1,XQ1,0)),X1=$G(^(1)),X3=$G(^(3)) ,X2=$G(^(2))Q:X=""29 . S X=$G(^XTV(8992.1,XQ1,0)),X1=$G(^(1)),X3=$G(^(3)) Q:X="" 32 30 . I FRSTDATE'>0,'$D(^XTV(8992,"AXQA",$P(X,U))) Q 33 31 . I FRSTDATE>0,$P(X,U,2)<FRSTDATE Q 34 32 . I FRSTDATE>0,LASTDATE>0,$P(X,U,2)>LASTDATE Q 35 33 . S NCNT=NCNT+1 36 . S @ROOT@(NCNT)=$S($P(X3,U)'="":"G ",$P(X1,U,2,3)="^":"I ",$P(X1,U,2,3)="":"I ",1:" ")_$P(X1,U)_U_$P(X,U) _$S($P(X2,U,3)'="":U_$P(X2,U,3),1:"") ; P44334 . S @ROOT@(NCNT)=$S($P(X3,U)'="":"G ",$P(X1,U,2,3)="^":"I ",$P(X1,U,2,3)="":"I ",1:" ")_$P(X1,U)_U_$P(X,U) 37 35 S @ROOT=NCNT 38 36 Q -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQALDEL.m
r628 r636 1 XQALDEL ;ISC-SF.SEA/JLI - DELETE ALERTS ; 4/9/07 15:132 ;;8.0;KERNEL;**6,24,65,114,174,285 ,443**;Jul 10, 1995;Build 41 XQALDEL ;ISC-SF.SEA/JLI - DELETE ALERTS ;6/28/04 11:02 2 ;;8.0;KERNEL;**6,24,65,114,174,285**;Jul 10, 1995 3 3 ;; 4 4 Q … … 107 107 S XQDAT=$$FMADD^XLFDT(DT,-30) 108 108 F XQDEL1=0:0 S XQDEL1=$O(^XTV(8992.1,XQDEL1)) Q:XQDEL1'>0 D 109 . S X1=$P( $G(^XTV(8992.1,XQDEL1,0)),U,2),X2=$P($G(^(0)),U,8)109 . S X1=$P(^XTV(8992.1,XQDEL1,0),U,2),X2=$P(^(0),U,8) 110 110 . S DA=XQDEL1 I X2="",X1>XQDAT Q 111 111 . I X2>0,DT<X2 Q -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQALERT1.m
r628 r636 1 XQALERT1 ;ISC-SF.SEA/JLI - ALERT HANDLER ; 4/9/07 14:542 ;;8.0;KERNEL;**20,65,114,123,125,164,173,285,366 ,443**;Jul 10, 1995;Build 41 XQALERT1 ;ISC-SF.SEA/JLI - ALERT HANDLER ;9/6/05 15:13 2 ;;8.0;KERNEL;**20,65,114,123,125,164,173,285,366**;Jul 10, 1995 3 3 ;; 4 4 Q … … 29 29 SUBLOOP W @IOF 30 30 N XQZ1,XQZ 31 S XQK=0 F XQI=0:0 Q:XQX1!XQXOUT S XQI=$O(^TMP("XQ",$J,"XQA",XQI)) Q:XQI'>0 S XQX=^(XQI),XQII=^(XQI,1),XQZ=^(2),XQZ1=^(3) ,XQZ4=^(4)D I XQX'="" D DOIT131 S XQK=0 F XQI=0:0 Q:XQX1!XQXOUT S XQI=$O(^TMP("XQ",$J,"XQA",XQI)) Q:XQI'>0 S XQX=^(XQI),XQII=^(XQI,1),XQZ=^(2),XQZ1=^(3) D I XQX'="" D DOIT1 32 32 . I '$D(^XTV(8992,XQAUSER,"XQA",XQII)) S XQX="" K ^TMP("XQ",$J,"XQA",XQI),^TMP("XQ",$J,"XQA1",(999999-XQI)) 33 33 . Q … … 40 40 ; 41 41 RESTORE ; Restore a deleted message for use 42 N ALERTREF,XTVGLOB,ADUZ,X,X0,X1,X2,TIME,MESG,OPT,TAG,ROU ,X4,LONG42 N ALERTREF,XTVGLOB,ADUZ,X,X0,X1,X2,TIME,MESG,OPT,TAG,ROU 43 43 S XTVGLOB=$NA(^XTV(8992,DUZ,"XQA")) 44 44 S ADUZ=$O(^XTV(8992,"AXQA",XQAID,0)) I ADUZ>0 S TIME=$O(^(ADUZ,0)) D I 1 45 45 . M @XTVGLOB@(TIME)=^XTV(8992,ADUZ,"XQA",TIME) K @XTVGLOB@(TIME,2) ; copy alert, kill comment if any 46 46 E S ALERTREF=$O(^XTV(8992.1,"B",XQAID,0)) Q:ALERTREF'>0 D ; otherwise rebuild from alert tracking file if possible 47 . S X0=^XTV(8992.1,ALERTREF,0),X1=$G(^(1)),X2=$G(^(2)) ,X4=$O(^(4,0))48 . S TIME=$P($P(X0,U),";",3),MESG=$P(X1,U),OPT=$P(X1,U,2),TAG=$P(X1,U,3),ROU=$P(X1,U,4) ,LONG=(X4>0)49 . S X=TIME_U_XQAID_U_MESG_U_U_$S(OPT'=""!(ROU'=""):"R", LONG:"L",1:"I")_U_U_$S(OPT'="":OPT,TAG'="":TAG,1:"")_U_$S(OPT'="":"",ROU'="":ROU,1:" ")47 . S X0=^XTV(8992.1,ALERTREF,0),X1=$G(^(1)),X2=$G(^(2)) 48 . S TIME=$P($P(X0,U),";",3),MESG=$P(X1,U),OPT=$P(X1,U,2),TAG=$P(X1,U,3),ROU=$P(X1,U,4) 49 . S X=TIME_U_XQAID_U_MESG_U_U_$S(OPT'=""!(ROU'=""):"R",1:"I")_U_U_$S(OPT'="":OPT,TAG'="":TAG,1:"")_U_$S(OPT'="":"",ROU'="":ROU,1:" ") 50 50 . S @XTVGLOB@(TIME,0)=X I $G(X2)'="" S ^(1)=X2 51 51 S ^XTV(8992,"AXQA",XQAID,DUZ,TIME)="",^XTV(8992,"AXQAN",$E($P(XQAID,";"),1,30),DUZ,TIME)="" … … 69 69 I XQK=0 S XQALINFO=0 I '$D(XQALFWD) W @IOF 70 70 S XQON="$C(0)",XQOFF="$C(0)" S XQOUT=$P(XQX,U,3) I ($$UP^XLFSTR(XQOUT)["CRITICAL")!($$UP^XLFSTR(XQOUT)["ABNORMAL IMA") D:'$D(XQ1ON) SETREV^XQALERT S XQON=XQ1ON,XQOFF=XQ1OFF ; P285 71 S XQK=XQK+1 W !,$J(XQK,2),".",$S( XQZ4:"L",$P(XQX,U,8)=" ":"I",1:" ")," ",@XQON,$E($P(XQX,U,3),1,70),@XQOFF S:$P(XQX,U,8)=" " XQALINFO=XQALINFO+1 D:XQZ1'="" ; P28571 S XQK=XQK+1 W !,$J(XQK,2),".",$S($P(XQX,U,8)=" ":"I",1:" ")," ",@XQON,$E($P(XQX,U,3),1,70),@XQOFF S:$P(XQX,U,8)=" " XQALINFO=XQALINFO+1 D:XQZ1'="" ; P285 72 72 . W !?8,"Forwarded by: ",$P(^VA(200,+XQZ1,0),U)," Generated: ",$$DAT8^XQALERT(+$P($P(XQX,U,2),";",3),1) 73 73 . I $P(XQZ1,U,3)'="" W !?8,$P(XQZ1,U,3) … … 129 129 ; 130 130 SORT ;Sort and remove display only 131 N XQZ,XQZ1,XQZ4,XQI,XQK,XQX,XQJ 132 F XQI=0:0 S XQI=$O(^XTV(8992,XQAUSER,"XQA",XQI)) Q:XQI'>0 S XQX=^(XQI,0),XQZ=$G(^(1)),XQZ1=$G(^(2)),XQZ4=$O(^(4,0)) S XQJ=$P(XQX,U,7,8) K:XQJ=U ^XTV(8992,XQAUSER,"XQA",XQI) I XQJ'=U D 133 . S XQACNT=XQACNT+1,XQJ=$S(XQAREV:999999-XQACNT,1:XQACNT),^TMP("XQ",$J,"XQA",XQJ)=XQX,^(XQJ,1)=XQI,^(2)=XQZ,^(3)=XQZ1,^(4)=XQZ4 131 F XQI=0:0 S XQI=$O(^XTV(8992,XQAUSER,"XQA",XQI)) Q:XQI'>0 S XQX=^(XQI,0),XQZ=$G(^(1)),XQZ1=$G(^(2)) S XQJ=$P(XQX,U,7,8) K:XQJ=U ^XTV(8992,XQAUSER,"XQA",XQI) I XQJ'=U D 132 . S XQACNT=XQACNT+1,XQJ=$S(XQAREV:999999-XQACNT,1:XQACNT),^TMP("XQ",$J,"XQA",XQJ)=XQX,^(XQJ,1)=XQI,^(2)=XQZ,^(3)=XQZ1 134 133 S XQK=0 F XQI=0:0 S XQI=$O(^TMP("XQ",$J,"XQA",XQI)) Q:XQI'>0 S XQK=XQK+1 M ^TMP("XQ",$J,"XQA1",XQK)=^TMP("XQ",$J,"XQA",XQI) 135 134 Q -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQALMAKE.m
r628 r636 1 XQALMAKE ;ISC-SF.SEA/JLI- HIGH LEVEL SETUP ALERT ; 4/9/07 14:032 ;;8.0;KERNEL; **443**;Jul 10, 1995;Build 41 XQALMAKE ;ISC-SF.SEA/JLI- HIGH LEVEL SETUP ALERT ;9/23/94 13:28 2 ;;8.0;KERNEL;;Jul 10, 1995 3 3 ;; 4 4 ENTRY ; … … 11 11 R !,"Enter ROUTINE name or ENTRY^ROUTINE name: ",X:DTIME S:'$T X=U G:X=U EXIT G:X="" ASKROU S XQAROU=X S X=$S(X'[U:X,1:$P(X,U,2)) G:X="" ASKROU X ^%ZOSF("TEST") I 'Y W !,"Routine '",X,"' not present" G ASKROU 12 12 SETIT ; 13 I '$D(XQAROU),'$D(XQAOPT) S DIR(0)="Y",DIR("A")="Do you want to make a long text info only alert" D ^DIR K DIR I Y D LONGTEXT14 13 W !!,"As currently entered, this alert will display the following text:",!!,XQAMSG 15 14 W !!,"The alert is currently to be delivered to:" S XQAX="" F I=1:1 S XQAX=$O(XQA(XQAX)) Q:XQAX="" S X=$S(XQAX>0:$P(^VA(200,XQAX,0),U),1:XQAX) W:(I#2) ! W:'(I#2) ?40 W X … … 33 32 S XQALDIC=$S("g.G."[$E(X,1,2):3.8,1:200),X=$S(XQALDIC=3.8:$E(X,3,$L(X)),1:X),DIC=XQALDIC,DIC(0)="EMQ" D ^DIC Q:Y'>0 S X=$S(XQALDIC=3.8:"G."_$P(Y,U,2),1:+Y),XQA(X)="" 34 33 Q 35 ;36 LONGTEXT ;37 W !,"Enter .EXIT to terminate input",!38 S COUNT="" F R X:DTIME Q:X=".EXIT" S COUNT=COUNT+1,XQATEXT(COUNT)=X W !39 Q -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQALSET.m
r628 r636 1 XQALSET ;ISC-SF.SEA/JLI - SETUP ALERTS ; 4/10/07 14:062 ;;8.0;KERNEL;**1,6,65,75,114,125,173,207,285 ,443**;Jul 10, 1995;Build 41 XQALSET ;ISC-SF.SEA/JLI - SETUP ALERTS ;6/24/04 13:46 2 ;;8.0;KERNEL;**1,6,65,75,114,125,173,207,285**;Jul 10, 1995 3 3 ;; 4 4 Q … … 8 8 Q 9 9 ; 10 SETUP1() ; .SR Returns a string beginning with 1 if successful, 0 if not successful, the second piece is the IEN in the Alert Tracking File and the third piece is the value of XQAID. 10 SETUP1() ; .SR Returns a string beginning with 1 if successful, 0 if not successful, the second piece is the IEN in the Alert Tracking File and the third piece is the value of XQAID. 11 11 ; If not successful XQALERR is defined and contains reason for failure. 12 12 K XQALERR … … 23 23 REENT() ; Entry for forwarding, etc. 24 24 N RETVAL S RETVAL=1 25 K ^TMP("XQAGROUP",$J) ; P443 - clear location for storage of groups processed26 25 N XQADATIM,XQALIST,XQALIST1,XQNRECIP S XQNRECIP=0 S XQADATIM=$$NOW^XLFDT() 27 26 S XQALIN1=$S($D(XQAID)#2:XQAID,1:"")_U_$E(XQAMSG,1,80)_"^1^"_$S(XQAOPT1=U:"D",1:"R")_U_$S($D(XQACTMSG):$E(XQACTMSG,1,40),1:"")_U_XQAOPT1 … … 60 59 REP I $D(^XTV(8992,XQJ,"XQA",XQXI,0)) S XQXI=XQXI+.00000001 G REP 61 60 S ^XTV(8992,XQJ,"XQA",XQXI,0)=XQALIN S:$D(XQALIN1) ^(1)=XQALIN1 S:$D(XQAGUID)!$D(XQADFN) ^(3)=$G(XQAGUID)_U_$G(XQADFN) S:$D(XQARESET) ^(2)=XQAUSER_U_XQX_U_$G(XQACOMNT) S ^(0)=$P(^XTV(8992,XQJ,"XQA",0),U,1,2)_U_XQXI_U_($P(^(0),U,4)+1) 62 I $D(XQATEXT) S:($D(XQATEXT)#2) XQATEXT(.1)=XQATEXT D WP^DIE(8992.01,(XQXI_","_XQJ_","),4,"","XQATEXT") ; P443 PUT DATA IN XQATEXT INTO ARRAY61 I $D(XQATEXT) D WP^DIE(8992.01,(XQXI_","_XQJ_","),4,"","XQATEXT") 63 62 L -^XTV(8992,XQJ) 64 63 K XQA(XQJ) S:XQAID'="" ^XTV(8992,"AXQA",XQAID,XQJ,XQXI)="",^XTV(8992,"AXQAN",XQA1,XQJ,XQXI)="" … … 111 110 I RETVAL S RETVAL=RETVAL_U_$G(XQADA)_U_XQAID 112 111 K:XQAID'="" ^XTV(8992,"AXQA",XQAID,0,0) 113 K ^TMP("XQAGROUP",$J) ; P443 - clear global used to track processing of groups114 112 K XQA,XQALIN,XQALIN1,XQAMSG,XQAID,XQAFLG,XQAOPT,XQAOPT1,XQAROU,XQADATA,XQI,XQX,XQJ,XQK,XQA1,XQACTMSG,XQJ,XQXI,XQAARCH,XQACNDEL,XQAREVUE,XQASUPV,XQASURO,XQATEXT 115 113 Q RETVAL -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQALSET1.m
r628 r636 1 XQALSET1 ;ISC-SF.SEA/JLI - SETUP ALERTS (OVERFLOW) ; 4/9/07 10:262 ;;8.0;KERNEL;**285 ,443**;Jul 10, 1995;Build 41 XQALSET1 ;ISC-SF.SEA/JLI - SETUP ALERTS (OVERFLOW) ;10/20/03 15:03 2 ;;8.0;KERNEL;**285**;Jul 10, 1995 3 3 ;; 4 4 Q 5 GROUP ; 5 GROUP ; 6 6 N XQI,XQL,XQL1,XQL2,XQLIST 7 S XQL=$E(XQJ,3,$L(XQJ)) ; P443 - changed from code that forced upper case 8 I $D(^TMP("XQAGROUP",$J,XQL)) Q ; P443 group has already been processed - prevent cycling 9 S ^TMP("XQAGROUP",$J,XQL)="" ; P443 mark that the group has been seen 7 S XQL="" F XQI=3:1:$L(XQJ) S XQL1=$E(XQJ,XQI) S:XQL1?1L XQL1=$C($A(XQL1)-32) S XQL=XQL_XQL1 8 ;S XQI=$O(^XMB(3.8,"B",XQL,0)) I XQI'>0 S XQL1=$O(^XMB(3.8,"B",XQL)) I $E(XQL1,1,$L(XQL))=XQL S XQL2=$O(^(XQL1)) I $E(XQL2,1,$L(XQL))'=XQL S XQI=$O(^(XQL1,0)) 9 ;I XQI>0 F XQL=0:0 S XQL=$O(^XMB(3.8,XQI,1,XQL)) Q:XQL'>0 S XQA(+^(XQL,0))="" 10 ; Above code replaced to use Fileman calls, also code added to walk through member groups as well 030203 JLI P285 10 11 S XQI=$$FIND1^DIC(3.8,,"X",XQL) Q:XQI'>0 11 12 N XQLIST D LIST^DIC(3.81,","_XQI_",",".01","I",,,,,,,.XQLIST) I XQLIST("ORDER")>0 D … … 13 14 . Q 14 15 K @XQLIST,XQLIST D LIST^DIC(3.811,","_XQI_",",".01",,,,,,,,.XQLIST) I XQLIST("ORDER")>0 D 15 . N XQAGROUP M XQAGROUP=@XQLIST@("ID") ; P443 - store group list data locally so it is not over written by recursive call to LIST^DIC 16 . N XQI F XQI=0:0 S XQI=$O(XQAGROUP(XQI)) Q:XQI'>0 N XQJ S XQJ="G."_XQAGROUP(XQI,.01) D GROUP ; P443 - change to reference XQAGROUP 16 . N XQI F XQI=0:0 S XQI=$O(@XQLIST@("ID",XQI)) Q:XQI'>0 N XQJ S XQJ="G."_^(XQI,.01) D GROUP 17 17 . Q 18 K @XQLIST,XQLIST19 18 K XQA(XQJ) 20 19 D CHEKACTV(.XQA) … … 27 26 Q 28 27 ; 29 CHEKUSER(XQAUSER) ; Returns 0 if no valid user or surrogate, otherwise returns IEN of user or surrogate28 CHEKUSER(XQAUSER) ;SR. Returns 0 if no valid user or surrogate, otherwise returns IEN of user or surrogate 30 29 N VALUE 31 30 S VALUE=$$ACTVSURO^XQALSURO(XQAUSER) -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQALSUR1.m
r628 r636 1 XQALSUR1 ;ISC-SF.SEA/JLI - SURROGATES FOR ALERTS ; 11/21/07 08:352 ;;8.0;KERNEL;**366 ,443**;Jul 10, 1995;Build 41 XQALSUR1 ;ISC-SF.SEA/JLI - SURROGATES FOR ALERTS ;9/6/05 14:26 2 ;;8.0;KERNEL;**366**;Jul 10, 1995 3 3 Q 4 4 ; … … 92 92 SURRO11 ; 93 93 S XQALSURO=$$NEWDLG() I XQALSURO'>0 Q 94 I $$CYCLIC^XQALSURO(XQALSURO,XQAUSER)'>0 W $C(7),!,$$CYCLIC^XQALSURO(XQALSURO,XQAUSER),! G SURRO1 194 I $$CYCLIC^XQALSURO(XQALSURO,XQAUSER)'>0 W $C(7),!,$$CYCLIC^XQALSURO(XQALSURO,XQAUSER),! G SURRO1 95 95 S XQALSTRT=+$$STRTDLG() I XQALSTRT<0 Q 96 96 S XQALEND=+$$ENDDLG() I XQALEND<0 Q … … 104 104 S XQALSURO=$G(XQALSURO),XQALSTRT=$G(XQALSTRT) 105 105 N XQALFM,XQALXREF,XQALSTR1,XQALSUR1,XQALNOW,XQALEND,XQA0 106 ; ZEXCEPT: XQATEST (EXTERNAL VALUE - INDICATING TEST BEING RUN) 106 107 D CHEKSUBS^XQALSUR2(XQAUSER) 107 108 S XQALSUR1=+$P($G(^XTV(8992,XQAUSER,0)),U,2) S:XQALSURO'>0 XQALSURO=XQALSUR1 … … 116 117 DELETENT(XQAUSER,XQALXREF,XQALSURO,XQALSTRT,XQALSUR1,XQALSTR1,XQALEND) ; 117 118 N XQALNOW,XQALFM 119 ; ZEXCEPT: XQATEST (EXTERNAL VALUE - INDICATING TEST BEING RUN) 118 120 S XQAUSER=XQAUSER_",",XQALXREF=XQALXREF_","_XQAUSER 119 121 I XQALXREF>0 D … … 129 131 . Q 130 132 I $D(XQALFM) D FILE^DIE("","XQALFM") 131 ; ZEXCEPT: XTMUNIT (EXTERNAL VALUE - INDICATING UNIT TEST BEING RUN) 132 I XQALSURO>0,'$D(XTMUNIT) D 133 I XQALSURO>0,'$D(XQATEST) D 133 134 . N XQAMESG,XMSUB,XMTEXT 134 135 . S XQAMESG(1,0)="You have been REMOVED as a surrogate recipient for alerts for" -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQALSURO.m
r628 r636 1 XQALSURO ;ISC-SF.SEA/JLI - SURROGATES FOR ALERTS ; 3/17/08 15:202 ;;8.0;KERNEL;**114,125,173,285,366 ,443**;Jul 10, 1995;Build 41 XQALSURO ;ISC-SF.SEA/JLI - SURROGATES FOR ALERTS ;9/6/05 15:13 2 ;;8.0;KERNEL;**114,125,173,285,366**;Jul 10, 1995 3 3 ;; 4 4 Q … … 16 16 D SURRO1^XQALSUR1(XQAUSER) 17 17 Q 18 ; P366 - optional start and end dates added to permit identification of cyclical surrogates in specific times 18 19 CYCLIC(XQALSURO,XQAUSER,XQASTRT,XQAEND) ; code added to prevent cyclical surrogates 19 I '$$ACTIVE^XUSER(XQALSURO) Q "You cannot have an INACTIVE USER ("_XQALSURO_") as a surrogate!" ;P44320 I XQALSURO=XQAUSER Q "You cannot specify yourself as your own surrogate!" ; moved in P44321 20 I $G(XQASTRT)>0 Q $$DCYCLIC^XQALSUR1(XQALSURO,XQAUSER,XQASTRT,$G(XQAEND)) 22 21 N XQALSTRT 22 I XQALSURO=XQAUSER Q "You cannot specify yourself as your own surrogate!" 23 23 S XQALSTRT=$$CURRSURO(XQALSURO) I XQALSTRT>0 D 24 . I XQALSTRT=XQAUSER S XQALSURO="YOU are designated as the surrogate for this user ("_XQALSURO_")- can't do it!" Q24 . I XQALSTRT=XQAUSER S XQALSURO="YOU are designated as the surrogate for this user - can't do it!" Q 25 25 . F S XQALSTRT=$$CURRSURO(XQALSTRT) Q:XQALSTRT'>0 I XQALSTRT=XQAUSER S XQALSURO="This forms a circle which leads back to you - can't do it!" Q 26 26 . Q 27 27 Q XQALSURO 28 28 ; 29 SETSURO(XQAUSER,XQALSURO,XQALSTRT,XQALEND) ; Use SETSURO1 instead 30 N XQALVAL ; P443 31 S XQALVAL=$$SETSURO1(XQAUSER,XQALSURO,$G(XQALSTRT),$G(XQALEND)) ; P443 32 Q 33 ; 34 SETSUROX(XQAUSER,XQALSURO,XQALSTRT,XQALEND) ; SETSURO CODE MOVED TO HERE TO PERMIT AN ERROR TO BE GENERATED AT THE OLD ENTRY POINT 29 SETSURO(XQAUSER,XQALSURO,XQALSTRT,XQALEND) ; SR 35 30 N XQALFM,XQALIEN,XQAIENS 36 31 I $G(XQAUSER)'>0 Q … … 60 55 S XMSUB="Surrogate Recipient for "_$$GET1^DIQ(200,XQAIENS,.01,"E") 61 56 S XMTEXT="XQAMESG(" 62 ; ZEXCEPT: XTMUNIT - Defined if unit tests are being run 63 D:'$D(XTMUNIT) SENDMESG 57 D:'$D(XQATEST) SENDMESG 64 58 Q 65 59 ; … … 80 74 N XQAVAL 81 75 S XQAVAL=$$CYCLIC(XQALSURO,XQAUSER,XQALSTRT,$G(XQALEND)) I XQAVAL'>0 Q XQAVAL ; Can't use as surrogate 82 D SETSURO X(XQAUSER,XQALSURO,XQALSTRT,$G(XQALEND)) ; P44376 D SETSURO(XQAUSER,XQALSURO,XQALSTRT,$G(XQALEND)) 83 77 Q XQALSURO 84 78 ; … … 108 102 ; 109 103 ; P366 - find the latest start time which is now or past or the first one in the future 110 S XQANOW=$$NOW^XLFDT() D 104 S XQANOW=$$NOW^XLFDT() 105 ;I $P($G(^XTV(8992,XQAUSER,0)),U,2)'>0 D 106 D 111 107 . S XQAIVAL=0,XQASTR1=0 112 108 . F XQASTRT=0:0 S XQASTRT=$O(^XTV(8992,XQAUSER,2,"B",XQASTRT)) Q:XQASTRT'>0 Q:XQASTRT'<XQANOW S XQASTR1=XQASTRT F XQAI=0:0 S XQAI=$O(^XTV(8992,XQAUSER,2,"B",XQASTRT,XQAI)) Q:XQAI'>0 D … … 124 120 I $P(X,U,2)>0,+$P(X,U,3)'>XQANOW D I $P($G(^XTV(8992,XQAUSER,0)),U,2)>0 Q +$P(^XTV(8992,XQAUSER,0),U,2) 125 121 . N DATE ; Get Current date/time to check date/times if present 126 . ; FOLLOWING LINES MODIFIED IN P443 TO ELIMINATE A STACK ERROR WHEN SURROGATE WAS CIRCULAR 127 . ; Current Date/time past End date for surrogate 128 . S DATE=$P(X,U,4) I (DATE>0&(DATE<XQANOW)) D REMVSURO(XQAUSER) Q 129 . N XQASURO,XQASURO1 S XQASURO1=+$P(^XTV(8992,XQAUSER,0),U,2) 130 . ; REMOVE IF SURROGATE IS USER 131 . I XQASURO1=XQAUSER D REMVSURO(XQAUSER) Q 132 . N XQALLIST S XQALLIST(XQAUSER)="" 133 . ; REMOVE IF CYCLES BACK TO USER - thought about removing inactive, but best to let those be handled by groups for unprocessed alerts 134 . F S XQASURO=$P($G(^XTV(8992,XQASURO1,0)),U,2) Q:XQASURO'>0 Q:'$$ISACTIVE(XQASURO) S XQASURO1=XQASURO D 135 . . I $D(XQALLIST(XQASURO)) D REMVSURO(XQASURO) S XQASURO1=XQAUSER K XQALLIST S XQALLIST(XQAUSER)="" Q 136 . . S XQALLIST(XQASURO1)="" 137 . . Q 138 . ; END OF P443 MODIFICATION 122 . ; Current Date/time past End date for surrogate or cyclic relationship remove checks for new surrogate 123 . S DATE=$P(X,U,4) I (DATE>0&(DATE<XQANOW))!('$$CYCLIC($P(X,U,2),XQAUSER)) D REMVSURO(XQAUSER) 139 124 . Q 140 125 Q -1 141 ;142 ISACTIVE(XQAUSER) ; checks for whether a surrogate relationship is active or not (returns 0 or 1)143 N DATA144 S DATA=$G(^XTV(8992,XQAUSER,0)) Q:$P(DATA,U,2)="" 0 ; NO SURROGATE SPECIFIED145 I $P(DATA,U,3)>0,$P(DATA,U,3)>$$NOW^XLFDT() Q 0 ; START DATE/TIME NOT YET146 I $P(DATA,U,4)>0,$P(DATA,U,4)<$$NOW^XLFDT() Q 0 ; PAST END DATE/TIME147 Q 1148 126 ; 149 127 ACTVSURO(XQAUSER) ;SR. - returns the actual surrogate at this time -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQARPRT2.m
r628 r636 1 XQARPRT2 ;DCN/BUF,JLI/OAK-OIFO - LOOKUP PROVIDER ALERTS ;4/9/07 10:162 ;;8.0;KERNEL;**316 ,443**;Jul 10, 1995;Build 41 XQARPRT2 ;DCN/BUF,JLI/OAK-OIFO - LOOKUP PROVIDER ALERTS 25 SEP 98 ;9/3/03 11:15 2 ;;8.0;KERNEL;**316**;Jul 10, 1995 3 3 ; Based on the original routine AEKALERT 4 4 Q … … 13 13 N XQANWID,XQAIEN,XQADATE,XQANODE0,XQACTR,HEADERID,XQATOT 14 14 S HEADERID="User "_$$GET1^DIQ(200,XQADOC_",",.01)_" (DFN="_XQADOC_")" 15 U IO16 15 D HEADER(HEADERID,1) 17 16 S XQAIEN=$O(^XTV(8992.1,"D",XQASDATE-.0000001)) I XQAIEN>0 S XQAIEN=$O(^(XQAIEN,0)) ; find starting point instead of having to work up through x-ref … … 20 19 . D PRNTATRK(XQAIEN) 21 20 D HEADER(HEADERID,0) 22 D ^%ZISC23 21 K XQADATE,XQACTR,DATA,DIR,DIRUT,XQADOC,XQAIEN,XQANODE0,XQASDATE,Y 24 22 Q … … 47 45 . Q 48 46 ; 49 I $D(XQAWORDS)>1,$G(TYPE)="" D 47 I $D(XQAWORDS)>1,$G(TYPE)="" D 50 48 . S DIR(0)="SO^1:Both Action and Info Only;2:Action Alerts;3:Info Only Alerts",DIR("?",1)="Select whether alerts listed should be alerts involving actions (2), info",DIR("?")="only or text only alerts (3), or both (1)." 51 49 . S DIR("A")="Select Alert Type(s) desired",DIR("B")=1 D ^DIR K DIR S:Y'>0 Y=1 K DIRUT S XQADISP=+Y … … 82 80 S XQACTR=XQACTR+2 I XQACTR>(IOSL-4) D Q:$D(DIRUT) S XQACTR=0 83 81 . I $D(ZTQUEUED) W @IOF 84 . E U IO(0) S DIR(0)="E" D ^DIR K DIR W ! 85 . U IO 82 . E S DIR(0)="E" D ^DIR K DIR W ! 86 83 . Q 87 84 Q -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQCHK.m
r628 r636 1 XQCHK ; SEA/MJM - Check security on option # XQCY ;5/20/08 2 ;;8.0;KERNEL;**47,110,149,303,427,503**;Jul 10, 1995;Build 2 3 ;;"Per VHA Directive 2004-038, this routine should not be modified". 4 ; 1 XQCHK ; SEA/MJM - Check security on option # XQCY ; [7/19/06 10:45am] 2 ;;8.0;KERNEL;**47,110,149,303,427**;Jul 10, 1995;Build 3 5 3 Q:'$D(XQCY)!(XQCY<1) S:'$D(XQJMP) XQJMP=0 6 4 I '$D(XQY0) S XQY0=^DIC(19,+XQCY,0) … … 18 16 Q 19 17 ; 20 OUT K %,%XQI,XQCY0,%Y,XQZ 18 OUT ;I XQCY=-2 W !,"Locked...Do you have the key "_$P(XQRT,"^",2) 19 ;I XQCY=-3 W !,"Reversed Locked...Don't you have the key "_$P(XQRT,"^",2) 20 K %,%XQI,XQCY0,%Y,XQZ 21 21 Q 22 22 ; … … 67 67 Q % 68 68 ; 69 ; 69 70 ACCESS(%XQUSR,%XQOP) ;Find out if a user has access to a particular option 70 Q $$ACCESS^XQCHK3(%XQUSR,%XQOP) 71 ; 72 ; W $$ACCESS(DUZ,Option IEN) returns: 73 ; 74 ;-1:no such user in the New Person File 75 ;-2: User terminated or has no access code 76 ;-3: no such option in the Option File 77 ;0: no access found in any menu tree the user owns 78 ; 79 ; All other cases return a 4-piece string stating 80 ; access ^ menu tree IEN ^ a set of codes ^ key 81 ; 82 ;O^tree^codes^key: No access because of locks (see XQCODES below) 83 ; where 'tree' is the menu where access WOULD be allowed 84 ; and 'key' is the key preventing access 85 ;1^OpIEN^^: Access allowed through Primary Menu 86 ;2^OpIEN^codes^: Access found in the Common Options 87 ;3^OpIEN^codes^: Access found in top level of secondary option 88 ;4^OpIEN^codes^: Access through a the secondary menu tree OpIEN. 89 ; 90 ;XQCODES can contain: 91 ; N=No Primary Menu in the User File (warning only) 92 ; L=Locked and the user does not have the key (forces 0 in first piece) 93 ; R=Reverse lock and user has the key (forces 0 in first piece) 94 ; 95 I '$D(^VA(200,%XQUSR,0)) Q -1 96 N %,DT 97 S DT=$$HTFM^XLFDT($H,1) 98 S %=^VA(200,%XQUSR,0) I ($P(%,U,3)="")!($L($P(%,U,11))&($P(%,U,11)'>DT)) Q -2 99 ; 100 ;Convert %XQOP to its IEN if the name is passed 101 I +%XQOP'=%XQOP D 102 .I $D(^DIC(19,"B",%XQOP))<1 S %XQOP=0 Q 103 .E S %XQOP=$O(^DIC(19,"B",%XQOP,0)) 104 .Q 105 I '%XQOP Q -3 106 I '$D(^DIC(19,%XQOP,0)) Q -3 107 ; 108 N XQCODES,XQCOM,XQDIC,XQDONE,XQI,XQJ,XQKEY,XQOK,XQPM,XQRSLT,XQSEC,XQTREE 109 S (%,XQDONE,XQOK)=0,(XQRSLT,XQCODES,XQTREE)="" 110 ; 111 ; 112 ;Look in the user's primary menu tree 113 S XQPM=$P($G(^VA(200,%XQUSR,201)),"^") 114 I 'XQPM S XQCODES=XQCODES_"N" 115 ; 116 ; 117 I XQPM S XQDIC="P"_XQPM I $D(^XUTL("XQO",XQDIC,"^",%XQOP)) D 118 .D KEYS 119 .I XQCODES'["L"&(XQCODES'["M") S XQOK=1 120 .Q 121 I XQOK Q "1^"_XQPM_"^"_XQCODES 122 I XQCODES["L"!(XQCODES["R") S XQRSLT="0^"_XQPM_"^"_XQCODES_"^"_XQKEY 123 ; 124 ; Search the common options 125 S XQCOM=$O(^DIC(19,"B","XUCOMMAND",0)) 126 S XQDIC="PXU" 127 I $D(^XUTL("XQO",XQDIC,"^",%XQOP)) D 128 .D KEYS 129 .I XQCODES'["L"&(XQCODES'["R") S XQOK=1 130 .Q 131 I XQOK Q "2^"_XQCOM_"^"_XQCODES 132 I XQRSLT="" I XQCODES["L"!(XQCODES["R") S XQRSLT="0^"_XQCOM_"^"_XQCODES_"^"_XQKEY 133 ; 134 ;Check the top level of the secondary options 135 S XQDIC="U"_%XQUSR 136 I $D(^VA(200,%XQUSR,203,0)),$P(^(0),U,4)>0 D 137 .S XQJ=0,XQDONE=0 138 .F XQI=1:1 D Q:XQDONE 139 ..S XQJ=$O(^VA(200,%XQUSR,203,XQJ)) 140 ..I (XQJ'=+XQJ)!('XQJ) S XQDONE=1 Q 141 ..S XQSEC(XQI)=+^VA(200,%XQUSR,203,XQJ,0) 142 ..Q:XQSEC(XQI)'=%XQOP 143 ..D KEYS 144 ..I XQCODES'["L"&(XQCODES'["R") S XQOK=1 145 ..I XQRSLT="" I XQCODES["L"!(XQCODES["R") S XQRSLT="0^"_XQSEC(XQI)_"^"_XQCODES_"^"_XQKEY 146 ..Q 147 .Q 148 I XQOK Q "3^"_%XQOP_"^"_XQCODES 149 ; 150 ;If there are no secondaries quit here 151 I '$D(XQI)&((XQCODES["L")!(XQCODES["R")) Q XQRSLT 152 I '$D(XQI) Q 0 153 ; 154 ;Check each secondary menu tree 155 F XQK=1:1:XQI-1 Q:XQOK D 156 .S XQDIC="P"_XQSEC(XQK) 157 .Q:'$D(^XUTL("XQO",XQDIC,"^",%XQOP)) 158 .S XQTREE=$P(XQDIC,"P",2) 159 .D KEYS 160 .I XQCODES'["L"&(XQCODES'["R") S XQOK=1 161 .I XQRSLT="" I XQCODES["L"!(XQCODES["R") S XQRSLT="0^"_XQTREE_"^"_XQCODES_"^"_XQKEY 162 .Q 163 I XQOK Q "4^"_XQTREE_"^"_XQCODES 164 I XQRSLT]"" Q XQRSLT 165 ; 166 ;We doan find nothing nowhere 167 Q "0^^"_XQCODES 168 ; 169 KEYS ;Check for keys, reverse keys... 170 N XQK,XQN,XQOPIQ,KFG 171 D CHCK1^XQCHK1 Q:KFG=1 172 I $D(^XUTL("XQO",XQDIC,"^",%XQOP)) S XQOPIQ=^(%XQOP) 173 E S XQOPIQ=U_^DIC(19,%XQOP,0) 174 ; 175 I $L($P(XQOPIQ,U,7)) D 176 .S %=$P(XQOPIQ,U,7) 177 .F XQN=1:1 S XQK=$P(%,",",XQN) Q:XQK="" D 178 ..I '$D(^XUSEC(XQK,%XQUSR)) S XQCODES=XQCODES_"L",XQKEY=XQK 179 ..Q 180 .Q 181 ; 182 I $L($P(XQOPIQ,U,17)) D 183 .S %=$P(XQOPIQ,U,17) 184 .F XQN=1:1 S XQK=$P(%,",",XQN) Q:XQK="" D 185 ..I $D(^XUSEC(XQK,%XQUSR)) S XQCODES=XQCODES_"R",XQKEY=XQK 186 ..Q 187 .Q 188 Q 71 189 ; 72 190 OPACCES ;Entry point for the option that checks to see if a user has 73 191 ;access to a particular option by calling the above function. 74 D OPACCES^XQCHK3 192 N %,DIC,X,XQANS,XQCODES,XQK,XQKEY,XQOPT,XQOPN,XQPTR,XQRSLT,XQTREE,XQUSER,XQUSN,Y 193 ; 194 S DIC(0)="AEMNQ",DIC="^VA(200,",DIC("A")="Please enter the user's name: " D ^DIC 195 I $D(DUOUT)!($D(DTOUT)) D KILLFM Q 196 I Y=-1 W !!?5,"Sorry we couldn't find that user in the New Person File.",! 197 E S XQUSN=+Y,XQUSER=$P(Y,U,2) 198 I Y=-1 D KILLFM Q 199 D KILLFM 200 ; 201 S DIC(0)="AEMNQ",DIC="^DIC(19,",DIC("A")="Please enter the name of the option: " D ^DIC 202 I $D(DUOUT)!($D(DTOUT)) D KILLFM Q 203 I Y=-1 W !!?5,"Sorry we couldn't find that option.",! 204 E S XQOPN=+Y,XQOPT=$P(Y,U,2) 205 I Y=-1 D KILLFM Q 206 D KILLFM 207 ; 208 S XQANS=$$ACCESS(XQUSN,XQOPN) 209 ;W !,XQANS,! 210 ; 211 S XQRSLT=+XQANS,XQTREE="" 212 S XQPTR=$P(XQANS,U,2) I XQPTR>0 S XQTREE=$P(^DIC(19,$P(XQANS,U,2),0),U) 213 S XQCODES=$P(XQANS,U,3),XQKEY=$P(XQANS,U,4) 214 ; 215 I XQRSLT=-1 W !!?5,"User ",XQUSER," is not in the New Person File." 216 I XQRSLT=-2 W !!?5,"User ",XQUSER," has an active termination date,",!?5,"or no verify code." 217 I XQRSLT=-3 W !!?5,"Option ",XQOPT," is not in the Option File." 218 I XQRSLT=0 D 219 .W !!?5,"User ",XQUSER," does not have access to the option",!?5,XQOPT,"." 220 .I XQCODES["L" W !!?5,"There is a lock somewhere in the menu tree "_XQTREE,!?5,"and the user does not hold the key "_XQKEY_"." 221 .I XQCODES["R" W !!?5,"There is a reverse lock somewhere in the menu tree "_XQTREE,!?5,"and the user holds the key "_XQKEY_"." 222 .Q 223 I XQRSLT=1 W !!?5,"User ",XQUSER," has access to the option ",XQOPT,!?5,"through the primary menu ",XQTREE," (",$P(^DIC(19,XQPTR,0),U,2),")." 224 I XQRSLT=2 W !!?5,"User ",XQUSER," has access to the option ",XQOPT,!?5,"through the Common Options (XUCOMMAND)." 225 I XQRSLT=3 W !!?5,"User ",XQUSER," has access to the option ",XQOPT,!?5,"as a top-level secondary menu option." 226 I XQRSLT=4 W !!?5,"User ",XQUSER," has access to the option ",XQOPT,!?5,"through the secondary menu tree ",XQTREE," (",$P(^DIC(19,XQPTR,0),U,2),")." 227 W ! 228 ;W !!,%," ",XQUSER," ",XQOPT 229 Q 230 ; 231 KILLFM ;Kill off the FileMan variables 232 K D0,DI,DIC,DIE,DISYS,DQ,DR,DUOUT,DTOUT,X,Y 75 233 Q 76 234 ; -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQCHK2.m
r628 r636 1 XQCHK2 ; OAK-BP/BDT - Internal APIs to check Keys for options; 5/20/08 2 ;;8.0;KERNEL;**427,503**;Jul 10, 1995;Build 2 3 ;;"Per VHA Directive 2004-038, this routine should not be modified". 4 Q 5 ;; These Internal Kernel APIs are using in the routine XQCHK 6 ;; to check Keys for options 7 ;; 8 CHCKL(XQCY0,XQDUZ) ;Entry point for checking all Locks for an option 9 ;; XQCY0 is $P(^XUTL("XQO",XQDIC,"^",%XQOP),"^",2,99) 10 ;; XQDUZ is IEN of user 11 ;; Return XQRT: Zero or 1^Key found that user needed for the option 12 S XQCY0=$G(XQCY0) 1 XQCHK2 ; BP/BDT - GET CALL FROM XQCHK ; [7/19/06 10:45am] 2 ;;8.0;KERNEL;**427**;Jul 10, 1995;Build 3 3 ; Entry point for checking all Locks for a option 4 CHCKL(XQCY0,DUZ) ; 13 5 N XQI,XQY,XQX,XQRT,XQK S (XQRT,XQX)=0 14 ;check Key for the option; p45715 S XQY=$P(XQCY0,"^"),XQX=$$GETIEN(XQY)16 I +XQX S XQK=$$GET1^DIQ(19,XQX,3)17 I $G(XQK)'="",'$D(^XUSEC(XQK,XQDUZ)) S XQRT=1_"^"_XQK Q XQRT18 ;loop through higher menu options.19 6 S XQY=$P(XQCY0,"^",5) 20 7 F XQI=1:1 S XQX=$P(XQY,",",XQI) Q:'XQX D 21 . I +XQX S XQK=$$GET1^DIQ(19,XQX,3) I XQK'="",'$D(^XUSEC(XQK, XQDUZ)) S XQRT=1_"^"_XQK Q8 . I +XQX S XQK=$$GET1^DIQ(19,XQX,3) I XQK'="",'$D(^XUSEC(XQK,DUZ)) S XQRT=1_"^"_XQK Q 22 9 Q XQRT 23 ; 24 CHCKRL(XQCY0,XQDUZ) ;Entry point for checking all Reversed Locks for an option 25 ;; XQCY0 is $P(^XUTL("XQO",XQDIC,"^",%XQOP),"^",2,99) 26 ;; XQDUZ is IEN of user 27 ;; Return XQRT: Zero or 1^Reversed Key found that user has 28 S XQCY0=$G(XQCY0) 10 ; Entry point for checking all Reversed Locks for a option 11 CHCKRL(XQCY0,DUZ) ; 29 12 N XQI,XQY,XQX,XQRT,XQK S (XQRT,XQX)=0 30 ;check Reversed Key for the option; p45731 S XQY=$P(XQCY0,"^"),XQX=$$GETIEN(XQY)32 I +XQX S XQK=$$GET1^DIQ(19,XQX,3.01)33 I $G(XQK)'="",$D(^XUSEC(XQK,XQDUZ)) S XQRT=1_"^"_XQK Q XQRT34 ;loop through higher menu options.35 13 S XQY=$P(XQCY0,"^",5) 36 14 F XQI=1:1 S XQX=$P(XQY,",",XQI) Q:'XQX D 37 . I +XQX S XQK=$$GET1^DIQ(19,XQX,3.01) I XQK'="",$D(^XUSEC(XQK, XQDUZ)) S XQRT=1_"^"_XQK Q15 . I +XQX S XQK=$$GET1^DIQ(19,XQX,3.01) I XQK'="",$D(^XUSEC(XQK,DUZ)) S XQRT=1_"^"_XQK Q 38 16 Q XQRT 39 ;40 GETIEN(XQNAME) ;get IEN for an option; 45741 ;; XQNAME is name of an option42 ;; Retrun XQIEN: Null or IEN if existed43 N XQIEN S XQIEN=""44 I $G(XQNAME)="" Q XQIEN45 I '$D(^DIC(19,"B",XQNAME)) Q XQIEN46 S XQIEN=$O(^DIC(19,"B",XQNAME,XQIEN))47 Q XQIEN48 ;49 CHKTOPL(XQIEN,XQDUZ) ;Check Lock for the top level of the secondary options50 ;this need to be called to check the top level first when check the51 ;Locks for lower menu option because the 6th piece of ^XUTL does not52 ;contain the IEN of the top menu option.53 N XQRT,XQK S XQRT=054 I XQIEN'=+$G(XQIEN) Q XQRT55 S XQK=$$GET1^DIQ(19,XQIEN,3)56 I $G(XQK)'="",'$D(^XUSEC(XQK,XQDUZ)) S XQRT=1_"^"_XQK57 Q XQRT58 ;59 CHKTOPRL(XQIEN,XQDUZ) ;Check Reversed Lock the top level of the secondary options60 ;this need to be called to check the top level first when check the61 ;Reversed Locks for lower menu option because the 6th piece of ^XUTL does not62 ;contain the IEN of the top menu option.63 N XQRT,XQK S XQRT=064 I XQIEN'=+$G(XQIEN) Q XQRT65 S XQK=$$GET1^DIQ(19,XQIEN,3.01)66 I $G(XQK)'="",$D(^XUSEC(XQK,XQDUZ)) S XQRT=1_"^"_XQK67 Q XQRT -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQOR.m
r628 r636 1 XQOR ; SLC/KCM - Prepare to Unwind Options ;5/24/94 17:58 ; 2 ;;8.0;KERNEL;**48,56**;Jul 10, 1995 1 XQOR ; SLC/KCM - Prepare to Unwind Options ;4/3/07 16:21 2 ;;8.0;KERNEL;**48,56,437**;Jul 10, 1995;Build 22 3 ; Modified from FOIA VISTA, 4 ; Copyright (C) 2007 WorldVistA 5 ; 6 ; This program is free software; you can redistribute it and/or modify 7 ; it under the terms of the GNU General Public License as published by 8 ; the Free Software Foundation; either version 2 of the License, or 9 ; (at your option) any later version. 10 ; 11 ; This program is distributed in the hope that it will be useful, 12 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 13 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 ; GNU General Public License for more details. 15 ; 16 ; You should have received a copy of the GNU General Public License 17 ; along with this program; if not, write to the Free Software 18 ; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 3 19 S DIC=19,DIC(0)="AEMQ" D ^DIC K DIC Q:Y<0 S X=+Y_";DIC(19," 4 20 EN ;Process options/protocols from top … … 12 28 S XQORNEST(XQORS)=^TMP("XQORS",$J,XQORS,"VPT"),XQORNEST=XQORS 13 29 G:'$D(@(^TMP("XQORS",$J,XQORS,"REF")_"0)")) EX S ^TMP("XQORS",$J,XQORS,"FLG")=$P(^(0),"^",4)_"^^" G:$P(^TMP("XQORS",$J,XQORS,"FLG"),"^")'?1A EX 14 I $L($P(@(^TMP("XQORS",$J,XQORS,"REF")_"0)"),"^",3)) W !!,$P(^(0),"^",3),! D READ^XQOR4 G EX 30 ; LOCAL MOD VWSD SILENTMODE ECHO SDAM EVENTS (VARIABLE XQORMUTE) 31 I $L($P(@(^TMP("XQORS",$J,XQORS,"REF")_"0)"),"^",3)) W:'$D(ZTSK)&'$D(XQORMUTE) !!,$P(^(0),"^",3),! D:'$D(ZTSK)&'$D(XQORMUTE) READ^XQOR4 G EX 32 ;I $L($P(@(^TMP("XQORS",$J,XQORS,"REF")_"0)"),"^",3)) W !!,$P(^(0),"^",3),! D READ^XQOR4 G EX 33 ;END LOCAL MODE 15 34 D C19^XQOR4 G:Y<0 EX 16 35 S ^TMP("XQORS",$J,0,"FILE")=";"_$P(^TMP("XQORS",$J,XQORS,"VPT"),";",2),^TMP("XQORS",$J,XQORS,"INP")="" -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQOR4.m
r628 r636 1 XQOR4 ; SLC/KCM - Process "^^" jump ;11/18/92 09:53 ; 2 ;;8.0;KERNEL;**56,62**;Jul 10, 1995 1 XQOR4 ; SLC/KCM - Process "^^" jump ;1/23/07 15:36 2 ;;8.0;KERNEL;**56,62,437**;Jul 10, 1995;Build 22 3 ; Modified from FOIA VISTA, 4 ; Copyright (C) 2007 WorldVistA 5 ; 6 ; This program is free software; you can redistribute it and/or modify 7 ; it under the terms of the GNU General Public License as published by 8 ; the Free Software Foundation; either version 2 of the License, or 9 ; (at your option) any later version. 10 ; 11 ; This program is distributed in the hope that it will be useful, 12 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 13 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 ; GNU General Public License for more details. 15 ; 16 ; You should have received a copy of the GNU General Public License 17 ; along with this program; if not, write to the Free Software 18 ; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 3 19 DJMP ;From: STAK^XQOR1 4 20 Q:'$D(^TMP("XQORS",$J,XQORS,"ITM",^TMP("XQORS",$J,XQORS,"ITM"),"IN")) … … 21 37 Q:'$D(@(^TMP("XQORS",$J,XQORS,"REF")_"0)")) S X=$P(^(0),"^",2) W:X'?1." " !!?(36-($L(X)\2)),"--- "_X_" ---" 22 38 Q 23 READ W !,"Press RETURN to continue: " R X:$S($D(DTIME):DTIME,1:300) 39 ;VWSD LOCAL MOD STARTED HERE, XQ SILENT MODE . VARIABLE XQORMUTE 40 READ I '$D(XQORMUTE) W !,"Press RETURN to continue: " R X:$S($D(DTIME):DTIME,1:300) 41 ;READ W !,"Press RETURN to continue: " R X:$S($D(DTIME):DTIME,1:300) 42 ;END LOCAL MOD 24 43 Q 25 44 C19 N X0 S X0=@(^TMP("XQORS",$J,XQORS,"REF")_"0)"),X=$P(X0,"^",6) I $L(X),'$D(^XUSEC(X,DUZ)) W !!,"This option "_$P(X0,"^")_" is locked.",! D READ S Y=-1 Q -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQORC.m
r628 r636 1 XQORC ; DRIVER FOR COMPILED XREFS FOR FILE #101 ; 10/15/041 XQORC ; DRIVER FOR COMPILED XREFS FOR FILE #101 ; 01/30/05 2 2 ; 3 3 N DH,DU,DIKILL,DISET,DIKJ,DIKZ,DIKYR,DIKZA,DIK0Z,DIKZK,DIKDP,DIKM1,DIKUP,DIKUM,DV,DIIX,DIKF,DIAU,DIKNM,DIKDA,DIKLK,DIKLM,DIKY,DIXR,DIKCOND,DIKSVDA,DIKPUSH,X1,X2 -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQORC1.m
r628 r636 1 XQORC1 ; COMPILED XREF FOR FILE #101 ; 10/15/041 XQORC1 ; COMPILED XREF FOR FILE #101 ; 01/30/05 2 2 ; 3 3 S DIKZK=2 -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQORC10.m
r628 r636 1 XQORC10 ; COMPILED XREF FOR FILE #101.02 ; 10/15/041 XQORC10 ; COMPILED XREF FOR FILE #101.02 ; 01/30/05 2 2 ; 3 3 S DA=0 -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQORC11.m
r628 r636 1 XQORC11 ; COMPILED XREF FOR FILE #101.021 ; 10/15/041 XQORC11 ; COMPILED XREF FOR FILE #101.021 ; 01/30/05 2 2 ; 3 3 S DA=0 -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQORC12.m
r628 r636 1 XQORC12 ; COMPILED XREF FOR FILE #101.03 ; 10/15/041 XQORC12 ; COMPILED XREF FOR FILE #101.03 ; 01/30/05 2 2 ; 3 3 S DA=0 -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQORC13.m
r628 r636 1 XQORC13 ; COMPILED XREF FOR FILE #101.07 ; 10/15/041 XQORC13 ; COMPILED XREF FOR FILE #101.07 ; 01/30/05 2 2 ; 3 3 S DA=0 -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQORC14.m
r628 r636 1 XQORC14 ; COMPILED XREF FOR FILE #101.0775 ; 10/15/041 XQORC14 ; COMPILED XREF FOR FILE #101.0775 ; 01/30/05 2 2 ; 3 3 S DA=0 -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQORC2.m
r628 r636 1 XQORC2 ; COMPILED XREF FOR FILE #101.01 ; 10/15/041 XQORC2 ; COMPILED XREF FOR FILE #101.01 ; 01/30/05 2 2 ; 3 3 S DA(1)=DA S DA=0 -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQORC3.m
r628 r636 1 XQORC3 ; COMPILED XREF FOR FILE #101.02 ; 10/15/041 XQORC3 ; COMPILED XREF FOR FILE #101.02 ; 01/30/05 2 2 ; 3 3 S DA=0 -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQORC4.m
r628 r636 1 XQORC4 ; COMPILED XREF FOR FILE #101.021 ; 10/15/041 XQORC4 ; COMPILED XREF FOR FILE #101.021 ; 01/30/05 2 2 ; 3 3 S DA=0 -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQORC5.m
r628 r636 1 XQORC5 ; COMPILED XREF FOR FILE #101.03 ; 10/15/041 XQORC5 ; COMPILED XREF FOR FILE #101.03 ; 01/30/05 2 2 ; 3 3 S DA=0 -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQORC6.m
r628 r636 1 XQORC6 ; COMPILED XREF FOR FILE #101.07 ; 10/15/041 XQORC6 ; COMPILED XREF FOR FILE #101.07 ; 01/30/05 2 2 ; 3 3 S DA=0 -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQORC7.m
r628 r636 1 XQORC7 ; COMPILED XREF FOR FILE #101.0775 ; 10/15/041 XQORC7 ; COMPILED XREF FOR FILE #101.0775 ; 01/30/05 2 2 ; 3 3 S DA=0 -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQORC8.m
r628 r636 1 XQORC8 ; COMPILED XREF FOR FILE #101 ; 10/15/041 XQORC8 ; COMPILED XREF FOR FILE #101 ; 01/30/05 2 2 ; 3 3 S DIKZK=1 -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQORC9.m
r628 r636 1 XQORC9 ; COMPILED XREF FOR FILE #101.01 ; 10/15/041 XQORC9 ; COMPILED XREF FOR FILE #101.01 ; 01/30/05 2 2 ; 3 3 S DA(1)=DA S DA=0 -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQSUITE.m
r628 r636 1 1 XQSUITE ;Luke/Sea - Window Suite driver ;2/14/95 10:32 2 ;;8.0;KERNEL;;Jul 10, 1995 2 ;;8.0;KERNEL;;Jul 10, 1995;Build 4 3 ;Modified from FOIA VISTA, 4 ;Copyright 2008 WorldVistA. Licensed under the terms of the GNU 5 ;General Public License See attached copy of the License. 6 ; 7 ;This program is free software; you can redistribute it and/or modify 8 ;it under the terms of the GNU General Public License as published by 9 ;the Free Software Foundation; either version 2 of the License, or 10 ;(at your option) any later version. 11 ; 12 ;This program is distributed in the hope that it will be useful, 13 ;but WITHOUT ANY WARRANTY; without even the implied warranty of 14 ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 ;GNU General Public License for more details. 16 ; 17 ;You should have received a copy of the GNU General Public License along 18 ;with this program; if not, write to the Free Software Foundation, Inc., 19 ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 3 20 ; 4 21 ;Jump-start XQSUITE by asking which suite to run … … 134 151 .D GET^XGCLOAD(XQSUI,$NA(^TMP($J,XQWIN))) 135 152 .D M^XG(XQWIN,$NA(^TMP($J,XQWIN))) 136 .D SD^XG($P D,"FOCUS",XQWIN)153 .D SD^XG($P,"FOCUS",XQWIN) 137 154 .;D ESTA^XG() ;Send it off to window land 138 155 .; -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XUP.m
r628 r636 1 XUP ;SFISC/RWF - Setup enviroment for programmers ; 10/12/06 12:452 ;;8.0;KERNEL;**208,258,284 ,432**;Jul 10, 1995;Build 31 XUP ;SFISC/RWF - Setup enviroment for programmers ;09/21/2004 16:35 2 ;;8.0;KERNEL;**208,258,284**;Jul 10, 1995 3 3 W !,"Setting up programmer environment" 4 S U="^",$ECODE="",$ETRAP="" ;Clear error and error trap4 N $ESTACK,$ETRAP S $ECODE="",$ETRAP="" ;Clear and error trap 5 5 X ^%ZOSF("TYPE-AHEAD") 6 6 ;Check if Production and report … … 14 14 I $D(DUZ("SAV")) S DUZ=+DUZ("SAV"),DUZ(0)=$P(DUZ("SAV"),U,2) K DUZ("SAV") 15 15 ;Get user info 16 I $G(DUZ)>.5,$D(^VA(200,DUZ,0))[0 K DUZ W !,"DUZ Must point to a real user." G EXIT ;p43217 16 I $G(DUZ)>0 D DUZ(DUZ) 18 17 I $G(DUZ)'>0!('$D(DUZ(0))) D ASKDUZ G:Y'>0 EXIT 19 18 I '$D(XQUSER) S XQUSER=$S($D(^VA(200,DUZ,20)):$P(^(20),"^",2),1:"Unk") 20 19 S DTIME=600 ;Set a temp DTIME 21 S DILOCKTM=+$G(^DD("DILOCKTM"),1) ;p43222 20 ;Getting Terminal Type 23 21 ZIS I XUTT D ENQ^XUS1 G:$D(XUIOP(1)) ZIS2 S Y=0 D TT^XUS3 I Y>0 S XUIOP(1)=$P(XUIOP,";",2) G ZIS2 … … 33 31 I $$GET^XPAR("USR^SYS","XUS-XUP SET ERROR TRAP",1,"Q") S $ETRAP="D ERR^XUP" 34 32 D KILL1^XUSCLEAN S $P(XQXFLG,U,3)="XUP" D ^XQ1 35 EXIT ;Clean-up and exit 36 D KILL1^XUSCLEAN K XQY,XQY0 37 I $G(DUZ)>0,$$GET^XPAR("USR^SYS","XUS-XUP VPE",1,"Q"),$D(^%ZVEMS) X ^%ZVEMS ;Run VPE 33 EXIT D KILL1^XUSCLEAN K XQY,XQY0 34 I $$GET^XPAR("USR^SYS","XUS-XUP VPE",1,"Q"),$D(^%ZVEMS) X ^%ZVEMS ;Run VPE 38 35 Q 39 36 ; 40 ASKDUZ ;Ask for Access Code 41 N X 42 ;X XUEOFF S DIR(0)="FO",DIR("A")="Access Code" D ^DIR W ! X XUEON I $D(DIRUT) S Y=-1 Q 43 X XUEOFF W !,"Access Code: " S X=$$ACCEPT^XUS() X XUEON 44 I X["^"!('$L(X)) S Y=-1 Q 37 ASKDUZ X XUEOFF S DIR(0)="FO",DIR("A")="Access Code" D ^DIR W ! X XUEON I $D(DIRUT) S Y=-1 Q 45 38 S X=$$UP^XLFSTR(X) S:X[":" XUTT=1,X=$P(X,":",1)_$P(X,":",2) 46 39 D ^XUSHSH S Y=$O(^VA(200,"A",X,0)) 47 K DUZ D DUZ(+Y) 48 Q 40 K DUZ D DUZ(+Y) Q 49 41 ; 50 42 DUZ(DA) ;Build DUZ for a user. Used by Mailman. 51 43 ;(p284) Make the setting of several DUZ parts conditional. 52 N Y 53 S Y(0)=$G(^VA(200,+DA,0)),Y("XUS")=$G(^XTV(8989.3,1,"XUS")) 44 N Y S Y(0)=$G(^VA(200,+DA,0)),Y("XUS")=$G(^XTV(8989.3,1,"XUS")) 54 45 S DUZ=DA 55 46 S:$G(DUZ(0))'="@" DUZ(0)=$P(Y(0),"^",4) 56 47 S DUZ(1)="",DUZ("AG")=$P($G(^XTV(8989.3,1,0)),"^",8) 57 48 S:'$G(DUZ(2)) DUZ(2)=$O(^VA(200,DUZ,2,0)) 58 S:'DUZ(2) DUZ(2)=+$P(Y("XUS"), "^",17)59 S:'$L($G(DUZ("LANG"))) DUZ("LANG")=$P(Y("XUS"), "^",7)49 S:'DUZ(2) DUZ(2)=+$P(Y("XUS"),U,17) 50 S:'$L($G(DUZ("LANG"))) DUZ("LANG")=$P(Y("XUS"),U,7) 60 51 Q 61 52 ; 62 53 DTIME(E,D) ;Return DTIME value for user E, device D. 63 N P 64 S P=$P($G(^VA(200,+$G(E),200)),"^",10) S:P="" P=$P($G(^%ZIS(1,+$G(D),"XUS")),"^",10) S:P="" P=$P($G(^XTV(8989.3,1,"XUS")),"^",10) 54 N P S P=$P($G(^VA(200,+$G(E),200)),"^",10) S:P="" P=$P($G(^%ZIS(1,+$G(D),"XUS")),"^",10) S:P="" P=$P($G(^XTV(8989.3,1,"XUS")),"^",10) 65 55 Q $S(P]"":P,1:300) 66 56 ; 67 57 ERR ; 68 N %XUPU $P58 U $P 69 59 W !,"$ECODE=",$ECODE," $STACK=",$STACK 70 W !,"Location: ",$STACK($STACK-1,"PLACE")71 60 R !!,"Want to record the error: No// ",%XUP:600 I "Yy"[$E(%XUP_"N") D ^%ZTER 72 61 D UNWIND^%ZTER ;S:'$ESTACK $ECODE="" S $ETRAP="" Q:$QUIT "" Q 62 ; -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XUPROD.m
r628 r636 1 XUPROD ;ISF/RWF - Is this a PROD account. ; 8/23/07 16:472 ;;8.0;KERNEL;**284 ,440**;Jul 10, 1995;Build 131 XUPROD ;ISF/RWF - Is this a PROD account. ;06/17/2004 08:13 2 ;;8.0;KERNEL;**284**;Jul 10, 1995 3 3 ; 4 4 ;IA# 4440 … … 32 32 N DIR,P S P=$$PROD 33 33 S DIR(0)="YO",DIR("A")="Is this a Production Account",DIR("B")="No" 34 S DIR("A",1)="" 35 S DIR("A",2)="This is now a "_$S(P:"PRODUCTION",1:"TEST")_" account." 36 S DIR("A",3)=" " 37 S DIR("A",4)="Only answer YES if this is the full time Production Account." 38 S DIR("A",5)="Answer No for all other accounts." 34 S DIR("A",1)="This is now a "_$S(P:"PRODUCTION",1:"TEST")_" account." 35 S DIR("A",2)=" " 36 S DIR("A",3)="Only answer YES if this is the full time Production Account." 37 S DIR("A",4)="Answer No for all other accounts." 39 38 D ^DIR Q:$D(DIRUT) 40 39 I Y=1 D SSID($$SID^%ZOSV) … … 43 42 W:P !!,"This is now a PRODUCTION account.",! W:'P !!,"This is now a TEST account.",! 44 43 Q 45 ;46 EDIT ;Edit Logical - Physical fields47 N DIE,DA,DR48 W !!,"This is only valid in a Cache v5.2 client/server configuration."49 W !,"This lets you edit the fields that support the"50 W !,"LOGICAL to PHYSICAL translation for the System ID.",!!51 S DA=1,DIE="^XTV(8989.3,",DR="504;505" D ^DIE52 Q -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XUS.m
r628 r636 1 XUS ;SFISC/STAFF - SIGNON ;2/13/07 14:44 2 ;;8.0;KERNEL;**16,26,49,59,149,180,265,337,419,434**;Jul 10, 1995;Build 6 1 XUS ;SFISC/STAFF - SIGNON ;3/19/07 09:15 2 ;;8.0;KERNEL;**16,26,49,59,149,180,265,337,419,437**;Jul 10, 1995;Build 22 3 ; Modified from FOIA VISTA, 4 ; Copyright (C) 2007 WorldVistA 5 ; 6 ; This program is free software; you can redistribute it and/or modify 7 ; it under the terms of the GNU General Public License as published by 8 ; the Free Software Foundation; either version 2 of the License, or 9 ; (at your option) any later version. 10 ; 11 ; This program is distributed in the hope that it will be useful, 12 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 13 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 ; GNU General Public License for more details. 15 ; 16 ; You should have received a copy of the GNU General Public License 17 ; along with this program; if not, write to the Free Software 18 ; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 3 19 ;Sign-on message numbers are 30810.51 to 30810.99 4 20 S U="^" D INTRO^XUS1A() … … 80 96 . Q 81 97 Q A 82 ; 98 ; 83 99 CHECKAV(X1) ;Check A/V code return DUZ or Zero. (Called from XUSRB) 84 100 N %,%1,X,Y,IEN,DA,DIK … … 90 106 . Q 91 107 ;End CCOW 92 S X1=$ $UP(X1) S:X1[":" XUTT=1,X1=$TR(X1,":")108 S X1=$S($$GET^XPAR("SYS","XU VC CASE SENSITIVE"):$$UP($P(X1,";",1))_";"_$P(X1,";",2),1:$$UP(X1)) S:X1[":" XUTT=1,X1=$TR(X1,":") ; Allow case sensitive for VOE 93 109 S X=$P(X1,";") Q:X="^" -1 S:XUF %1="Access: "_X 94 110 Q:X'?1.20ANP 0 95 S X=$$EN^XUSHSH(X) I '$D(^VA(200,"A",X)) D LBAV Q 0 111 S X=$$EN^XUSHSH(X) I '$D(^VA(200,"A",X)) D LBAV Q 0 ; Case insensitive for Access Code for VOE 96 112 S %1="",IEN=$O(^VA(200,"A",X,0)),XUF(.3)=IEN D USER(IEN) 97 113 S X=$P(X1,";",2) S:XUF %1="Verify: "_X S X=$$EN^XUSHSH(X) … … 121 137 N % 122 138 S U="^",XUEON=^%ZOSF("EON"),XUEOFF=^("EOFF") 123 D XUVOL,XOPT S DUZ("LANG")=$P(XOPT,U,7) ;S:$P(XUVOL,U,6)="y" XRTL=XUCI_","_XQVOL139 D XUVOL,XOPT S DUZ("LANG")=$P(XOPT,U,7) S:$P(XUVOL,U,6)="y" XRTL=XUCI_","_XQVOL 124 140 K ^XUTL("XQ",$J) S XUF=0,XUDEV=0,DUZ=0,DUZ(0)="@",IOS=0,ION="" 125 141 I FLAG S %ZIS="L",IOP="HOME" D ^%ZIS Q:POP 126 S XUDEV=IOS,XUIOP=ION 142 S XUDEV=IOS,XUIOP=ION D:$D(XRTL) T0^%ZOSV 127 143 D GETFAC^XUS3($G(IO("IP"))) 128 144 S %=$P(XOPT,U,14) … … 130 146 . S XUF=(%["R")+1,XUF(.1)="",XUF(.2)=0,XUF(.3)=0 131 147 . I %["D" S:$D(^XTV(8989.3,1,4.33,"B",XUDEV))[0 XUF=0 132 S DILOCKTM=+$G(^DD("DILOCKTM"),1) ;p434 IA#4909133 148 Q 134 149 SET2() ;EF. Return error code (also called from XUSRB) … … 142 157 S DTIME=600 143 158 I '$P(XOPT,U,11),$D(^%ZIS(1,XUDEV,90)),^(90)>2800000,^(90)'>DT Q 8 159 I $D(XRT0) S XRTN="XUS" D T1^%ZOSV 144 160 Q 0 145 161 ; … … 148 164 I $P(XUSER(1.1),U,5),$P(XUSER(1.1),U,5)>XUNOW S XUM(0)=$$FMTE^XLFDT($P(XUSER(1.1),U,5),"2PM") Q 18 ;User locked until 149 165 I $P(XUSER(0),U,11),$P(XUSER(0),U,11)'>DT Q 11 ;Access Terminated 150 I $D(DUZ("ASH")) Q 0 ;If auto handle, Allow to sign-on p434151 166 I $P(XUSER(0),U,7) Q 5 ;Disuser flag set 152 I '$L($P(XUSER(1),U,2)) Q 21 ; p419, p434167 I '$L($P(XUSER(1),U,2)) Q 21 ;419 153 168 Q 0 154 169 ; -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XUS2.m
r628 r636 1 XUS2 ;SF/RWF - TO CHECK OR RETURN USER ATTRIBUTES ; 11/29/20062 ;;8.0;KERNEL;**59,180,313,419,437**;Jul 10, 1995;Build 2 1 XUS2 ;SF/RWF - TO CHECK OR RETURN USER ATTRIBUTES ;2/3/07 19:18 2 ;;8.0;KERNEL;**59,180,313,419,437**;Jul 10, 1995;Build 22 3 3 Q 4 ; Modified from FOIA VISTA, 5 ; Copyright (C) 2007 WorldVistA 6 ; 7 ; This program is free software; you can redistribute it and/or modify 8 ; it under the terms of the GNU General Public License as published by 9 ; the Free Software Foundation; either version 2 of the License, or 10 ; (at your option) any later version. 11 ; 12 ; This program is distributed in the hope that it will be useful, 13 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 14 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 ; GNU General Public License for more details. 16 ; 17 ; You should have received a copy of the GNU General Public License 18 ; along with this program; if not, write to the Free Software 19 ; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 4 20 ; 5 21 ACCED ; ACCESS CODE EDIT from DD … … 44 60 GET ;Get the user input and convert case. 45 61 S X=$$ACCEPT^XUS I (X["^")!('$L(X)) D DIRUT 46 S X=$$UP^XLFSTR(X)62 I '$D(ASKINGVC)!'$$GET^XPAR("SYS","XU VC CASE SENSITIVE") S X=$$UP^XLFSTR(X) ;for VOE allow case sensitive Verify Code 47 63 Q 48 64 ; … … 65 81 ;Fall into next code 66 82 VERED ; VERIFY CODE EDIT From DD 67 N DIR,DIR0,XUAUTO 83 N DIR,DIR0,XUAUTO,ASKINGVC 68 84 I "Nn"[$E(X,1) S X="" Q 69 85 I "Yy"'[$E(X,1) K X Q 70 S XUH="",XUAUTO=($P($G(^XTV(8989.3,1,3)),U,3)="y") S:DUZ=DA XUAUTO="n" ;Auto only for admin86 S ASKINGVC=1,XUH="",XUAUTO=($P($G(^XTV(8989.3,1,3)),U,3)="y") S:DUZ=DA XUAUTO="n" ;Auto only for admin 71 87 VC1 D CLR,VASK:'XUAUTO,VAUTO:XUAUTO G OUT:$D(DIRUT) D REASK G OUT:$D(DIRUT),VC1:'XUK D CLR,VST(XUH,1) 72 88 D CALL^XUSERP(DA,2) … … 84 100 N PUNC,NA S PUNC="~`!@#$%&*()_-+=|\{}[]'<>,.?/" 85 101 S NA("FILE")=200,NA("FIELD")=.01,NA("IENS")=DA_",",NA=$$HLNAME^XLFNAME(.NA) 86 I ($L(S)<8)!($L(S)>20)!(S'?.UNP)!(S[";")!(S["^")!(S[":") Q "1^"_$$AVHLPTXT 102 ; for VOE allow case sensitive Verify Code with S'?.ANP 103 I ($L(S)<8)!($L(S)>20)!$S($$GET^XPAR("SYS","XU VC CASE SENSITIVE"):S'?.ANP,1:S'?.UNP)!(S[";")!(S["^")!(S[":") Q "1^"_$$AVHLPTXT 87 104 I (S?8.20A)!(S?8.20N)!(S?8.20P)!(S?8.20AN)!(S?8.20AP)!(S?8.20NP) Q "2^VERIFY CODE must be a mix of alpha and numerics and punctuation." 88 105 I $D(^VA(200,DA,.1)),EC=$P(^(.1),U,2) Q "3^This code is the same as the current one." … … 110 127 ; 111 128 AGEN ;Generate a ACCESS code 112 S XUU=$$AC^XUS4 S (X,XUH)=$$EN^XUSHSH(XUU)I $D(^VA(200,"A",X))!$D(^VA(200,"AOLD",X)) G AGEN129 S XUU=$$AC^XUS4 S X=$$EN^XUSHSH(XUU),XUH=X I $D(^VA(200,"A",X))!$D(^VA(200,"AOLD",X)) G AGEN 113 130 D CLR W "The new ACCESS CODE is: ",XUU," This is ",XUK," of 3 tries." 114 131 D YN … … 129 146 ; 130 147 VGEN ;Generate a VERIFY code 131 S XUU=$$VC^XUS4 S (X,XUH)=$$EN^XUSHSH(XUU)I ($P($G(^VA(200,DA,0)),U,3)=X)!$D(^VA(200,DA,"VOLD",X)) G VGEN148 S XUU=$$VC^XUS4 S X=$$EN^XUSHSH(XUU),XUH=X I ($P($G(^VA(200,DA,0)),U,3)=X)!$D(^VA(200,DA,"VOLD",X)) G VGEN 132 149 D CLR W "The new VERIFY CODE is: ",XUU," This is ",XUK," of 3 tries." 133 150 D YN … … 135 152 YN ;Ask if want to keep 136 153 N DIR 137 S Y=1,DIR(0)="YA",DIR("A")=" Do you want to keep this one? ",DIR("B")="YES",DIR("?",1)="If you don't like this code, we can auto-generate another.",DIR("?")="Remember you only get 3 tries!" 138 S:XUK=3 DIR("A")="This is your final choice. "_DIR("A") 139 D ^DIR Q:(Y=1)!$D(DIRUT) I XUK=2 W !,"O.K. You'll have to keep the next one!",! H 2 140 I (XUK=3)&(Y'=1) W !,"Lets stop and you can try later." H 3 D DIRUT 141 D CLR 154 S Y=1 Q:XUK=3 S DIR(0)="YA",DIR("A")=" Do you want to keep this one? ",DIR("B")="YES",DIR("?",1)="If you don't like this code, we can auto-generate another.",DIR("?")="Remember you only get 3 tries!" 155 D ^DIR Q:(Y=1)!$D(DIRUT) D CLR W:XUK=2 "O.K. You'll have to keep the next one!",! 142 156 Q 143 157 ; -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XUSCLEAN.m
r628 r636 1 XUSCLEAN ;SF/STAFF - CLEANUP BEFORE EXIT ; 10/26/06 08:122 ;;8.0;KERNEL;**13,59,165,353 ,434**;Jul 10, 1995;Build 61 XUSCLEAN ;SF/STAFF - CLEANUP BEFORE EXIT ;05/26/2005 14:28 2 ;;8.0;KERNEL;**13,59,165,353**;Jul 10, 1995;Build 1 3 3 H ;;Exit point for all R/S applications 4 4 LOCK ;Unlock any locks … … 19 19 H2 ;No talking after this point 20 20 D C,XUTL 21 ;un-comment the following line if you want FM space recall cleared 21 ;un-comment the following line if you want FM space recall cleared 22 22 ;after each session. 23 23 ;K ^DISV($G(DUZ,0)) … … 78 78 KILL1 ;To clean up ALL but kernel variables. 79 79 I $$BROKER^XWBLIB S %2=$P($T(VARLST^XWBLIB),";;",2) I %2]"" N @%2 ;Protect Broker variables. 80 N XGWIN,XGDI,XGEVENT ;P434 remove KWAPI80 N KWAPI,XGWIN,XGDI,XGEVENT 81 81 N XQAEXIT,XQAUSER,XQX1,XQAKILL,XQAID 82 ;p434 add DILOCKTM, remove XRTL, %ZH0 83 K (DUZ,DTIME,DILOCKTM,DT,DISYS,IO,IOBS,IOF,IOM,ION,IOSL,IOST,IOT,IOS,IOXY,U,XQVOL,XQY,XQY0,XQDIC,XQPSM,XQPT,XQAUDIT,XQXFLG,ZTSTOP,ZTQUEUED,ZTREQ) 82 K (DUZ,DTIME,DT,DISYS,IO,IOBS,IOF,IOM,ION,IOSL,IOST,IOT,IOS,IOXY,U,XRTL,%ZH0,XQVOL,XQY,XQY0,XQDIC,XQPSM,XQPT,XQAUDIT,XQXFLG,ZTSTOP,ZTQUEUED,ZTREQ) 84 83 K IO("C"),IO("Q") 85 84 Q 86 85 ; 87 86 XMR ;Entry point from XUS to DO xmr and cleanup after. 88 N XQXFLG ;p43489 87 D NEXT^XUS1 S XQXFLG="",XQXFLG("HALT")=1 G H2 -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XUSERBLK.m
r628 r636 1 XUSERBLK ;SF/RWF - Bulk user (new person) COMPUTER ACCESS ;02/26/2008 2 ;;8.0;KERNEL;**20,214,230,289,419,490**;Jul 10, 1995;Build 5 3 ; Per VHA Directive 2004-038, this routine should not be modified. 4 ; Option: XUSERBLK 1 XUSERBLK ;SF/RWF - Bulk user (new person) COMPUTER ACCESS ; 5/23/2006 2 ;;8.0;KERNEL;**20,214,230,289,419**;Jul 10, 1995;Build 5 5 3 ; This routine allows the Cloning of one person to a group of others. 6 4 A ; 7 5 I $G(DUZ)'>0 W !!,"You are not a known user and can't use this option." Q 8 N DIC, X,Y,XUTMP,DA,DIR,XUTERMDT,XUSER,XUY,%ZIS,XUIOP,XMQUIET6 N DIC,DIR,%,L,XUIOP,XUNODE,XU1,X1,X2,X3,X4,X5,X6,XUTEXT,XUNEW,XUSER,XUTMP,XUTERMDT,XUH,XUU,XUU2,M,P,XU 9 7 K ^TMP($J) 10 8 B1 W @IOF,!?26,"Batch Entry of New Persons" 11 9 W !?26,"--------------------------",!!,"Please select a person to copy from" 12 10 K DIC S DIC(0)="AEQZ",DIC("A")="Template PERSON: ",DIC="^VA(200," D ^DIC 13 Q:$D(DTOUT)!$D(DUOUT) 14 G B1:Y=-1 11 G QUIT:$D(DTOUT)!$D(DUOUT),B1:Y=-1 15 12 ; Show INFO to be copied" 16 13 S XUTMP=+Y,XUTMP(0)=$P(Y,U,2),DA=+Y D EN^DIQ 17 S DIR(0)="Y",DIR("A")="Is this the person whose data you want cloned" D ^DIR Q:$D(DIRUT) G B1:'Y 18 W !!,"You may enter a date, when the users that are being created/updated",!,"will no longer have access to the system." 19 S DIR(0)="DAO^DT::AEF" 20 S DIR("A")="Enter (optional) TERMINATION DATE: " 21 D ^DIR Q:$D(DTOUT)!$D(DUOUT) 22 S XUTERMDT=Y 14 S DIR(0)="Y",DIR("A")="Is this the person data you want cloned" D ^DIR G B1:'Y 15 W !,"You may enter a date, when the users that are being created/updated",!,"will no longer have access to the system." 16 S XUTERMDT="",%DT="AEF",%DT(0)=DT,%DT("A")="Enter (optional) TERMINATION DATE: " D ^%DT S:Y>0 XUTERMDT=Y 23 17 K XUSER S XUSER=0 24 18 B2 ; 25 19 W !!,?26,"Batch Entry of New Persons",!,?26,"--------------------------",! 26 W !,"Clone of: ",XUTMP(0) I XUTERMDT W ? 49,"TERMINATION DATE: ",$$FMTE^XLFDT(XUTERMDT)20 W !,"Clone of: ",XUTMP(0) I XUTERMDT W ?50,"TERMINATION DATE: ",$$FMTE^XLFDT(XUTERMDT) 27 21 ;; 28 22 B3 F S XUY=$$ADD^XUSERNEW Q:XUY<0 D ;Create new entry … … 35 29 . . S DIR(0)="Y",DIR("A")="Do You Want To Clone PERSON CLASS" D ^DIR 36 30 . . S:Y=1 $P(XUY,U,5)=1 37 . S:XUY>0 XUSER=XUSER+1,XUSER(XUSER)=XUY W ! !,"Next!"31 . S:XUY>0 XUSER=XUSER+1,XUSER(XUSER)=XUY W !,"Next!",! 38 32 . Q 39 33 B4 ; 40 Q:XUSER'>0 41 I XUTERMDT D 42 . N XUZT 43 . S XUZT("ZTDTH")=XUTERMDT 44 . W !!,"Queueing automatic deactivation for ",$$FMTE^XLFDT(XUTERMDT) 45 . S X=$$NODEV^XUTMDEVQ("CHECK^XUSTERM1",,,.XUZT,1) 46 W !!,"Where do you want to print the COMPUTER ACCOUNT NOTIFICATION LETTERS?" 47 S XMQUIET=1 48 S %ZIS="NMQ" D ^%ZIS Q:POP ; "N" means don't open device 49 K XMQUIET 50 S XUIOP=ION_";"_IOST_";"_IOM_";"_IOSL 51 D HOME^%ZIS 52 ;I ION["P-MESSAGE-HFS" G START 34 G:XUSER'>0 QUIT 35 I XUTERMDT>0 S ZTRTN="CHECK^XUSTERM1",ZTIO="",ZTDTH=XUTERMDT D ^%ZTLOAD W !,"Automatic deactivation has been queued for this date.",! 36 W !!,"Where do you want to print the COMPUTER ACCOUNT NOTIFICATION LETTERS" 37 S %ZIS="MQ" D ^%ZIS G QUIT:POP 38 I ION["P-MESSAGE-HFS" G START 53 39 I '$D(IO("Q")) G CLONE 54 40 START ; 55 N XUZT 56 S XUZT("ZTDTH")=$H 57 S X=$$NODEV^XUTMDEVQ("CLONE^XUSERBLK",,"XUIOP;XUTMP;XUTERMDT;XUSER;XUSER(",.XUZT,1) 41 S ZTRTN="CLONE^XUSERBLK" F I="XUTMP","XUTERMDT","XUSER","XUSER(" S ZTSAVE(I)="" 42 K IO("Q") D ^%ZTLOAD 43 ;; 44 QUIT ; 45 K DIC,DIR,%,L,XUIOP,XUNODE,XU1,X1,X2,X3,X4,X5,X6,XUTEXT,XUNEW,XUSER,XUTMP,XUTERMDT,XUH,XUU,XUU2,M,P,XU 46 K ^TMP($J) 58 47 Q 59 48 ;; 60 49 CLONE ;;Do work 61 N XUTEXT,XU1,%,DA,XUNEW,XUPURGE 62 S XUTEXT=$O(^DIC(9.2,"B",$$GET^XUPARAM("XUSER COMPUTER ACCOUNT","N"),0)) 50 S XUTEXT=$O(^DIC(9.2,"B",$$GET^XUPARAM("XUSER COMPUTER ACCOUNT","N"),0)),XUIOP=ION_";"_IOST_";"_IOM_";"_IOSL 63 51 F XU1=1:1:XUSER S %=XUSER(XU1),DA=+%,XUNEW=$P(%,U,3),XUPURGE=$P(%,U,4) D C2,UPDATE("ORD",DA) 64 K ^TMP($J)65 Q52 G QUIT 53 ; 66 54 C2 ; 67 N XU U,XUU2,XFDA,XUH,XUH2,XIEN,XERR,Y,XMZ,XMM,XMDT55 N XUH,XUH2,XUU,XUU2 68 56 I '$D(ZTQUEUED) W !!?8,$S(XUNEW:"CREATING A NEW ACCOUNT FOR '"_$P(XUSER(XU1),U,2)_"'",1:"CONVERTING "_$P(XUSER(XU1),U,2)_"'S ACCOUNT OVER"),!!,"One moment please..." 69 57 D BLDFDA … … 78 66 ; 79 67 BLDFDA ;Build the FDA 80 N X2,X3,X4,X5,X6,X7,XUNODE,XU81 68 S XFDA="^TMP($J,""XFDA"")",XIEN="^TMP($J,""XIEN"")" K ^TMP($J) 82 69 ;Move piece on nodes from list, Build XU only once … … 102 89 ; 103 90 ACODE ; 104 N Z105 91 F Z=0:0 S XUU=$$AC^XUS4(),XUH=$$EN^XUSHSH(XUU) Q:'($D(^VA(200,"AOLD",XUH))!$D(^VA(200,"A",XUH))) 106 92 Q … … 138 124 ; 139 125 LET(DA,XUTEXT) ;Write access letter 140 N DIWF,FR,TO,BY ,IOP126 N DIWF,FR,TO,BY 141 127 S DIWF="^DIC(9.2,"_XUTEXT_",1,",DIWF(1)=200,FR=DA,TO=DA,BY="NUMBER",IOP=XUIOP D EN2^DIWF 142 128 Q -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XUSHSH.m
r628 r636 1 XUSHSH ;SF-ISC/STAFF - PASSWORD ENCRYPTION ;3/23/89 15:09 ; 1 XUSHSH ;SF-ISC/STAFF - PASSWORD ENCRYPTION ;3/23/89 15:09 ; 4/14/05 1:22pm 2 2 ;;8.0;KERNEL;;Jul 10, 1995 3 3 ;; This is the public domain version of the VA Kernel. … … 5 5 ;; Input in X 6 6 ;; Output in X 7 A Q 8 EN(X) Q X 7 ;; Algorithm for VistA Office EHR encryption (BSL) 8 A ; 9 S X=$$EN(X) 10 Q 11 EN(X) ; GENERIC HASHING ENCRYPTION -- USES ASCII ENCODING 12 N %HASH S %HASH="" 13 N %CHAR 14 F %CHAR=1:1:$L(X) D 15 . I %CHAR#2 S %HASH=$A(X,%CHAR)_%HASH 16 . E S %HASH=%HASH_$A(X,%CHAR) 17 Q %HASH -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/ZIS.m
r628 r636 1 %ZIS ;SFISC/AC,RWF -- DEVICE HANDLER ;1/24/08 16:06 2 ;;8.0;KERNEL;**18,23,69,112,199,191,275,363,440**;JUL 10, 1995;Build 13 3 ;Per VHA Directive 2004-038, this routine should not be modified 1 %ZIS ;SFISC/AC,RWF -- DEVICE HANDLER ;10/14/2004 08:46 2 ;;8.0;KERNEL;**18,23,69,112,199,191,275,363**;JUL 10, 1995 4 3 N %ZISOS,%ZISV 5 4 S U="^",%ZISOS=$G(^%ZOSF("OS")),%ZISV=$G(^%ZOSF("VOL")) … … 9 8 I '$D(%ZIS),$D(%IS) M %ZIS=%IS 10 9 S:'($D(%ZIS)#2) %ZIS="M" M %IS=%ZIS ;update %IS for now 11 I '$D(^XUTL("XQ",$J,"MIXED OS")) S ^XUTL("XQ",$J,"MIXED OS")=$$PRI^%ZOSV12 S %ZIS("PRI")=$G(^XUTL("XQ",$J,"MIXED OS"),1)13 10 ; 14 11 I $D(ZTQUEUED) D I '$D(IOP) S POP=1 G EXIT^%ZIS1 15 12 .I $D(ZTIO)#2,ZTIO="" S:%IS'[0 %IS=%IS_"0",%ZIS=%ZIS_"0" 16 13 I '$D(ZTQUEUED),%IS["T",$P($G(IOP),";")="Q" S POP=1 G EXIT^%ZIS1 17 N %,%A,%E,%H,%I,%X,%XX,%Y,%Z,%Z1,%Z 2,%Z9,%Z90,%Z91,%Z95,%ZISB,%ZTIME,%ZTYPE14 N %,%A,%E,%H,%I,%X,%XX,%Y,%Z,%Z1,%Z9,%Z90,%Z91,%Z95,%ZISB,%ZTIME,%ZTYPE 18 15 N %ZHFN,%ZISOLD,DTOUT,DUOUT 19 16 ;Save symbols to restore if don't open a device … … 34 31 S %=$$LINEPORT^%ZISUTL I % S (%E,%H)=% Q 35 32 S %ZISVT=$I D VTLKUP I '%E S %ZISVT=$I D VIRTUAL 36 I %ZISVT=""!(%E'>0) I %IS'[0 O IO(0)::0 I $T U IO(0) W !,"HOME DEVICE ("_$I_")DOES NOT EXIST IN THE DEVICE FILE",!,"PLEASE CONTACT YOUR SYSTEM MANAGER!",*733 I %ZISVT=""!(%E'>0) I %IS'[0 O IO(0)::0 I $T U IO(0) W !,"HOME DEVICE DOES NOT EXIST IN THE DEVICE FILE",!,"PLEASE CONTACT YOUR SYSTEM MANAGER!",*7 37 34 S %H=%E S:'%H&(%IS'[0) POP=1 S:(%H>0)&('$D(IO("HOME"))) IO("HOME")=%H_"^"_$I 38 35 Q … … 63 60 ;IO("Q") is checked by many routines after a call to ^%ZISC, so only clean on call to %ZIS. 64 61 CLEAN ;Cleanup env. Called from %ZISC also. 65 I $G(IOT)'="SPL" K IO("DOC"),IO("SPOOL") ;(p446) 66 I $G(IOT)'="HFS" K IO("HFSIO") ;p446 62 K IO("DOC"),IO("HFSIO"),IO("SPOOL") ;(p366) 67 63 S (IOPAR,IOUPAR)="" 68 64 Q … … 70 66 RESETVAR ;Reset home IO* variables. 71 67 I '$D(^XUTL("XQ",$J,"IO")) Q 72 N % 73 F %="IO","IOBS","IOF","IOM","ION","IOS","IOSL","IOST","IOST(0)","IOT","IOXY","IOPAR","IOUPAR" I $D(^XUTL("XQ",$J,%))#2 S @%=^(%) 74 F %="IO(""IP"")","IO(""CLNM"")","IO(""DOC"")","IO(""HFSIO"")","IO(""SPOOL"")" I $D(^XUTL("XQ",$J,%))#2 S @%=^(%) 75 S POP=0,IO(0)=IO 68 N % F %="IO","IOBS","IOF","IOM","ION","IOS","IOSL","IOST","IOST(0)","IOT","IOXY" I $D(^XUTL("XQ",$J,%))#2 S @%=^(%) 69 S POP=0,IO(0)=IO,(IOPAR,IOUPAR)="" 76 70 Q 77 SAVEVAR ;Save home IO* variables, called from XUS1,%ZTMS3 78 N % 79 F %="IO","IOBS","IOF","IOM","ION","IOS","IOSL","IOST","IOST(0)","IOT","IOXY","IOPAR","IOUPAR" I $D(@%) S ^XUTL("XQ",$J,%)=@% 80 F %="IO(""IP"")","IO(""CLNM"")","IO(""DOC"")","IO(""HFSIO"")","IO(""SPOOL"")" I $D(@%) S ^XUTL("XQ",$J,%)=@% 71 SAVEVAR ;Save home IO* variables, called from XUS1 72 N % F %="IO","IOBS","IOF","IOM","ION","IOS","IOSL","IOST","IOST(0)","IOT","IOXY" I $D(@%) S ^XUTL("XQ",$J,%)=@% 81 73 Q 82 74 ZISLPC Q ;No longer called in Kernel v8. -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/ZIS1.m
r628 r636 1 %ZIS1 ;SFISC/AC,RWF -- DEVICE HANDLER (DEVICE INPUT) ;1/24/08 16:06 2 ;;8.0;KERNEL;**18,49,69,104,112,199,391,440**;JUL 10, 1995;Build 13 3 ;Per VHA Directive 2004-038, this routine should not be modified 1 %ZIS1 ;SFISC/AC,RWF -- DEVICE HANDLER (DEVICE INPUT) ;07/07/2005 15:48 2 ;;8.0;KERNEL;**18,49,69,104,112,199,391**;JUL 10, 1995 4 3 MAIN ;Called from %ZIS with a GO 5 4 I '$D(IOP),$D(^%ZIS(1,%E,0)),'$P(^(0),"^",3) S %A=%H,%Z=^(0) D L2^%ZIS2 G EXIT … … 7 6 I '$D(IOP),$D(IO("Q")),POP D AQUE^%ZIS3 K:%=2 IO("Q") S:%=2 %ZISB=$S(%IS'["N":2,1:0) I %=-1 S POP=1 G EXIT 8 7 S %E=%H,POP=0,%IS=%ZIS ;Reset %IS from %ZIS 9 I %IS'["Q",$D(XQNOGO) S POP=1 W:'$D(IOP) !, $C(7),"OUTPUT IS NEVER ALLOWED FOR THIS OPTION" G EXIT8 I %IS'["Q",$D(XQNOGO) S POP=1 W:'$D(IOP) !,*7,"OUTPUT IS NEVER ALLOWED FOR THIS OPTION" G EXIT 10 9 D IOP:$D(IOP),R:'$D(IOP) 11 10 G EXIT:$D(DTOUT)!$D(DUOUT)!(POP&$D(IOP)),L1:POP&'$D(IOP) 12 11 D LKUP I %A'>0 S POP=1 D:'$D(DUOUT) MSG1 K DUOUT 12 I POP G EXIT:$D(IOP),L1:'$D(IOP) 13 13 I '$D(^%ZIS(1,%A,0)) D MSG1 K %ZISIOS S POP=1 14 14 I POP G EXIT:$D(IOP),L1:'$D(IOP) … … 16 16 I $D(%ZIS("S")) N Y S Y=%E D XS^ZISX S:'$T POP=1 G G:POP 17 17 W:'$D(IOP)&($P(%Z,"^",2)'=$I)&($P(%Z1,"^")]"") " ",$P(%Z1,"^") 18 D L2^%ZIS2 ;Call18 D L2^%ZIS2 19 19 G G L1:POP&'$D(IOP)&'($D(DTOUT)!$D(DUOUT)) ;Didn't get it 20 ;For type[TRM reset $X & $Y 21 I 'POP,%ZTYPE["TRM",IO]"",$D(IO(1,IO)) U IO S:'(IO=IO(0)&'$D(IO("S"))&'$D(ZTQUEUED)) $X=0,$Y=0 20 22 ; 21 EXIT ; 22 I POP G EX2 ;Did not get the device. 23 ;For type[TRM reset $X & $Y 24 I %ZTYPE["TRM",IO]"",$D(IO(1,IO)) U IO S:'(IO=IO(0)&'$D(IO("S"))&'$D(ZTQUEUED)) $X=0,$Y=0 23 EXIT I $D(IO)#2,IO]"",$D(IO(1,IO))#2,$D(%Z1),$P(%Z1,"^",11) S IO(1,IO,"NOFF")=1 25 24 ;Do count of number of times device opened. Field 51. 26 I $L($G(IO)),$D(IO(1,IO))#2, $G(%ZISIOS) D25 I $L($G(IO)),$D(IO(1,IO))#2,'POP,$G(%ZISIOS) D 27 26 . S $P(^(5),"^",1)=$P($G(^%ZIS(1,%ZISIOS,5)),"^",1)+1 28 I %ZIS["H" S IO(0)=IO,IO("HOME")=%ZISIOS_"^"_IO ;Make home device 29 I '$D(IO("Q")),$D(%ZISLOCK) S ^XUTL("XQ",$J,"lock",%ZISIOS)=%ZISLOCK 30 I $D(IO)#2,IO]"",$D(IO(1,IO))#2,$D(%Z1),$P(%Z1,"^",11) S IO(1,IO,"NOFF")=1 31 EX2 ; 27 I 'POP,%ZIS["H" S IO(0)=IO,IO("HOME")=%ZISIOS_"^"_IO ;Make home device 32 28 I %IS'[0,$G(IO(0))]"" U IO(0) ;Make sure return with home active 33 29 G SETVAR:'POP!(%IS["T"),KILVAR … … 37 33 S %IS=%IS_%X K IOP W %X D SETQ Q 38 34 ;Get ready to ask user for device 39 R I %IS["Q",$D(XQNOGO) W !, $C(7),"AT THIS TIME, OUTPUT MUST BE QUEUED"35 R I %IS["Q",$D(XQNOGO) W !,*7,"AT THIS TIME, OUTPUT MUST BE QUEUED" 40 36 S %A=$S($D(%IS("B")):%IS("B"),1:"HOME") ;Setup default 41 37 I %IS["P",%A="HOME",$D(^%ZIS(1,%E,99)),$D(^%ZIS(1,+^(99),0)) S %A=$P(^(0),"^",1) … … 60 56 I %X'=%ZISVT S %ZISVT=%X D VTLKUP^%ZIS S %A=%E Q:%A>0 ;uppercase lookup 61 57 N %XX,%YY S %XX=%X D 1^%ZIS5 S %A=+%YY Q 62 SBR K DFOUT,DTOUT,DUOUT R %X:$S($D(DTIME)#2:DTIME,1:300) E W $C(7)S DTOUT=1 Q58 SBR K DFOUT,DTOUT,DUOUT R %X:$S($D(DTIME)#2:DTIME,1:300) E W *7 S DTOUT=1 Q 63 59 S:%X="."!(%X="^") DUOUT=1,%X="" Q 64 60 LC S %X=$$UP(%X) … … 66 62 LOW(%) Q $TR(%,"ABCDEFGHIJKLMNOPQRSTUVWXYZ","abcdefghijklmnopqrstuvwxyz") 67 63 UP(%) Q $TR(%,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ") 68 ; 69 ;Call/Return % = 1 (yes), 2 (no) -1 (^) 70 YN W "? ",$P("Yes// ^No// ",U,%) 71 RYN R %X:$S($D(DTIME):DTIME,$D(%ZISDTIM):%ZISDTIM,1:300) E S DTOUT=1,%X=U W $C(7) 64 YN W "? ",$P("YES// ^NO// ",U,%) 65 RYN R %X:$S($D(DTIME):DTIME,$D(%ZISDTIM):%ZISDTIM,1:300) E S DTOUT=1,%X=U W *7 72 66 S:%X]""!'% %=$A(%X),%=$S(%=89:1,%=121:1,%=78:2,%=110:2,%=94:-1,1:0) 73 I '%,%X'?."?" W $C(7),"??",!?4,"ANSWER 'Yes' OR 'No': " G RYN 74 W:$X>73 ! W $P(" (Yes)^ (No)",U,%) 75 Q 76 MSG1 I '$D(IOP) W ?20,$C(7)," [DEVICE DOES NOT EXIST]" 67 I '%,%X'?."?" W *7,"??",!?4,"ANSWER 'YES' OR 'NO': " G RYN 68 W:$X>73 ! W $P(" (YES)^ (NO)",U,%) Q 69 MSG1 I '$D(IOP) W ?20,*7," [DEVICE DOES NOT EXIST]" 77 70 Q 78 71 SETVAR ;Come here to setup the variables for the selected device … … 84 77 S IOT=%ZTYPE,IOST(0)=%ZISIOST(0),IOST=%ZISIOST,IOPAR=%ZISOPAR,IOUPAR=%ZISUPAR,IOHG=%ZISHG 85 78 S:IOF="" IOF="#" ;See that IOF has something 86 K IOCPU S:$D(%ZISCPU) IOCPU=%ZISCPU 87 G KIL 79 K IOCPU S:$D(%ZISCPU) IOCPU=%ZISCPU G KIL 88 80 ; 89 81 KILVAR ;Come here to restore the calling variables … … 97 89 S:%IS["T" IO("T")=1 K %ZIS,%IS,%A,%E,%H,%ZISOS,%ZISV,IOP 98 90 K2 K %I,%X,%Y,%Z,%Z1,%Z91,%Z95,%ZTYPE,%ZTIME 99 K %ZISCHK,%ZISCPU,%ZISI,%ZISR,%ZISVT,%ZISB,%ZISX,ZISI,%ZISHGL,%ZISHP,%ZISIO,%ZISIOS,%ZISIOM 100 K %ZISIOF,%ZISIOSL,%ZISIOBS,%ZISIOST,%ZISIOST(0),%ZISTO,%ZISTP,%ZISHG,%ZISSIO,%ZISOPEN,%ZISOPAR,%ZISUPAR 101 K %ZISMY,%ZISQUIT,%ZISLOCK 91 K %ZISCHK,%ZISCPU,%ZISI,%ZISR,%ZISVT,%ZISB,%ZISX,ZISI,%ZISHGL,%ZISHP,%ZISIO,%ZISIOS,%ZISIOM,%ZISIOF,%ZISIOSL,%ZISIOBS,%ZISIOST,%ZISIOST(0),%ZISTO,%ZISTP,%ZISHG,%ZISSIO,%ZISOPEN,%ZISOPAR,%ZISUPAR 92 K %ZISMY,%ZISQUIT 102 93 Q -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/ZIS2.m
r628 r636 1 %ZIS2 ;SFISC/AC,RWF -- DEVICE HANDLER (CHECKS) ;1/24/08 16:07 2 ;;8.0;KERNEL;**69,104,112,118,136,241,440**;JUL 10, 1995;Build 13 3 ;Per VHA Directive 2004-038, this routine should not be modified 1 %ZIS2 ;SFISC/AC,RWF -- DEVICE HANDLER (CHECKS) ;06/12/2002 15:41 2 ;;8.0;KERNEL;**69,104,112,118,136,241**;JUL 10, 1995 4 3 HUNT S:'$D(%ZISHP) %ZISHP=%E,%ZISHGL=0 S %E=0 5 4 F S %ZISHGL=$O(^%ZIS(1,%ZISHG(0),"HG",%ZISHGL)) Q:%ZISHGL'>0 D Q:%E … … 12 11 L2 ;Entry point from %ZIS1 13 12 I $D(DTOUT)!$D(DUOUT) K %ZISHP,%ZISHPOP Q 14 CHECK ;Get IO check for secondary $I 15 K %ZISCPU N %Z2 16 S POP=0,%Z=^%ZIS(1,%E,0),%Z2=$S(%ZIS("PRI")=1:"",1:$G(^%ZIS(1,%E,2))) ;Get Primary and secondary IO. 17 S IO=$S(%ZIS("PRI")=1:$P(%Z,"^",2),$L($P(%Z2,"^")):$P(%Z2,"^"),1:$P(%Z,"^",2)) ; 18 S:%IS["Q"&'$D(ZTQUEUED)&($P(%Z,"^",12)=1!$D(XQNOGO)) %ZISB=0,IO("Q")=1 ;Forced Queueing 13 CHECK K %ZISCPU S POP=0,%Z=^%ZIS(1,%E,0),IO=$P(%Z,"^",2) 14 S:%IS["Q"&'$D(ZTQUEUED)&($P(%Z,"^",12)=1!$D(XQNOGO)) %ZISB=0,IO("Q")=1 ;Forced Queueing 19 15 I $P(%Z,"^",12)=2 S %IS=$TR(%IS,"Q") I $D(IO("Q")) D Q 20 16 . I '$D(IOP) W !,"Queuing NOT ALLOWED on this device" -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/ZIS3.m
r628 r636 1 %ZIS3 ;SFISC/AC,RWF -- DEVICE HANDLER(DEVICE TYPES & PARAMETERS) ;1/24/08 13:18 2 ;;8.0;KERNEL;**18,36,69,104,391,440**;JUL 10, 1995;Build 13 3 ;Per VHA Directive 2004-038, this routine should not be modified 4 ;Call with a Go from ^%ZIS2 5 I %ZIS'["T",$G(^%ZIS(1,+%E,"POX"))]"" D XPOX^ZISX(%E) ;Pre-Open 1 %ZIS3 ;SFISC/AC,RWF -- DEVICE HANDLER(DEVICE TYPES & PARAMETERS) ;10/06/2005 13:23 2 ;;8.0;KERNEL;**18,36,69,104,391**;JUL 10, 1995 3 I %ZIS'["T",$G(^%ZIS(1,+%E,"POX"))]"" D XPOX^ZISX(%E) 6 4 I $D(%ZISQUIT) S POP=1 K %ZISQUIT 7 5 S %ZISCHK=1 8 ;I 'POP&(%ZISB)&(%ZTYPE'="RES")&(%ZTYPE'="OTH")&(%ZTYPE'="SDP")&(IO'["::") D DEVOK 9 ;See if need to lock. 10 K %ZISLOCK 11 I %ZIS'["T",+$G(^%ZIS(1,+%E,"GBL")) S %ZISLOCK=$NA(^%ZIS("lock",IO)) 12 ; 13 I 'POP G TRM:(%ZTYPE["TRM"),@(%ZTYPE_"^%ZIS6") ;Jump to next part 14 ; 15 Q ;%ZIS6 Returns here 16 ;See if need to un-lock. 17 I $D(%ZISUOUT) K %ZISUOUT,%ZISHP,%ZISHPOP Q 6 I 'POP&(%ZISB)&(%ZTYPE'="RES")&(%ZTYPE'="OTH")&(%ZTYPE'="SDP")&(IO'["::") D DEVOK 7 G Q:POP 8 G @%ZTYPE:(%ZTYPE["TRM"),@(%ZTYPE_"^%ZIS6") ;Jump to next part 9 ; 10 Q I $D(%ZISUOUT) K %ZISUOUT,%ZISHP,%ZISHPOP Q 18 11 I $D(%ZISHPOP)&$S(IO="":1,1:'$D(IO(1,IO))) D HGBSY^%ZIS2 Q 19 I POP S:%ZIS'["T" IO="" I $D(%ZISHG(0)),%ZIS'["D",'$D(%ZISHPOP) G HUNT^%ZIS2 20 Q ;Return to %ZIS1 21 ; 12 I POP S:%IS'["T" IO="" I $D(%ZISHG(0)),%IS'["D",'$D(%ZISHPOP) G HUNT^%ZIS2 13 Q 22 14 VTRM ;Virtual terminal type 23 TRM ;D OPEN^%ZIS4:'POP&(%ZISB&(%ZIS'["T")),MARGN:'POP,SETPAR:'POP ;Terminal type 24 D MARGN:'POP,SETPAR:'POP ;Terminal type// TEST CHANGE 25 I 'POP,%ZIS'["T",%ZISB=1,'$D(IOP),IO'=IO(0),'$D(IO("Q")),%ZIS["Q" D AQUE 26 W:'$D(IOP) ! 27 I '$D(IO("Q")),'POP,%ZISB,%ZIS'["T" D O^%ZIS4 15 TRM D OPEN^%ZIS4:'POP&(%ZISB&(%IS'["T")),MARGN:'POP,SETPAR:'POP ;Terminal type 16 I 'POP,%IS'["T",%ZISB=1,'$D(IOP),IO'=IO(0),'$D(IO("Q")),%IS["Q" D AQUE 17 W:'$D(IOP) ! I '$D(IO("Q")) D O^%ZIS4:'POP&(%ZISB&(%IS'["T")) 28 18 G Q 29 DEVOK N X,Y,X1 ;Not sure this is needed19 DEVOK N X,Y,X1 30 20 S X=IO,X1=%ZTYPE 31 21 D DEVOK^%ZOSV I Y=-99!(Y=0)!(Y=$J) Q 32 I Y>0 S POP=1 W:'$D(IOP)&('$D(%ZISHG(0))!(%IS["D")) !, $C(7),"[Device Unavailable]" Q33 I Y=-1 S IO="",POP=1 W:'$D(IOP)&('$D(ZISHG(0))!(%IS["D")) !, $C(7),"[Device does not Exist or Unavailable]" Q22 I Y>0 S POP=1 W:'$D(IOP)&('$D(%ZISHG(0))!(%IS["D")) !,*7,"[Device Unavailable]" Q 23 I Y=-1 S IO="",POP=1 W:'$D(IOP)&('$D(ZISHG(0))!(%IS["D")) !,*7,"[Device does not Exist or Unavailable]" Q 34 24 Q 35 25 ; … … 49 39 S POP=1 I %ZISB&(%ZTYPE["TRM")&(IO'=IO(0)) C IO K IO(1,IO) Q 50 40 Q 51 SETPAR S: $L(%ZISOPAR)&($E(%ZISOPAR)'="(") %ZISOPAR="("_%ZISOPAR_")"41 SETPAR S:%ZISOPAR]""&($A(%ZISOPAR)-40) %ZISOPAR="("_%ZISOPAR_")" 52 42 Q 53 AQUE ;Ask about Queueing 54 W ! S %=$S($D(IO("Q")):1,1:2),U="^",%ZISDTIM=60 43 AQUE W ! S %=$S($D(IO("Q")):1,1:2),U="^",%ZISDTIM=60 55 44 I $D(IO("Q")) W !,"Previously, you have selected queueing." 56 45 W !,"Do you "_$S($D(IO("Q")):"STILL ",1:"")_"want your output QUEUED" … … 58 47 I %=-1 S POP=1,%ZISHPOP=1,%ZISUOUT=1 C IO K IO(1,IO) Q 59 48 I %=1 S IO("Q")=1 C IO K IO(1,IO) Q 60 ;I %=2 K IO("Q")61 49 Q 62 50 ST(%ZISTP) ; … … 81 69 S:IOST="" IOST="P-OTHER",IOST(0)=0 82 70 Q 71 -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/ZIS4GTM.m
r628 r636 1 %ZIS4 ;ISF/RWF,DW - DEVICE HANDLER SPECIFIC CODE (GT.M for Unix/VMS) ; 1/24/08 16:082 ;;8.0;KERNEL;**275,425 ,440**;Jul 10, 1995;Build 133 ; Per VHA Directive 2004-038, this routine should not be modified1 %ZIS4 ;ISF/RWF,DW - DEVICE HANDLER SPECIFIC CODE (GT.M for Unix/VMS) ;03/07/2007 2 ;;8.0;KERNEL;**275,425**;Jul 10, 1995;Build 18 3 ; 4 4 OPEN ;From %ZIS3 for TRM 5 5 G OPN2:$D(IO(1,IO)) … … 13 13 Q 14 14 ;Why no open paraneters??? 15 OP1 N $E T S $ET="G OPNERR^%ZIS4"16 I $D(%ZISLOCK) L +@%ZISLOCK:5 E S POP=1 Q17 O IO::%ZISTO S:$T IO(1,IO)="" S:'$T POP=1 15 OP1 N $ES,$ET S $ET="G OPNERR^%ZIS4" 16 L:$D(%ZISLOCK) +@%ZISLOCK:60 17 O IO::%ZISTO S:$T IO(1,IO)="" S:'$T POP=1 L:$D(%ZISLOCK) -@%ZISLOCK 18 18 Q 19 19 OPNERR ;Open Error 20 S POP=1,IO("LASTERR")=$G(IO("ERROR")),IO("ERROR")=$$EC^%ZOSV,$EC="" 21 Q 20 S POP=1,IO("LASTERR")=$G(IO("ERROR")),IO("ERROR")=$$EC^%ZOSV,$EC="" Q 22 21 ; 23 O ;From %ZIS6 for alltypes.22 O ;From %ZIS6 for other types. 24 23 D:%IS["L" ZIO 25 I $D(IO("S")),$D(^%ZIS(2,IO("S"),10)),^(10)]"" U IO(0) D X10^ZISX ;Open Printer Port 24 LCKGBL ;Lock Global 25 I %ZTYPE="CHAN" N % S %=$G(^%ZIS(1,+%E,"GBL")) I $L(%) L @("+^"_%_":0") S:'$T POP=1 I POP W:'$D(IOP) !,?5,*7,"[DEVICE IS BUSY]" Q 26 I $D(IO("S")),$D(^%ZIS(2,IO("S"),10)),^(10)]"" U IO(0) D X10^ZISX 26 27 OPAR I $D(IOP),%ZTYPE="HFS",$D(%IS("HFSIO")),$D(%IS("IOPAR")),%IS("HFSIO")]"" S IO=%IS("HFSIO"),%ZISOPAR=%IS("IOPAR") 27 28 I %ZTYPE="CHAN" D TCPIP Q:POP G OXECUTE^%ZIS6 28 S %A=%ZISOPAR_$S(%ZISOPAR["):":"", 1:":"_%ZISTO)29 S %A=%ZISOPAR_$S(%ZISOPAR["):":"",%ZTYPE["CHAN"&($P(%ZTIME,"^",3)="n"):"",1:":"_%ZISTO) 29 30 N % S %(IO)="",%=$P($P($NA(%(IO)),"(",2),")") 30 31 S %A=%_$E(":",%A]"")_%A … … 39 40 ; 40 41 O1 N $ES,$ET S $ET="G OPNERR^%ZIS4" 41 I $D(%ZISLOCK) L +@%ZISLOCK:5 E S POP=1 Q42 O @%A S:'$T&(%A?.E1":".N) POP=1 S:'POP IO(1,IO)="" 42 L:$D(%ZISLOCK) +@%ZISLOCK:60 43 O @%A S:'$T&(%A?.E1":".N) POP=1 S:'POP IO(1,IO)="" L:$D(%ZISLOCK) -@%ZISLOCK 43 44 S IO("ERROR")="" Q 44 45 ; … … 53 54 Q 54 55 ; 55 TCPIP ;For TCP/IP devices , should use ^%ZISTCP56 TCPIP ;For TCP/IP devices 56 57 N %S 57 58 S %ZISTO=$G(%ZISTO,3) … … 66 67 I $D(ZISDA) W:'$D(IOP) !?5,*7,"You may not Spool the printing of a Spool document" G N 67 68 I $D(DUZ)[0 W:'$D(IOP) !,"Must be a valid user." G N 68 R S %ZY=-1 D NEWDOC^ZISPL1 G N:%ZY'>0 69 S %ZDA=+%ZY,%ZFN=$P(%ZY(0),U,2),IO("DOC")=$P(%ZY(0),U,1) G OK:$D(IO("Q")) 70 G:'%ZISB OK I '$P(%ZY,"^",3),$L(%ZFN) O %ZFN:(append:nowrap):2 G DOC 69 R S %ZY=-1 D NEWDOC^ZISPL1 G N:%ZY'>0 S %ZDA=+%ZY,%ZFN=$P(%ZY(0),U,2),IO("DOC")=$P(%ZY(0),U,1) G OK:$D(IO("Q")) 70 G:'%ZISB OK I '$P(%ZY,"^",3),%ZFN]"" D SPL3 G N:%ZFN']"",DOC 71 71 S %ZFN=IO_"SPOOL_no_"_%ZDA_".TMP" D SPL2 G:%ZFN']"" N S $P(^XMB(3.51,%ZDA,0),U,2)=%ZFN,^XMB(3.51,"C",%ZFN,%ZDA)="" 72 72 DOC S IO=%ZFN,IO("SPOOL")=%ZDA,^XUTL("XQ",$J,"SPOOL")=%ZDA,IOF="#" … … 74 74 OK K %ZDA,%ZFN Q 75 75 N K %ZDA,%ZFN,IO("DOC") S POP=1 Q 76 ; 77 SPL2 ;Open for write 78 O %ZFN:(newversion:noreadonly:nowrap:exception="G SPL4"):2 G:$ZA<0 SPL4 S IO(1,%ZFN)="" Q 79 ; 80 SPL3 ;Open for Read 81 O %ZFN:(readonly:exception="G SPL4"):2 S:'$T ZISPLQ=1 G:'$T SPL4 S IO(1,%ZFN)="" Q 76 SPL2 O %ZFN:(NEWVERSION:WORLD=RWD) G:$ZA<0 SPL4 S IO(1,%ZFN)="" Q 77 SPL3 N X S X="SPL4^%ZIS4",@^%ZOSF("TRAP") 78 O %ZFN:READONLY:1 S:'$T ZISPLQ=1 G:$ZA<0!('$T) SPL4 S IO(1,%ZFN)="" Q 82 79 SPL4 W:'$D(IOP)&'$D(ZTQUEUED) !?5,*7,"Couldn't open the spool file." S %ZFN="" Q 83 ; 84 CLOSE ;Close out the spool 85 N %,%1,%Z1,%ZFN,%ZS,%ZDA,XS,%Y,%X 86 I $L(IO) C IO K IO(1,IO) 87 D FILE^ZISPL1 I %ZDA'>0 K ZISPLAD Q 88 S %ZFN=$P(%ZS,"^",2) D SPL3 Q:%ZFN']"" S %ZCR=$C(13),%Y="" 89 S %Z1=+$G(^XTV(8989.3,1,"SPL")),%=0 90 U %ZFN F R %X#255:5 Q:$ZEOF S %2=%X D CL2 Q:%Z1<% 80 CLOSE N %Z1 C:IO]"" IO K:IO]"" IO(1,IO) D FILE^ZISPL1 I %ZDA'>0 K ZISPLAD Q 81 S %ZFN=$P(%ZS,"^",2) D SPL3 Q:%ZFN']"" U %ZFN S %ZCR=$C(13),%Y="",X="SPLEOF^%ZIS4",@^%ZOSF("TRAP") 82 S %Z1=+$G(^XTV(8989.3,1,"SPL")) 83 F %=0:0 R %X#255:5 Q:$ZA<0 S %2=%X D CL2 G:%Z1<% SPLEX 84 SPLEOF I $ZE'["ENDO" Q ;Send error up 91 85 SPLEX C %ZFN:(DELETE) K:%ZFN]"" IO(1,%ZFN) D CLOSE^ZISPL1 K %Y,%X,%1,%ZFN Q 92 86 ; -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/ZIS4ONT.m
r628 r636 1 %ZIS4 ;SFISC/RWF,AC - DEVICE HANDLER SPOOL SPECIFIC CODE (Cache) ;1/24/08 16:08 2 ;;8.0;KERNEL;**34,59,69,191,278,293,440**;Jul 10, 1995;Build 13 3 ;Per VHA Directive 2004-038, this routine should not be modified 4 OPEN ;Called for TRM devices 5 G OPN2:$D(IO(1,IO)) 1 %ZIS4 ;SFISC/RWF,AC - DEVICE HANDLER SPOOL SPECIFIC CODE (OpenM/WNT) ;11/03/2003 17:32 2 ;;8.0;KERNEL;**34,59,69,191,278,293**;Jul 10, 1995 3 ; 4 OPEN G OPN2:$D(IO(1,IO)) 6 5 S POP=0 D OP1 G NOPEN:'$D(IO(1,IO)) 7 OPN2 ; 8 I $D(%ZISHP),'$D(IOP) W !,$C(7)_" Routing to device "_$P(^%ZIS(1,%E,0),"^",1)_$S($D(^(1)):" "_$P(^(1),"^",1)_" ",1:"") 6 OPN2 I $D(%ZISHP),'$D(IOP) W !,$C(7)_" Routing to device "_$P(^%ZIS(1,%E,0),"^",1)_$S($D(^(1)):" "_$P(^(1),"^",1)_" ",1:"") 9 7 Q 10 NOPEN ; 11 I %IS'["D",$D(%ZISHP)!(%ZISHG]"") S POP=1 Q 8 NOPEN I %IS'["D",$D(%ZISHP)!(%ZISHG]"") S POP=1 Q 12 9 I '$D(IOP) W $C(7)_" [BUSY]" W " ... RETRY" S %=2,U="^" D YN^%ZIS1 G OPEN:%=1 10 K:%E'=%H ^XUTL("ZISPARAM",IO) 13 11 S POP=1 Q 14 12 Q 15 OP1 N $ET S $ET="G OPNERR^%ZIS4"16 I $D(%ZISLOCK) L +@%ZISLOCK:5 E S POP=1 Q17 O IO::%ZISTO S:$T IO(1,IO)="" S:'$T POP=1 13 OP1 N X S X="OPNERR^%ZIS4",@^%ZOSF("TRAP") 14 L:$D(%ZISLOCK) +@%ZISLOCK:60 15 O IO::%ZISTO S:$T IO(1,IO)="" S:'$T POP=1 L:$D(%ZISLOCK) -@%ZISLOCK 18 16 Q 19 OPNERR S POP=1,IO("LASTERR")=$G(IO("ERROR")),IO("ERROR")=$ZE,$EC="" 20 Q 17 OPNERR S POP=1,IO("LASTERR")=$G(IO("ERROR")),IO("ERROR")=$ZE,$EC="" Q 21 18 ; 22 O ;Gets called for all devices 23 N X,%A1 24 D:%ZIS["L" ZIO 19 O N X D:%IS["L" ZIO 25 20 I $D(IO("S")),$D(^%ZIS(2,IO("S"),10)),^(10)]"" U IO(0) D X10^ZISX ;Open Printer port 26 OPAR I $D(IOP),%ZTYPE="HFS",$D(% ZIS("HFSIO")),$D(%ZIS("IOPAR")),%ZIS("HFSIO")]"" S IO=%ZIS("HFSIO"),%ZISOPAR=%ZIS("IOPAR")27 S %A=$S( $L(%ZISOPAR):%ZISOPAR,%ZTYPE'["TRM":"",$E(%ZISIOST,1)="C":"("_+%Z91_":""C"")",$E(%ZISIOST,1,2)="PK":"("_+%Z91_":""P"")",1:+%Z91)21 OPAR I $D(IOP),%ZTYPE="HFS",$D(%IS("HFSIO")),$D(%IS("IOPAR")),%IS("HFSIO")]"" S IO=%IS("HFSIO"),%ZISOPAR=%IS("IOPAR") 22 S %A=$S(%ZISOPAR]"":%ZISOPAR,%ZTYPE'["TRM":"",%ZISIOST?1"C".E:"("_+%Z91_":""C"")",%ZISIOST?1"PK".E:"("_+%Z91_":""P"")",1:+%Z91) 28 23 S %A=%A_$S(%A["):":"",%ZTYPE["OTH"&($P(%ZTIME,"^",3)="n"):"",1:":"_%ZISTO),%A=""""_IO_""""_$E(":",%A]"")_%A 29 24 D O1 I POP W:'$D(IOP) !,?5,$C(7)_"[Device is BUSY]" Q 30 25 ;I %ZTYPE="HFS" U IO S X=IO,IO=IO_";"_$P($ZIO,";",2),IO(1,IO)="" K IO(1,X) 31 26 U IO S $X=0,$Y=0 32 I $L(%ZISUPAR)S %A1=""""_IO_""":"_%ZISUPAR U @%A127 I %ZISUPAR]"" S %A1=""""_IO_""":"_%ZISUPAR U @%A1 33 28 ;U:%IS'[0 IO(0) 34 29 G OXECUTE^%ZIS6 35 30 ; 36 O1 N $ET S $ET="G OPNERR^%ZIS4"37 I $D(%ZISLOCK) L +@%ZISLOCK:5 E S POP=1 Q31 O1 N X S X="OPNERR^%ZIS4",@^%ZOSF("TRAP") 32 L:$D(%ZISLOCK) +@%ZISLOCK:60 38 33 O @%A S:'$T&(%A?.E1":".N) POP=1 S:'POP IO(1,IO)="" 34 L:$D(%ZISLOCK) -@%ZISLOCK 39 35 S IO("ERROR")="" 40 36 Q -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/ZIS6.m
r628 r636 1 %ZIS6 ;SFISC/AC - DEVICE HANDLER -- RESOURCES ;1/24/08 16:09 2 ;;8.0;KERNEL;**24,49,69,118,127,136,440**;JUL 10, 1995;Build 13 3 ;Per VHA Directive 2004-038, this routine should not be modified 1 %ZIS6 ;SFISC/AC - DEVICE HANDLER -- RESOURCES ;02/04/2000 08:14 2 ;;8.0;KERNEL;**24,49,69,118,127,136**;JUL 10, 1995 4 3 ;Expect that IO is current device 5 OXECUTE ;Open Execute 6 I $D(^%ZIS(2,%ZISIOST(0),2))=1 S %Y=^(2) D 2 7 ANSBAK ;Answer Back 8 I $D(^%ZIS(2,%ZISIOST(0),102)) S %Y=^(102) D 2 E S POP=1 D:'$D(IOP) SAY($C(7)_"[NOT ON LINE]") C:%ZISB IO K IO(1,IO) G QUIT 4 OXECUTE I $D(^%ZIS(2,%ZISIOST(0),2))=1 S %Y=^(2) D 2 5 ANSBAK I $D(^%ZIS(2,%ZISIOST(0),102)) S %Y=^(102) D 2 E S POP=1 D:'$D(IOP) SAY($C(7)_"[NOT ON LINE]") C:%ZISB IO K IO(1,IO) G QUIT 9 6 I $D(%ZISMTR) X ^%ZOSF("MAGTAPE") U IO W:$D(%MT("REW")) @%MT("REW") U IO(0) K %MT 10 7 G QUIT:'$D(IO("P")) … … 63 60 HG ; 64 61 Q 65 SPL ;Spool type 66 N %E,%Z D MARGN^%ZIS3 W:'$D(IOP) ! D SPOOL^%ZIS4:%IS'["T" 62 SPL N %E,%Z D MARGN^%ZIS3 W:'$D(IOP) ! D SPOOL^%ZIS4:%IS'["T" ;Spool type 67 63 G Q 68 64 MT D MARGN^%ZIS3,ASKPAR,AMTREW:'POP&'$D(IOP)&%ZISB W:'$D(IOP) ! D O^%ZIS4:'POP&(%ZISB&(%IS'["T")) ;Magtape type 69 65 G Q 70 SDP ;Sequential disk processor type 71 D MARGN^%ZIS3,ASKPAR W:'$D(IOP) ! D O^%ZIS4:'POP&(%ZISB&(%IS'["T")) 66 SDP D MARGN^%ZIS3,ASKPAR W:'$D(IOP) ! D O^%ZIS4:'POP&(%ZISB&(%IS'["T")) ;Sequential disk processor type 72 67 G Q 73 HFS ;Host File Server type 74 D MARGN^%ZIS3,HFS^%ZIS4 W:'$D(IOP) ! D O^%ZIS4:'POP&(%ZISB&(%IS'["T")) 68 HFS D MARGN^%ZIS3,HFS^%ZIS4 W:'$D(IOP) ! D O^%ZIS4:'POP&(%ZISB&(%IS'["T")) ;Host File Server type 75 69 G Q 76 RES ;Resources 77 G Q:%IS["T" N X,X1 I %IS'["R"!'$D(IOP) S POP=1 W:'$D(IOP) *7," [NOT AVAILABLE]" Q 70 RES G Q:%IS["T" N X,X1 I %IS'["R"!'$D(IOP) S POP=1 W:'$D(IOP) *7," [NOT AVAILABLE]" Q ;Resources 78 71 G Q:$D(IO(1,IO)) I %IS["T" S X=IO,X1="RES" D DEVOK^%ZIS3 S:Y POP=1 G Q:POP 79 72 D:%ZISB RES1 G Q … … 84 77 IMPC ;Imaging Work Station 85 78 BAR ;Bar Code 86 OTH ;Other Device type 87 D MARGN^%ZIS3:'POP,ASKPAR:'POP W:'$D(IOP) ! D O^%ZIS4:'POP&(%ZISB&(%IS'["T")) 79 OTH D MARGN^%ZIS3:'POP,ASKPAR:'POP W:'$D(IOP) ! D O^%ZIS4:'POP&(%ZISB&(%IS'["T")) ;Other Device type 88 80 G Q 89 81 ; 90 ASKPAR ;Ask Parameters 91 G SETPAR^%ZIS3:$D(IOP),SETPAR^%ZIS3:'$P(^%ZIS(1,%E,0),"^",4) W " ADDRESS/PARAMETERS: " W:%ZISOPAR]"" %ZISOPAR_"// " D SBR^%ZIS1 D MSG1:%X="?" G ASKPAR:%X="?" S:%X]"" %ZISOPAR=%X I $D(DTOUT)!$D(DUOUT) S POP=1 82 ASKPAR G SETPAR^%ZIS3:$D(IOP),SETPAR^%ZIS3:'$P(^%ZIS(1,%E,0),"^",4) W " ADDRESS/PARAMETERS: " W:%ZISOPAR]"" %ZISOPAR_"// " D SBR^%ZIS1 D MSG1:%X="?" G ASKPAR:%X="?" S:%X]"" %ZISOPAR=%X I $D(DTOUT)!$D(DUOUT) S POP=1 92 83 I POP,%ZISB&(%ZTYPE["TRM") C IO K IO(1,IO) Q 93 84 Q:POP G SETPAR^%ZIS3 85 AMTREW I %ZISB,%ZTYPE="MT",'$D(IOP) W " REWIND" S %=2,U="^",%ZISDTIM=60 D YN^%ZIS1 K %ZISDTIM G AMTREW:%=0 I %=-1 S POP=1 Q 86 S:%=1 %ZISMTR=1 Q 87 MSG1 W !?5,"Enter the desired parameters needed to open the selected device.",!?25 Q 94 88 ; 95 AMTREW ;Mag Tape Rewind96 I %ZISB,%ZTYPE="MT",'$D(IOP) W " REWIND" S %=2,U="^",%ZISDTIM=60 D YN^%ZIS1 K %ZISDTIM G AMTREW:%=0 I %=-1 S POP=1 Q97 S:%=1 %ZISMTR=198 Q99 MSG1 W !?5,"Enter the desired parameters needed to open the selected device.",!?25100 Q101 ; -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/ZISC.m
r628 r636 1 %ZISC ;SFISC/GFT,AC,MUS - CLOSE LOGIC FOR DEVICES ;1/24/08 16:09 2 ;;8.0;KERNEL;**24,36,49,69,199,216,275,409,440**;JUL 10, 1995;Build 13 3 ;Per VHA Directive 2004-038, this routine should not be modified 1 %ZISC ;SFISC/GFT,AC,MUS - CLOSE LOGIC FOR DEVICES ;01/14/2002 09:06 2 ;;8.0;KERNEL;**24,36,49,69,199,216,275,409**;JUL 10, 1995;Build 3 4 3 C0 ; 5 4 N %,%E,%H,%ZISI,%ZISOS,%ZISX,%ZISV … … 42 41 . U:$S($D(ZTQUEUED):0,'$L($G(IO(0))):0,$D(IO(1,IO(0)))#2:1,1:0) IO(0) 43 42 . C IO K IO(1,IO) S IO("CLOSE")=IO ;close device 44 ;Unlock global used to control access.45 S %=$G(^XUTL("XQ",$J,"lock",+$G(IOS))) I $L(%) L -@% K ^XUTL("XQ",$J,"lock",IOS)46 43 ; 44 ; 45 I $D(IOT),IOT="CHAN",$D(IOS) D 46 .S %=$G(^%ZIS(1,+IOS,"GBL")) 47 .I %]"" L @("-^"_%) ;unlock global used to control access to network channels. 47 48 I $D(IO("SPOOL")) D CLOSE^%ZIS4 ;Special close for spool device 48 49 ; -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/ZISEDIT.m
r628 r636 1 ZISEDIT ; ISF/AC - DEVICE EDIT ;01/17/20082 ;;8.0;KERNEL; **440**;Jul 10, 1995;Build 131 ZISEDIT ;SFISC/AC - DEVICE EDIT ;11/9/92 17:00 2 ;;8.0;KERNEL;;Jul 10, 1995 3 3 ; 4 TRM ;TRM or VTRM 5 D EDIT("TRM",,"Select Terminal/Printer Device: ") 4 MT S ZISTYPE="MT",DIC("A")="Select Magtape Device: " D EDIT K ZISTYPE 6 5 Q 7 6 ; 8 LPD ;LPD fields of a TRM device 9 D EDIT("LPD","TRM","Select LPD (Terminal/Printer) Device: ") 7 SDP S ZISTYPE="SDP",DIC("A")="Select SDP Device: " D EDIT K ZISTYPE 10 8 Q 11 9 ; 12 MT ;Mag Tape 13 D EDIT("MT",,"Select Magtape Device: ") 10 SPL S ZISTYPE="SPL",DIC("A")="Select Spool Device: " D EDIT K ZISTYPE 14 11 Q 15 12 ; 16 SDP ; 17 D EDIT("SDP",,"Select SDP Device: ") 13 HFS S ZISTYPE="HFS",DIC("A")="Select Host File Device: " D EDIT K ZISTYPE 18 14 Q 19 15 ; 20 SPL ;Spool 21 D EDIT("SPL",,"Select Spool Device: ") 16 CHAN S ZISTYPE="CHAN",DIC("A")="Select Network Channel: " D EDIT K ZISTYPE 22 17 Q 23 ; 24 HFS ;Host file 25 D EDIT("HFS",,"Select Host File Device: ") 26 Q 27 ; 28 CHAN ;Network 29 D EDIT("CHAN",,"Select Network Channel: ") 30 Q 31 ; 32 RES ;Resource 33 D EDIT("RES",,"Select Resource Device: ") 34 Q 35 ; 36 EDIT(ZISTYPE,ZISSCR,DICA) ; 37 N Y,DA,DIC,DIE,DR,DDSFILE 38 ED2 S DIC("A")=DICA,ZISSCR=$G(ZISSCR,ZISTYPE) 39 S DIC=3.5,DIC(0)="AEMQZL",DIC("S")="I $G(^(""TYPE""))["_""""_ZISSCR_"""" D ^DIC 40 Q:Y'>0 41 S DA=+Y 42 I $P(Y,"^",3) D 43 . N DIE,DR 44 . S DIE=DIC,DR="2///"_ZISTYPE_$S(ZISTYPE["TRM":"",1:";1.95///N") 45 . D ^DIE 46 . Q 18 ;;7.1P0;Kernel;; 19 EDIT S DIC=3.5,DIC(0)="AEMQZL",DIC("S")="I $G(^(""TYPE""))="_""""_ZISTYPE_"""" D ^DIC 20 I Y'>0 K DIC Q 21 S DA=+Y I $P(Y,"^",3) S DIE=DIC,DR="2///"_ZISTYPE D ^DIE K DIE,DR 47 22 S DR="[XUDEVICE "_ZISTYPE_"]",DDSFILE=3.5 D ^DDS 48 G ED2 49 Q 23 K DA,DR,DDSFILE Q -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/ZISHONT.m
r628 r636 1 %ZISH ;IHS /PR,SFISC/AC - Host File Control for Cache for VMS/NT/UNIX ;1/24/08 16:112 ;;8.0;KERNEL;**34,65,84,104,191,306,385 ,440**;JUL 10, 1995;Build 133 ; Per VHA Directive 2004-038, this routine should not be modified1 %ZISH ;IHS\PR,SFISC/AC - Host File Control for OpenM/Cache for NT/VMS ;12/13/2005 2 ;;8.0;KERNEL;**34,65,84,104,191,306,385**;JUL 10, 1995;Build 3 3 ; 4 4 ; **MODIFIED VERSION FOR CACHE/VMS -- 9/7/01** 5 5 ; … … 43 43 Q 0 44 44 ; 45 DEL(%ZX1,%ZX2) ;ef,SR. Del f iles, return 1 if deleted all requested.45 DEL(%ZX1,%ZX2) ;ef,SR. Del fl(s) 46 46 ;S Y=$$DEL^%ZISH("dir path",$NA(array)) 47 ; will invoke an OS command to delete file(s) 48 ; UNIX: rm -f filespec[ ...] 49 ; VMS: del filespec[,...] 50 N %ZARG,%ZXDEL,%ZOS,%ZDELIM,%ZCOMND,%ZLIST 51 S %ZARG="",%ZXDEL=1 52 S %ZX1=$$DEFDIR($G(%ZX1)) 53 S %ZOS=$$OS^%ZOSV 54 S %ZDELIM=$S(%ZOS="UNIX":" ",1:",") 55 S %ZCOMND=$S(%ZOS="UNIX":"rm -f ",1:"del ") 56 D 47 N %,%ZX,%ZXDEL,%ZISH,%ZOS 48 S %ZX1=$$DEFDIR($G(%ZX1)),%ZOS=$$OS^%ZOSV,%ZXDEL=1,%ZISH="" 49 F S %ZISH=$O(@%ZX2@(%ZISH)) Q:%ZISH="" D 57 50 . N $ETRAP,$ESTACK S $ETRAP="D DELERR^%ZISH" 58 . N %,%ZI,%ZISH,%ZX,%ZFOUND S %ZISH="" 59 . F %ZI=1:1 S %ZISH=$O(@%ZX2@(%ZISH)) Q:%ZISH="" D 60 . . N $ETRAP,$ESTACK S $ETRAP="D DELERR^%ZISH" 61 . . I %ZISH["*" S %ZXDEL=0 Q ; Wild card not allowed. 62 . . S %ZX=$S(%ZISH[%ZX1:%ZISH,1:%ZX1_%ZISH) ; prepend directory path 63 . . I %ZOS="VMS",%ZX'[";" S %ZX=%ZX_";*" 64 . . S %ZFOUND=$ZSEARCH(%ZX)]"" ; File exists 65 . . S:%ZFOUND %ZARG=$S(%ZARG="":%ZX,1:%ZARG_%ZDELIM_%ZX) ; join files 66 . . I $L(%ZARG)>2000 S %=$ZF(-1,%ZCOMND_%ZARG),%ZARG="" H 1 ; delete files at a time 67 . ; 68 . I $L(%ZARG) S %=$ZF(-1,%ZCOMND_%ZARG) ; delete remaining files 69 ; 70 I %ZXDEL S %ZXDEL='$$LIST(%ZX1,%ZX2,"%ZLIST") 51 . I %ZISH["*" S %ZXDEL=0 Q ; Wild card not allowed. 52 . S %ZX=$S(%ZISH[%ZX1:%ZISH,1:%ZX1_%ZISH) 53 . I %ZOS="VMS",%ZX'[";" S %ZX=%ZX_";*" 54 . Q:$ZSEARCH(%ZX)']"" ; File doesn't exist 55 . S %=$ZF(-1,$S(%ZOS="UNIX":"rm ",1:"del ")_%ZX) 56 . I $ZSEARCH(%ZX)]"" S %ZXDEL=0 ; Delete was not successful. 71 57 Q %ZXDEL 72 58 ; 73 59 DELERR ;Trap any $ETRAP error, unwind and return. 74 60 S $ETRAP="D UNWIND^%ZTER" 75 S %ZXDEL=0 ,%ZARG=""61 S %ZXDEL=0 76 62 D UNWIND^%ZTER 77 63 Q 78 64 ; 79 DEL1(%ZX3) ;ef,SR. Delete one file80 N %ZI1,%ZI281 D SPLIT(%ZX3,.%ZI1,.%ZI2) S %ZI2(%ZI2)=""82 Q $$DEL(%ZI1,$NA(%ZI2))83 ;84 SPLIT(%I,%O1,%O2) ;Split to path,file85 N %ZOS,%D,D S %ZOS=$$OS^%ZOSV86 I %ZOS["VMS" D Q87 . S D=$S(%I["]":"]",1:":")88 . S %O1=$P(%I,D,1)_D,%O2=$P(%I,D,2)89 . Q90 S %D=$S(%ZOS="UNIX":"/",%ZOS="NT":"\",1:""),%O1="",%O2="" Q:%D=""91 S D=$L(%I,%D),%O1=$P(%I,%D,1,D-1),%O2=$P(%I,%D,D)92 Q93 ;94 FEXIST(%PATH,%FL) ;Check if files exsist.95 ;S Y=$$DTEST("/usr/var",$NA(array))96 N %ZISH,%ZISHY97 S %ZISH=$$LIST(%PATH,%FL,"%ZISHY")98 Q %ZISH99 ;100 65 LIST(%ZX1,%ZX2,%ZX3) ;ef,SR. Create a local array holding file names 101 ;S Y=$$LIST^ %ZISH("\dir\",$NA(array),$NA(return array)) Return 1 if found anything66 ;S Y=$$LIST^ZOSHDOS("\dir\",$NA(array),$NA(return array)) Return 1 if found anything 102 67 ; 103 68 N %ZISH,%ZISHN,%ZX,%ZISHY,%ZY,%ZOS … … 110 75 . ;NT, display case, ignore for lookup 111 76 . S %ZX=%ZX1_%ZISH 112 . F %ZISHN=0:1 D Q:(%ZX="") 77 . F %ZISHN=0:1 D Q:(%ZX="") 113 78 . . S %ZX=$ZSEARCH($S(%ZISHN:"",1:%ZX)) 114 79 . . ;Q:(%ZX="")!($$UP^XLFSTR(%ZX)'[%ZISHY)!(%ZX?.E1.2".") … … 161 126 N %ZOS,P1,P2 S %ZOS=$$OS^%ZOSV,DF=$G(DF) 162 127 Q:DF="." "" ;Special way to get current dir. 163 S:DF="" DF=$G(^XTV(8989.3,1,"DEV")) ,DF=$P(DF,"^",$S($$PRI^%ZOSV<2:1,1:2))128 S:DF="" DF=$G(^XTV(8989.3,1,"DEV")) 164 129 Q:DF="" "" 165 130 ;Check syntax, VMS needs disk:[dir] or logical: … … 171 136 . S DF=P1_P2 S:DF'[":" DF=DF_":" 172 137 . Q 173 ;Check syntax, Unix needs /mnt/fl, ./fl , ~/fl $HOME/fl138 ;Check syntax, Unix needs /mnt/fl, ./fl 174 139 I %ZOS="UNIX" D 175 140 . S DF=$TR(DF,"\","/") 176 141 . S:$E(DF,$L(DF))'="/" DF=DF_"/" 177 142 . Q 178 ;Check syntax, NT needs c:\dir\ 143 ;Check syntax, NT needs c:\dir\ 179 144 I %ZOS="NT" D 180 145 . N P1,P2 … … 227 192 ; 228 193 FTG(%ZX1,%ZX2,%ZX3,%ZX4,%ZX5) ;ef,SR. Unload contents of host file into global 229 ;p1=hostf file directory 194 ;p1=hostf file directory 230 195 ;p2=host file name 231 196 ;p3= $NAME REFERENCE INCLUDING STARTING SUBSCRIPT -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/ZISS1.m
r628 r636 1 %ZISS1 ;AC/SFISC - Collect screen parameters 5/29/88 2:02 PM ;1/24/08 16:10 2 ;;8.0;KERNEL;**69,440**;JUL 10, 1995;Build 13 3 ;Per VHA Directive 2004-038, this routine should not be modified 4 VALID ; 5 N %ZISI,%ZISNP,ZISCH,ZISEND,ZISNUM,ZISQ,ZISXL,ZISXLN ;p440 6 D L 1 %ZISS1 ;AC/SFISC - Collect screen parameters 5/29/88 2:02 PM ;11/05/97 08:40 2 ;;8.0;KERNEL;**69**;JUL 10, 1995 3 VALID D L K %ZISI,%ZISNP,ZISCH,ZISEND,ZISNUM,ZISQ,ZISXL,ZISXLN Q 4 ; 5 SET2 S %ZISFN="" F %ZISZ=0:0 S %ZISFN=$O(%ZISZ(%ZISFN)) Q:%ZISFN="" I $D(%ZISZ(%ZISFN))#2 S %ZISXX=%ZISZ(%ZISFN) D INDCK 7 6 Q 8 ; 9 SET2 ; 10 S %ZISFN="" F %ZISZ=0:0 S %ZISFN=$O(%ZISZ(%ZISFN)) Q:%ZISFN="" I $D(%ZISZ(%ZISFN))#2 S %ZISXX=%ZISZ(%ZISFN) D INDCK 11 Q 12 INDCK ; 13 S %ZISY="" 7 INDCK S %ZISY="" 14 8 I "IOEFLD^IOSTBM"[%ZISFN S @%ZISFN=%ZISXX Q 15 9 I %ZISXX]"" S @("%ZISY="_%ZISXX) … … 18 12 E S @("IO"_$E(%ZISFN,1,6))=%ZISY 19 13 Q:'$D(%ZIS)#2 Q:%ZIS'["I" Q:'$D(%ZISZ(%ZISFN,1)) 20 ; 21 SRAY ; 22 S %=%ZISY,%ZISY=$A($E(%ZISY,1)) 14 SRAY S %=%ZISY,%ZISY=$A($E(%ZISY,1)) 23 15 F %1=2:1:$L(%) S %ZISY=%ZISY_$S($A(%,%1)<32:$A(%,%1),$A(%,%1)=127:127,1:$E(%,%1)) 24 16 S IOIS(%ZISY)=%ZISFN 25 17 Q 26 18 CHECK ;Entry point called from input transforms of fields in DEV/TT files. 27 N %ZISXX,%ZISYY,%ZISI,%ZISNP,%ZISX1,%ZISX2,ZISCH,ZISNUM,ZISQ,ZISXL,ZISXLN ;p440 28 S %ZISXX=X D L S X=%ZISYY 19 S %ZISXX=X D L S X=%ZISYY K %ZISXX,%ZISYY,%ZISI,%ZISNP,%ZISX1,%ZISX2,ZISCH,ZISNUM,ZISQ,ZISXL,ZISXLN 29 20 Q 30 21 CHECK1 ;Entry point called from input transforms of fields in DEV/TT files. 31 N %ZISXX,%ZISYY,%ZISI,%ZISNP,%ZISX1,%ZISX2,ZISCH,ZISNUM,ZISQ,ZISXL,ZISXLN ;p44032 22 S %ZISXX=$S(X?1"W ".E:$E(X,3,$L(X)),1:X) 33 D L S X=$S(X?1"W ".E:"W "_%ZISYY,1:%ZISYY) 23 D L S X=$S(X?1"W ".E:"W "_%ZISYY,1:%ZISYY) K %ZISXX,%ZISYY,%ZISI,%ZISNP,%ZISX1,%ZISX2,ZISCH,ZISNUM,ZISQ,ZISXL,ZISXLN 34 24 Q 35 25 FORM ;Entry point called from input transforms of fields in DEV/TT files. 36 26 Q:$L(X,"_")'>1 37 N %ZISSI,%ZISSY ;p44038 27 ;F %ZISSI=1:1:$L(X,"_") S %ZISX1=$P(X,"_",%ZISSI) I %ZISX1]"","#?!"[$E(%ZISX1) S X=$S(%ZISSI=1:"",1:$P(X,"_",1,%ZISSI-1)_",")_%ZISX1_$S(%ZISSI<$L(X,"_"):","_$P(X,"_",%ZISSI+1,255),1:"") W !,%ZISSI_"==>"_X 39 28 S %ZISSY="" 40 29 F %ZISSI=1:1:$L(X,"_") S %ZISSY=%ZISSY_$P(X,"_",%ZISSI)_$S($P(X,"_",%ZISSI+1)="":"","#?!"[$E($P(X,"_",%ZISSI+1)):",","#?!"[$E($P(X,"_",%ZISSI)):",",1:"_") 41 S X=%ZISSY 30 S X=%ZISSY K %ZISSI,%ZISSY 42 31 Q 43 32 ; 44 33 L S ZISQ="""",%ZISNP=0,ZISXLN=$L(%ZISXX) I 'ZISXLN S %ZISYY="" Q 45 S ZISXL=0,%ZISYY="" F %ZISI=0:0 S ZISXL=ZISXL+1 S ZISCH=$E(%ZISXX,ZISXL) D L1 Q:ZISXL'<ZISXLN34 S (ZISXL)=0,%ZISYY="" F %ZISI=0:0 S ZISXL=ZISXL+1 S ZISCH=$E(%ZISXX,ZISXL) D L1 Q:ZISXL'<ZISXLN 46 35 ;I $L(%ZISYY,"$C(")>2,%ZISYY[")_$C(" S %ZISXX=%ZISYY D L2,L3 S %ZISYY=%ZISXX Q 47 36 S %ZISXX=%ZISYY D L2,L3 S %ZISYY=%ZISXX … … 52 41 I ZISCH="*" D STAR Q 53 42 I ZISCH="(" D PAREN Q 54 S %ZISYY=%ZISYY_ZISCH 43 S %ZISYY=%ZISYY_ZISCH Q 44 L2 F I=1:1:$L(%ZISXX,"_") S %ZISX1=$P(%ZISXX,"_",I),%ZISX2=$P(%ZISXX,"_",I+1) I $E(%ZISX1,1,3)="$C(",$E(%ZISX2,1,3)="$C(" D S2 55 45 Q 56 L2 ;Find $C(x)_$C(y) and merge 57 N I ;p440 58 F I=1:1:$L(%ZISXX,"_") S %ZISX1=$P(%ZISXX,"_",I),%ZISX2=$P(%ZISXX,"_",I+1) I $E(%ZISX1,1,3)="$C(",$E(%ZISX2,1,3)="$C(" D S2 59 Q 60 L3 ; 61 N I 62 F I=1:1:$L(%ZISXX,"_") I $P(%ZISXX,"_",I)["+","$("'[$E($P(%ZISXX,"_",I)),")"'[$E($P(%ZISXX,"_",I),$L($P(%ZISXX,"_",I))) S $P(%ZISXX,"_",I)="("_$P(%ZISXX,"_",I)_")" 46 L3 F I=1:1:$L(%ZISXX,"_") I $P(%ZISXX,"_",I)["+","$("'[$E($P(%ZISXX,"_",I)),")"'[$E($P(%ZISXX,"_",I),$L($P(%ZISXX,"_",I))) S $P(%ZISXX,"_",I)="("_$P(%ZISXX,"_",I)_")" 63 47 Q 64 48 STAR ;S ZISNUM="" F %ZISI=0:0 S ZISXL=ZISXL+1 S ZISCH=$E(%ZISXX,ZISXL) S:ZISCH?1N ZISNUM=ZISNUM_ZISCH I ZISCH=""!(ZISCH=",") S %ZISYY=%ZISYY_"$C("_+ZISNUM_")",ZISXL=ZISXL-1 Q … … 67 51 QUOTE S %ZISYY=%ZISYY_ZISCH F %ZISI=0:0 S ZISXL=ZISXL+1 S ZISCH=$E(%ZISXX,ZISXL),%ZISYY=%ZISYY_ZISCH I ZISCH=ZISQ!(ZISXL'<ZISXLN) Q 68 52 Q 69 DOLR ;L ooking for$C.53 DOLR ;LOOKING FOR $C. 70 54 I "IXY"[$E(%ZISXX,ZISXL+1) S %ZISYY=%ZISYY_"$"_$E(%ZISXX,ZISXL+1) S ZISXL=ZISXL+1 Q 71 I "ACDEFJLNOPRSTV"[$E(%ZISXX,ZISXL+1)&($E(%ZISXX,ZISXL+2)="(") S %ZISYY=%ZISYY_"$"_$E(%ZISXX,ZISXL+1),ZISXL=ZISXL+2 D PAREN Q 72 S %ZISYY=%ZISYY_"$" ;p440 55 I "ACDEFJLNOPRSTV"[$E(%ZISXX,ZISXL+1)&($E(%ZISXX,ZISXL+2)="(") S %ZISYY=%ZISYY_"$"_$E(%ZISXX,ZISXL+1),ZISXL=ZISXL+2 D PAREN 73 56 Q 74 PAREN S %ZISYY=%ZISYY_"(",ZISEND=")",%ZISNP=%ZISNP+1 D SCAN S %ZISNP=%ZISNP-1 75 Q 57 PAREN S %ZISYY=%ZISYY_"(",ZISEND=")",%ZISNP=%ZISNP+1 D SCAN S %ZISNP=%ZISNP-1 Q 76 58 SCAN F %ZISI=0:0 S ZISXL=ZISXL+1,ZISCH=$E(%ZISXX,ZISXL) D S1 Q:ZISXL'<ZISXLN!(ZISEND=ZISCH&(%ZISNP)) 77 59 Q … … 79 61 I ZISCH="$" D DOLR Q 80 62 I ZISCH="(" D PAREN Q 81 S %ZISYY=%ZISYY_ZISCH 82 Q 63 S %ZISYY=%ZISYY_ZISCH Q 83 64 ; 84 65 S2 ;MERGE $C -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/ZOSFONT.m
r628 r636 1 ZOSFONT ;SFISC/AC - SETS UP ^%ZOSF for Cache for NT/VMS ;10/19/06 14:01 2 ;;8.0;KERNEL;**34,104,365**;JUL 10, 1995;Build 5 3 ;For Cache versions 3.2, 4 and 5 1 ZOSFONT ;SFISC/AC - SETS UP ^%ZOSF FOR Open M for NT ;09/29/98 08:26 2 ;;8.0;KERNEL;**34,104**;JUL 03, 1995 4 3 S %Y=1 K ^%ZOSF("MASTER"),^%ZOSF("SIGNOFF") 5 NZO F I="MGR","PROD","VOL" S:$D(^%ZOSF(I)) ZO(I)=^%ZOSF(I)4 K ZO F I="MGR","PROD","VOL" S:$D(^%ZOSF(I)) ZO(I)=^%ZOSF(I) 6 5 F I=1:2 S Z=$P($T(Z+I),";;",2) Q:Z="" S X=$P($T(Z+1+I),";;",2,99) S ^%ZOSF(Z)=$S($D(ZO(Z)):ZO(Z),1:X) 7 ; 8 MGR W !,"NAME OF MANAGER'S NAMESPACE: "_^%ZOSF("MGR")_"// " R X:$S($G(DTIME):DTIME,1:9999) I X]"" X ^("UCICHECK") G MGR:0[Y S ^%ZOSF("MGR")=X 9 PROD W !,"PRODUCTION (SIGN-ON) NAMESPACE: "_^%ZOSF("PROD")_"// " R X:$S($G(DTIME):DTIME,1:9999) I X]"" X ^("UCICHECK") G PROD:0[Y S ^%ZOSF("PROD")=Y 10 VOL W !,"NAME OF THIS CONFIGURATION: "_^%ZOSF("VOL")_"//" R X:$S($G(DTIME):DTIME,1:9999) I X]"" S:X?1.22U ^%ZOSF("VOL")=X I X'?1.22U W "MUST BE 1-22 uppercase characters." G VOL 11 ; 6 MGR W !,"NAME OF MANAGER'S NAMESPACE: "_^%ZOSF("MGR")_"// " R X:$S($G(DTIME):DTIME,1:9999) I X]"" X ^("UCICHECK") G MGR:Y="" S ^%ZOSF("MGR")=X 7 PROD W !,"PRODUCTION (SIGN-ON) NAMESPACE: "_^%ZOSF("PROD")_"// " R X:$S($G(DTIME):DTIME,1:9999) I X]"" X ^("UCICHECK") G PROD:Y="" S ^%ZOSF("PROD")=Y 8 VOL W !,"NAME OF THIS CONFIGURATION: "_^%ZOSF("VOL")_"//" R X:$S($G(DTIME):DTIME,1:9999) I X]"" S:X?1.5U ^%ZOSF("VOL")=X I X'?1.5U W "MUST BE 1-5 uppercase characters." G VOL 12 9 OS S $P(^%ZOSF("OS"),"^",1)="OpenM-NT" S:'$P(^%ZOSF("OS"),"^",2) $P(^%ZOSF("OS"),"^",2)=18 13 ;For Cache 5.1 and above14 I $$VERSION^ZOSVONT>5 S ^%ZOSF("GSEL")="K ^CacheTempJ($J),^UTILITY($J) D ^%SYS.GSET M ^UTILITY($J)=CacheTempJ($J)"15 10 W !!,"ALL SET UP",!! Q 16 11 Z ;; … … 22 17 ;;U $I:("":"+B") 23 18 ;;DEL 24 ;;X "ZR ZS @X" 19 ;;X "ZR ZS @X" K ^UTILITY("ROU",X) 25 20 ;;EOFF 26 21 ;;U $I:("":"+S") … … 35 30 ;;GD 36 31 ;;D ^%GD 37 ;;GSEL;Select Globals38 ;;K ^UTILITY($J) D ^%GSET39 32 ;;JOBPARAM 40 33 ;;D JOBPAR^%ZOSV … … 42 35 ;;U IO:("":"+S+I-T":$C(13,27)) 43 36 ;;LOAD 44 ;; N %,%NS %N=0 X "ZL @X F XCNP=XCNP+1:1 S %N=%N+1,%=$T(+%N) Q:$L(%)=0 S @(DIF_XCNP_"",0)"")=%"37 ;;S %N=0 X "ZL @X F XCNP=XCNP+1:1 S %N=%N+1,%=$T(+%N) Q:$L(%)=0 S @(DIF_XCNP_"",0)"")=%" 45 38 ;;LPC 46 39 ;;S Y=$ZC(X) … … 72 65 ;;D @($S(X>7:"NORMAL",X>3:"NORMAL",1:"LOW")_"^%PRIO") ;Don't do HIGH 73 66 ;;PROGMODE 74 ;;S Y=$ZJ OB#267 ;;S Y=$ZJ#2 75 68 ;;PROD 76 69 ;;VAH … … 78 71 ;;D ^%RD 79 72 ;;RESJOB 80 ;; N OLD S OLD=$ZNSPACE ZNSPACE "%SYS" D ^RESJOB ZNSPACE OLD Q73 ;;Q:'$D(DUZ) Q:'$D(^XUSEC("XUMGR",+DUZ)) N XQZ S XQZ="^RESJOB[MGR]" D DO^%XUCI 81 74 ;;RM 82 ;; I $G(IOT)["TRM"U $I:X75 ;;U $I:X 83 76 ;;RSEL;;ROUTINE SELECT 84 77 ;;K ^UTILITY($J) D KERNEL^%RSET K %ST ;Special entry point for VA 85 78 ;;RSUM 86 ;;N %,%1,%3 ZL @X 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 87 ;;RSUM1 88 ;;N %,%1,%3 ZL @X 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 79 ;;ZL @X 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 89 80 ;;SS 90 81 ;;D ^%SS 91 82 ;;SAVE 92 ;; N XCS S XCS="F XCM=1:1 S XCN=$O(@(DIE_XCN_"")"")) Q:+XCN'=XCN S %=^(XCN,0) Q:$E(%,1)=""$"" I $E(%,1)'="";"" ZI %" X "ZR X XCS ZS @X"83 ;;S XCS="F XCM=1:1 S XCN=$O(@(DIE_XCN_"")"")) Q:+XCN'=XCN S %=^(XCN,0) Q:$E(%,1)=""$"" I $E(%,1)'="";"" ZI %" X "ZR X XCS ZS @X" S ^UTILITY("ROU",X)="" K XCS 93 84 ;;SIZE 94 85 ;;S Y=0 F I=1:1 S %=$T(+I) Q:%="" S Y=Y+$L(%)+2 … … 97 88 ;;TMK;;MAGTAPE MARK 98 89 ;;S Y=$ZA\4#2 99 ;;TRAP;;S X="^%ET",@^%ZOSF("TRAP") ; User $ETRAP90 ;;TRAP;;S X="^%ET",@^%ZOSF("TRAP") TO SET ERROR TRAP 100 91 ;;$ZT=X 101 92 ;;TRMOFF … … 103 94 ;;TRMON 104 95 ;;U $I:("":"+I+T") 105 ;;TRMRD ;;old Y=$A($ZB),Y=$S(Y<32:Y,Y=127:Y,1:0)96 ;;TRMRD 106 97 ;;S Y=$A($ZB),Y=$S(Y<32:Y,Y=127:Y,1:0) 107 98 ;;TYPE-AHEAD … … 117 108 ;;VOL;;VOLUME SET NAME 118 109 ;;ROU 119 ;;ZD ;;$H to external110 ;;ZD 120 111 ;;S Y=$ZD(X) -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/ZOSV2GTM.m
r628 r636 1 1 %ZOSV2 ;ISF/RWF - More GT.M support routines ;10/18/06 14:29 2 ;;8.0;KERNEL;**275,425**;Jul 10, 1995;Build 18 2 ;;8.0;KERNEL;**275,425**;Jul 10, 1995;Build 4;WorldVistA 30-Jan-08 3 ;Modified from FOIA VISTA, 4 ;Copyright 2008 WorldVistA. Licensed under the terms of the GNU 5 ;General Public License See attached copy of the License. 6 ; 7 ;This program is free software; you can redistribute it and/or modify 8 ;it under the terms of the GNU General Public License as published by 9 ;the Free Software Foundation; either version 2 of the License, or 10 ;(at your option) any later version. 11 ; 12 ;This program is distributed in the hope that it will be useful, 13 ;but WITHOUT ANY WARRANTY; without even the implied warranty of 14 ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 ;GNU General Public License for more details. 16 ; 17 ;You should have received a copy of the GNU General Public License along 18 ;with this program; if not, write to the Free Software Foundation, Inc., 19 ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 3 20 Q 4 21 ;SAVE: DIE open array reference. … … 25 42 S $ETRAP="S $ECODE="""" Q" 26 43 S %I=$I,%DIR=$$RTNDIR^%ZOSV,RN=$TR(RN,"%","_") 27 I $L($ZSEARCH(%DIR_RN_".m",244)) ZSYSTEM " DEL "_%DIR_X_".m;*"28 I $L($ZSEARCH(%DIR_RN_".obj",244)) ZSYSTEM " DEL "_%DIR_X_".obj;*"44 I $L($ZSEARCH(%DIR_RN_".m",244)) ZSYSTEM "rm -f "_%DIR_X_".m" 45 I $L($ZSEARCH(%DIR_RN_".obj",244)) ZSYSTEM "rm -f "_%DIR_X_".obj" 29 46 I $L($ZSEARCH(%DIR_RN_".o",244)) ZSYSTEM "rm -f "_%DIR_X_".o" 30 47 Q -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/ZOSVONT.m
r628 r636 1 %ZOSV ;SFISC/AC - $View commands for Open M for NT. ;03/03/2008 2 ;;8.0;KERNEL;**34,94,107,118,136,215,293,284,385,425,440**;Jul 10, 1995;Build 13 3 ;Per VHA Directive 2004-038, this routine should not be modified 1 %ZOSV ;SFISC/AC - $View commands for Open M for NT. ;4/26/07 09:39 2 ;;8.0;KERNEL;**34,94,107,118,136,215,293,284,385,425**;Jul 10, 1995;Build 18 4 3 ACTJ() ;# Active jobs 5 4 N %,V,Y S V=$$VERSION() … … 14 13 ;maxpid: from %SS 15 14 I V<5 D Q AVJ 16 . N PORT,T,X,MAXPID,LMFLIM17 . S $ET="", MAXPID=$V($ZU(40,2,118),-2,4)18 . X "S ZOSV=$ZU(5),%=$ZU(5,""%SYS"") S LMFLIM=$$inquire^LMFCLI,%=$ZU(5,ZOSV)" ;Get the license info15 . N port,t,x,maxpid,lmflim 16 . S $ET="",maxpid=$V($ZU(40,2,118),-2,4) 17 . X "S ZOSV=$ZU(5),%=$ZU(5,""%SYS"") S lmflim=$$inquire^LMFCLI,%=$ZU(5,ZOSV)" ;Get the license info 19 18 . ;Add together the enterprise and division licenses avaliable 20 . S X=$P(LMFLIM,";",2)+$P($P(LMFLIM,"|",2),";",2)21 . S T=+LMFLIM+$P(LMFLIM,"|",2) ;Check the license total22 . S AVJ=$S( T<MAXPID:X,1:MAXPID-$$ACTJ) ;Return the smaller of license or pid19 . S x=$P(lmflim,";",2)+$P($P(lmflim,"|",2),";",2) 20 . S t=+lmflim+$P(lmflim,"|",2) ;Check the license total 21 . S AVJ=$S(t<maxpid:x,1:maxpid-$$ACTJ) ;Return the smaller of license or pid 23 22 ;To get available jobs from Cache 5.0 up 24 23 I V'<5 D Q AVJ … … 39 38 ; 40 39 GETPEER() ;Get the PEER tcp/ip address 41 N PEER,NL,$ET S NL="", PEER="",$ET="S $EC=NL Q NL"40 N PEER,NL,$ET S NL="",$ET="S $EC=NL Q NL",PEER="" 42 41 I $$OS="VMS" S PEER=$ZF("TRNLNM","VISTA$IP") 43 42 I '$L(PEER) S PEER=$ZU(111,0) S:$L(PEER) PEER=$A(PEER,1)_"."_$A(PEER,2)_"."_$A(PEER,3)_"."_$A(PEER,4) … … 45 44 ; 46 45 SHARELIC(TYPE) ;See if can share a C/S license 47 ;Per Sandy Waal 10/18/2003: With Cache 5.0, your telnet and IP connections are now handled properly.48 ;N %,%N,%2,UID,%V,$ET S $ET="S $EC="""" Q",%V=$$VERSION()49 ;I %V'<5 Q50 46 ;Type is 1 for C/S and 0 for Telnet 51 ;I %V<3.1 X:TYPE "S %N=$ZU(5),%2=$ZU(5,""%SYS""),%2=$$GetLic^LMFCLI,%N=$ZU(5,%N)" Q 52 ;I %V<5 S:TYPE %=$$GetCSLic^%LICENSE S:'TYPE %=$$ShareLic^%LICENSE 53 ;S $EC="" 47 N %,%N,%2,UID,%V,$ET S $ET="S $EC="""" Q",%V=$$VERSION() 48 I %V<3.1 X:TYPE "S %N=$ZU(5),%2=$ZU(5,""%SYS""),%2=$$GetLic^LMFCLI,%N=$ZU(5,%N)" Q 49 I %V<5 S:TYPE %=$$GetCSLic^%LICENSE S:'TYPE %=$$ShareLic^%LICENSE 50 ;Per Sandy Waal 10/18/2003: With Cache' 5.0, your telnet and IP connections are now handled properly. 51 I %V'<5 S %V=%V 52 S $EC="" 54 53 Q 55 ;56 54 JOBPAR ;See if X points to a valid Job. Return its UCI. 57 N NL,$ET S Y="",NL="",$ET="S $EC=NL Q"58 I $D(^$JOB(X))S Y=$V(-1,X),Y=$P(Y,"^",14)_","_^%ZOSF("VOL")59 Q55 N ZJ S Y="",$ZT="JOBX" 56 Q:'$D(^$JOB(X)) S Y=$V(-1,X),Y=$P(Y,"^",14)_","_^%ZOSF("VOL") 57 JOBX Q 60 58 ; 61 59 NOLOG ;4096 is switch 12 - sign on inhibited. … … 63 61 ; 64 62 PROGMODE() ;Check if in PROG mode 65 Q $ZJ OB#263 Q $ZJ#2 66 64 ; 67 65 PRGMODE ; … … 72 70 D UCI S XUCI=Y,XQZ="PRGM^ZUA[MGR]",XUSLNT=1 D DO^%XUCI D ^%PMODE U $I:(:"+B+C+R") S $ZT="" Q 73 71 Q 74 LGR() ;Last Global ref.75 N $ET,NL S NL="",$ET="S $EC=NL Q NL"76 Q $ZR 72 LGR() S $ZT="LGRX^%ZOSV" 73 Q $ZR ;Last Global ref. 74 LGRX Q "" 77 75 ; 78 EC() ;Error code 79 Q $ZE 76 EC() Q $ZE ;Error code 80 77 ; 81 78 DOLRO ;SAVE ENTIRE SYMBOL TABLE IN LOCATION SPECIFIED BY X … … 95 92 Q 96 93 ; 97 PARSIZ ; Old and not used.94 PARSIZ ; 98 95 S X=3 99 96 Q 100 97 ; 101 DEVOPN ;List of Devices opened , Not used98 DEVOPN ;List of Devices opened 102 99 ;Returns variable Y. Y=Devices owned separated by a comma 103 100 Q 104 ;105 101 DEVOK ; 106 102 S Y=0,X1=$G(X1) Q:X=2 Q:(X1="HFS")!(X1="SPL")!(X1="MT")!(X1="CHAN") ;Quit w/ OK for HFS, Spool, MT, TCP/IP … … 122 118 ; 123 119 OS() ;Return the OS NT, VMS, Unix 124 Q $S($ZV["VMS":"VMS",$ZV[" UNIX":"UNIX",$ZV["Linux":"UNIX",$ZV["Windows":"NT",$ZV["NT":"NT",1:"UNK")120 Q $S($ZV["VMS":"VMS",$ZV["Windows":"NT",$ZV["NT":"NT",$ZV["UNIX":"UNIX",1:"UNK") 125 121 ; 126 122 SETNM(X) ;Set name, Fall into SETENV … … 131 127 ; 132 128 SID() ;System ID Ver 1 133 N %1,%2,%3, %4,%5,T S T="~"129 N %1,%2,%3,T S T="~" 134 130 S %1=$ZU(5) ;namespace 135 131 S %2=$ZU(12,"") ;directory 136 132 I '$L(%2),$$VERSION'<5.2 S %2=$$defdir^%SYS.GLO(%1) ;remote directory 137 S %3=$G(^XTV(8989.3,1,"SID")),%4=$P(%3,"^",4),%5=$P(%3,"^",5)138 I $L(%4),$L(%5),%2[%4 S %2=$P(%2,%4)_%5_$P(%2,%4,2,9)139 133 S %3=%1_T_%2 ;namespace~directory 140 134 Q "1~"_%3 … … 142 136 PRI() ;Check if a mixed OS enviroment. 143 137 ;Default return 1 unless we are on the secondary OS. 144 ;Only Cache on a VMS(1)/Linux or NT(2) mix is supported now.138 ;Only Cache on a VMS(1)/Linux(2) mix is supported now. 145 139 N % S %=1 146 140 I $P(^XTV(8989.3,1,0),"^",5),$$OS'="VMS" S %=2 141 ;I $P(^XTV(8989.3,1,0),"^",5),$$OS["NT" S %=2 147 142 Q % 148 143 ; … … 162 157 Q 1 163 158 ; 164 T0 ; start RT clock , obsolete159 T0 ; start RT clock 165 160 ;S XRT0=$H 166 161 Q -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/ZTLOAD4.m
r628 r636 1 %ZTLOAD4 ;SEA/RDS-TaskMan: P I: Is Queued? ; 1/24/08 16:152 ;;8.0;KERNEL; **440**;JUL 10, 1995;Build 133 ; Per VHA Directive 2004-038, this routine should not be modified4 ; Call with ZTSK, [ZTCPU]; Return ZTSK()1 %ZTLOAD4 ;SEA/RDS-TaskMan: P I: Is Queued? ;7/26/91 11:55 ; 2 ;;8.0;KERNEL;;JUL 10, 1995 3 ;;7.0; 4 ; 5 5 INPUT ;check input parameters for error conditions 6 N %,$ES,$ET,%ZTVOL,ZTREC,ZTD,ZT1,ZT2,ZT37 6 I $D(ZTSK)[0 S ZTSK="" 8 I $D(ZTSK)>1 S %=ZTSK K ZTSK S ZTSK=%7 I $D(ZTSK)>1 S ZTLOAD=ZTSK K ZTSK S ZTSK=ZTLOAD K ZTLOAD 9 8 I ZTSK<1!(ZTSK\1'=ZTSK) S ZTSK="",ZTSK(0)="",ZTSK("E")="IT" G QUIT 10 S ZTSK(0)="",ZTSK("E")="U", $ET="Q:$ES S $EC="""" G QUIT^%ZTLOAD4"9 S ZTSK(0)="",ZTSK("E")="U",X="QUIT^%ZTLOAD3",@^%ZOSF("TRAP") 11 10 S %ZTVOL=^%ZOSF("VOL") 12 11 I $D(ZTCPU)[0 S ZTCPU=%ZTVOL … … 15 14 ; 16 15 HERE ;lookup task's status on current volume set 17 L +^%ZTSK(ZTSK):1 18 I $D(^%ZTSK(ZTSK,0))[0 S ZTSK("E")="I" G QUIT 19 S ZTREC=^%ZTSK(ZTSK,0),ZTD=$G(^(.04)) 20 S ZTSK("DUZ")=$P(ZTREC,U,3),ZTSK("D")=$P(ZTREC,U,6) ;scheduled $H 16 L +^%ZTSK(ZTSK) I $D(^%ZTSK(ZTSK,0))[0 S ZTSK("E")="I" G QUIT 17 S ZTREC=^%ZTSK(ZTSK,0),ZTD=$P(ZTREC,U,6) 18 S ZTSK("DUZ")=$P(ZTREC,U,3),ZTSK("D")=ZTD 21 19 I ZTD]"",$D(^%ZTSCH(ZTD,ZTSK))#2 S ZTSK(0)=1 G QUIT 22 20 I ZTD]"",$D(^%ZTSCH("JOB",ZTD,ZTSK))#2 S ZTSK(0)=1 G QUIT 23 21 ; 24 S ZT1="" F S ZT1=$O(^%ZTSCH(ZT1)) Q:'ZT1 I $D(^(ZT1,ZTSK))#2 S ZTSK(0)=1 G QUIT25 S ZT1="IO",ZT2="" F S ZT2=$O(^%ZTSCH(ZT1,ZT2)),ZT3="" Q:ZT2="" FS ZT3=$O(^%ZTSCH(ZT1,ZT2,ZT3)) Q:ZT3="" I $D(^(ZT3,ZTSK))#2 S ZTSK(0)=1 G QUIT26 S ZT1="JOB",ZT2="" F S ZT2=$O(^%ZTSCH(ZT1,ZT2)) Q:ZT2="" I $D(^(ZT2,ZTSK))#2 S ZTSK(0)=1 G QUIT27 S ZT1="LINK",ZT2="" F S ZT2=$O(^%ZTSCH(ZT1,ZT2)),ZT3="" Q:ZT2="" FS ZT3=$O(^%ZTSCH(ZT1,ZT2,ZT3)) Q:ZT3="" I $D(^(ZT3,ZTSK))#2 S ZTSK(0)=1 G QUIT22 S ZT1="" F ZT=0:0 S ZT1=$O(^%ZTSCH(ZT1)) Q:'ZT1 I $D(^(ZT1,ZTSK))#2 S ZTSK(0)=1 G QUIT 23 S ZT1="IO",ZT2="" F ZT=0:0 S ZT2=$O(^%ZTSCH(ZT1,ZT2)),ZT3="" Q:ZT2="" F ZT=0:0 S ZT3=$O(^%ZTSCH(ZT1,ZT2,ZT3)) Q:ZT3="" I $D(^(ZT3,ZTSK))#2 S ZTSK(0)=1 G QUIT 24 S ZT1="JOB",ZT2="" F ZT=0:0 S ZT2=$O(^%ZTSCH(ZT1,ZT2)) Q:ZT2="" I $D(^(ZT2,ZTSK))#2 S ZTSK(0)=1 G QUIT 25 S ZT1="LINK",ZT2="" F ZT=0:0 S ZT2=$O(^%ZTSCH(ZT1,ZT2)),ZT3="" Q:ZT2="" F ZT=0:0 S ZT3=$O(^%ZTSCH(ZT1,ZT2,ZT3)) Q:ZT3="" I $D(^(ZT3,ZTSK))#2 S ZTSK(0)=1 G QUIT 28 26 S ZTSK(0)=0 29 27 ; 30 28 QUIT ;cleanup and quit 31 L:ZTSK -^%ZTSK(ZTSK) ;K %ZTCPU,%ZTM,%ZTM1,%ZTM2,%ZTMAST,%ZTVOL,X,Y,ZT,ZT1,ZT2,ZT3,ZTCPU,ZTD,ZTREC29 L:ZTSK -^%ZTSK(ZTSK) K %ZTCPU,%ZTM,%ZTM1,%ZTM2,%ZTMAST,%ZTVOL,X,Y,ZT,ZT1,ZT2,ZT3,ZTCPU,ZTD,ZTREC 32 30 I ZTSK(0)]"" K ZTSK("E") Q 33 31 I ZTSK("E")'="U" Q … … 36 34 ; 37 35 THERE ;rest of code looks up task's status on some other volume set 38 N %ZTCPU,%ZTM,X,Y39 36 ; 40 37 FILES ;find TaskMan files on the volume set to be searched … … 48 45 SEARCH ;find out if task is queued on that volume set 49 46 I $D(^[X,Y]%ZTSK(ZTSK,0))[0 S ZTSK("E")="I" G QUIT 50 S ZTREC=^[X,Y]%ZTSK(ZTSK,0),ZTD=$ G(^(.04))51 S ZTSK("DUZ")=$P(ZTREC,U,3),ZTSK("D")= $P(ZTREC,U,6)47 S ZTREC=^[X,Y]%ZTSK(ZTSK,0),ZTD=$P(ZTREC,U,6) 48 S ZTSK("DUZ")=$P(ZTREC,U,3),ZTSK("D")=ZTD 52 49 I ZTD]"",$D(^[X,Y]%ZTSCH(ZTD,ZTSK))#2 S ZTSK(0)=1 G QUIT 53 50 I ZTD]"",$D(^[X,Y]%ZTSCH("JOB",ZTD,ZTSK))#2 S ZTSK(0)=1 G QUIT 54 51 ; 55 S ZT1="" F S ZT1=$O(^[X,Y]%ZTSCH(ZT1)) Q:'ZT1 I $D(^(ZT1,ZTSK))#2 S ZTSK(0)=1 G QUIT56 S ZT1="IO",ZT2="" F S ZT2=$O(^[X,Y]%ZTSCH(ZT1,ZT2)),ZT3="" Q:ZT2="" FS ZT3=$O(^[X,Y]%ZTSCH(ZT1,ZT2,ZT3)) Q:ZT3="" I $D(^(ZT3,ZTSK))#2 S ZTSK(0)=1 G QUIT57 S ZT1="JOB",ZT2="" F S ZT2=$O(^[X,Y]%ZTSCH(ZT1,ZT2)) Q:ZT2="" I $D(^(ZT2,ZTSK))#2 S ZTSK(0)=1 G QUIT58 S ZT1="LINK",ZT2="" F S ZT2=$O(^[X,Y]%ZTSCH(ZT1,ZT2)),ZT3="" Q:ZT2="" FS ZT3=$O(^[X,Y]%ZTSCH(ZT1,ZT2,ZT3)) Q:ZT3="" I $D(^(ZT3,ZTSK))#2 S ZTSK(0)=1 G QUIT52 S ZT1="" F ZT=0:0 S ZT1=$O(^[X,Y]%ZTSCH(ZT1)) Q:'ZT1 I $D(^(ZT1,ZTSK))#2 S ZTSK(0)=1 G QUIT 53 S ZT1="IO",ZT2="" F ZT=0:0 S ZT2=$O(^[X,Y]%ZTSCH(ZT1,ZT2)),ZT3="" Q:ZT2="" F ZT=0:0 S ZT3=$O(^[X,Y]%ZTSCH(ZT1,ZT2,ZT3)) Q:ZT3="" I $D(^(ZT3,ZTSK))#2 S ZTSK(0)=1 G QUIT 54 S ZT1="JOB",ZT2="" F ZT=0:0 S ZT2=$O(^[X,Y]%ZTSCH(ZT1,ZT2)) Q:ZT2="" I $D(^(ZT2,ZTSK))#2 S ZTSK(0)=1 G QUIT 55 S ZT1="LINK",ZT2="" F ZT=0:0 S ZT2=$O(^[X,Y]%ZTSCH(ZT1,ZT2)),ZT3="" Q:ZT2="" F ZT=0:0 S ZT3=$O(^[X,Y]%ZTSCH(ZT1,ZT2,ZT3)) Q:ZT3="" I $D(^(ZT3,ZTSK))#2 S ZTSK(0)=1 G QUIT 59 56 S ZTSK(0)=0 G QUIT 60 57 ; -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/ZTMGRSET.m
r628 r636 1 ZTMGRSET ;SF/RWF,PUG/TOAD - SET UP THE MGR ACCOUNT FOR THE SYSTEM ; 02/22/20061 ZTMGRSET ;SF/RWF,PUG/TOAD - SET UP THE MGR ACCOUNT FOR THE SYSTEM ;6:53 PM 24 Jan 2008 2 2 ;;8.0;KERNEL;**34,36,69,94,121,127,136,191,275,355**;JUL 10, 1995;Build 9 3 ; 4 ; Modified from FOIA VISTA, 5 ; Copyright (C) 2007 WorldVistA 6 ; 7 ; This program is free software; you can redistribute it and/or modify 8 ; it under the terms of the GNU General Public License as published by 9 ; the Free Software Foundation; either version 2 of the License, or 10 ; (at your option) any later version. 3 11 ; 4 12 N %D,%S,I,OSMAX,U,X,X1,X2,Y,Z1,Z2,ZTOS,ZTMODE,SCR … … 165 173 ; 166 174 R() ; routine directory for GT.M 167 Q d(1) ;175 ;Q d(1) ;WVEHR/SO Commented out 168 176 I ZTOS=7 Q $P($ZRO,",") 169 177 I ZTOS=8 Q $P($S($ZRO["(":$P($P($ZRO,"(",2),")"),1:$ZRO)," ")_"/" -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/_ZIS.m
r628 r636 1 %ZIS ;SFISC/AC,RWF -- DEVICE HANDLER ;1/24/08 16:06 2 ;;8.0;KERNEL;**18,23,69,112,199,191,275,363,440**;JUL 10, 1995;Build 13 3 ;Per VHA Directive 2004-038, this routine should not be modified 1 %ZIS ;SFISC/AC,RWF -- DEVICE HANDLER ;10/14/2004 08:46 2 ;;8.0;KERNEL;**18,23,69,112,199,191,275,363**;JUL 10, 1995 4 3 N %ZISOS,%ZISV 5 4 S U="^",%ZISOS=$G(^%ZOSF("OS")),%ZISV=$G(^%ZOSF("VOL")) … … 9 8 I '$D(%ZIS),$D(%IS) M %ZIS=%IS 10 9 S:'($D(%ZIS)#2) %ZIS="M" M %IS=%ZIS ;update %IS for now 11 I '$D(^XUTL("XQ",$J,"MIXED OS")) S ^XUTL("XQ",$J,"MIXED OS")=$$PRI^%ZOSV12 S %ZIS("PRI")=$G(^XUTL("XQ",$J,"MIXED OS"),1)13 10 ; 14 11 I $D(ZTQUEUED) D I '$D(IOP) S POP=1 G EXIT^%ZIS1 15 12 .I $D(ZTIO)#2,ZTIO="" S:%IS'[0 %IS=%IS_"0",%ZIS=%ZIS_"0" 16 13 I '$D(ZTQUEUED),%IS["T",$P($G(IOP),";")="Q" S POP=1 G EXIT^%ZIS1 17 N %,%A,%E,%H,%I,%X,%XX,%Y,%Z,%Z1,%Z 2,%Z9,%Z90,%Z91,%Z95,%ZISB,%ZTIME,%ZTYPE14 N %,%A,%E,%H,%I,%X,%XX,%Y,%Z,%Z1,%Z9,%Z90,%Z91,%Z95,%ZISB,%ZTIME,%ZTYPE 18 15 N %ZHFN,%ZISOLD,DTOUT,DUOUT 19 16 ;Save symbols to restore if don't open a device … … 34 31 S %=$$LINEPORT^%ZISUTL I % S (%E,%H)=% Q 35 32 S %ZISVT=$I D VTLKUP I '%E S %ZISVT=$I D VIRTUAL 36 I %ZISVT=""!(%E'>0) I %IS'[0 O IO(0)::0 I $T U IO(0) W !,"HOME DEVICE ("_$I_")DOES NOT EXIST IN THE DEVICE FILE",!,"PLEASE CONTACT YOUR SYSTEM MANAGER!",*733 I %ZISVT=""!(%E'>0) I %IS'[0 O IO(0)::0 I $T U IO(0) W !,"HOME DEVICE DOES NOT EXIST IN THE DEVICE FILE",!,"PLEASE CONTACT YOUR SYSTEM MANAGER!",*7 37 34 S %H=%E S:'%H&(%IS'[0) POP=1 S:(%H>0)&('$D(IO("HOME"))) IO("HOME")=%H_"^"_$I 38 35 Q … … 63 60 ;IO("Q") is checked by many routines after a call to ^%ZISC, so only clean on call to %ZIS. 64 61 CLEAN ;Cleanup env. Called from %ZISC also. 65 I $G(IOT)'="SPL" K IO("DOC"),IO("SPOOL") ;(p446) 66 I $G(IOT)'="HFS" K IO("HFSIO") ;p446 62 K IO("DOC"),IO("HFSIO"),IO("SPOOL") ;(p366) 67 63 S (IOPAR,IOUPAR)="" 68 64 Q … … 70 66 RESETVAR ;Reset home IO* variables. 71 67 I '$D(^XUTL("XQ",$J,"IO")) Q 72 N % 73 F %="IO","IOBS","IOF","IOM","ION","IOS","IOSL","IOST","IOST(0)","IOT","IOXY","IOPAR","IOUPAR" I $D(^XUTL("XQ",$J,%))#2 S @%=^(%) 74 F %="IO(""IP"")","IO(""CLNM"")","IO(""DOC"")","IO(""HFSIO"")","IO(""SPOOL"")" I $D(^XUTL("XQ",$J,%))#2 S @%=^(%) 75 S POP=0,IO(0)=IO 68 N % F %="IO","IOBS","IOF","IOM","ION","IOS","IOSL","IOST","IOST(0)","IOT","IOXY" I $D(^XUTL("XQ",$J,%))#2 S @%=^(%) 69 S POP=0,IO(0)=IO,(IOPAR,IOUPAR)="" 76 70 Q 77 SAVEVAR ;Save home IO* variables, called from XUS1,%ZTMS3 78 N % 79 F %="IO","IOBS","IOF","IOM","ION","IOS","IOSL","IOST","IOST(0)","IOT","IOXY","IOPAR","IOUPAR" I $D(@%) S ^XUTL("XQ",$J,%)=@% 80 F %="IO(""IP"")","IO(""CLNM"")","IO(""DOC"")","IO(""HFSIO"")","IO(""SPOOL"")" I $D(@%) S ^XUTL("XQ",$J,%)=@% 71 SAVEVAR ;Save home IO* variables, called from XUS1 72 N % F %="IO","IOBS","IOF","IOM","ION","IOS","IOSL","IOST","IOST(0)","IOT","IOXY" I $D(@%) S ^XUTL("XQ",$J,%)=@% 81 73 Q 82 74 ZISLPC Q ;No longer called in Kernel v8. -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/_ZIS1.m
r628 r636 1 %ZIS1 ;SFISC/AC,RWF -- DEVICE HANDLER (DEVICE INPUT) ;1/24/08 16:06 2 ;;8.0;KERNEL;**18,49,69,104,112,199,391,440**;JUL 10, 1995;Build 13 3 ;Per VHA Directive 2004-038, this routine should not be modified 1 %ZIS1 ;SFISC/AC,RWF -- DEVICE HANDLER (DEVICE INPUT) ;07/07/2005 15:48 2 ;;8.0;KERNEL;**18,49,69,104,112,199,391**;JUL 10, 1995 4 3 MAIN ;Called from %ZIS with a GO 5 4 I '$D(IOP),$D(^%ZIS(1,%E,0)),'$P(^(0),"^",3) S %A=%H,%Z=^(0) D L2^%ZIS2 G EXIT … … 7 6 I '$D(IOP),$D(IO("Q")),POP D AQUE^%ZIS3 K:%=2 IO("Q") S:%=2 %ZISB=$S(%IS'["N":2,1:0) I %=-1 S POP=1 G EXIT 8 7 S %E=%H,POP=0,%IS=%ZIS ;Reset %IS from %ZIS 9 I %IS'["Q",$D(XQNOGO) S POP=1 W:'$D(IOP) !, $C(7),"OUTPUT IS NEVER ALLOWED FOR THIS OPTION" G EXIT8 I %IS'["Q",$D(XQNOGO) S POP=1 W:'$D(IOP) !,*7,"OUTPUT IS NEVER ALLOWED FOR THIS OPTION" G EXIT 10 9 D IOP:$D(IOP),R:'$D(IOP) 11 10 G EXIT:$D(DTOUT)!$D(DUOUT)!(POP&$D(IOP)),L1:POP&'$D(IOP) 12 11 D LKUP I %A'>0 S POP=1 D:'$D(DUOUT) MSG1 K DUOUT 12 I POP G EXIT:$D(IOP),L1:'$D(IOP) 13 13 I '$D(^%ZIS(1,%A,0)) D MSG1 K %ZISIOS S POP=1 14 14 I POP G EXIT:$D(IOP),L1:'$D(IOP) … … 16 16 I $D(%ZIS("S")) N Y S Y=%E D XS^ZISX S:'$T POP=1 G G:POP 17 17 W:'$D(IOP)&($P(%Z,"^",2)'=$I)&($P(%Z1,"^")]"") " ",$P(%Z1,"^") 18 D L2^%ZIS2 ;Call18 D L2^%ZIS2 19 19 G G L1:POP&'$D(IOP)&'($D(DTOUT)!$D(DUOUT)) ;Didn't get it 20 ;For type[TRM reset $X & $Y 21 I 'POP,%ZTYPE["TRM",IO]"",$D(IO(1,IO)) U IO S:'(IO=IO(0)&'$D(IO("S"))&'$D(ZTQUEUED)) $X=0,$Y=0 20 22 ; 21 EXIT ; 22 I POP G EX2 ;Did not get the device. 23 ;For type[TRM reset $X & $Y 24 I %ZTYPE["TRM",IO]"",$D(IO(1,IO)) U IO S:'(IO=IO(0)&'$D(IO("S"))&'$D(ZTQUEUED)) $X=0,$Y=0 23 EXIT I $D(IO)#2,IO]"",$D(IO(1,IO))#2,$D(%Z1),$P(%Z1,"^",11) S IO(1,IO,"NOFF")=1 25 24 ;Do count of number of times device opened. Field 51. 26 I $L($G(IO)),$D(IO(1,IO))#2, $G(%ZISIOS) D25 I $L($G(IO)),$D(IO(1,IO))#2,'POP,$G(%ZISIOS) D 27 26 . S $P(^(5),"^",1)=$P($G(^%ZIS(1,%ZISIOS,5)),"^",1)+1 28 I %ZIS["H" S IO(0)=IO,IO("HOME")=%ZISIOS_"^"_IO ;Make home device 29 I '$D(IO("Q")),$D(%ZISLOCK) S ^XUTL("XQ",$J,"lock",%ZISIOS)=%ZISLOCK 30 I $D(IO)#2,IO]"",$D(IO(1,IO))#2,$D(%Z1),$P(%Z1,"^",11) S IO(1,IO,"NOFF")=1 31 EX2 ; 27 I 'POP,%ZIS["H" S IO(0)=IO,IO("HOME")=%ZISIOS_"^"_IO ;Make home device 32 28 I %IS'[0,$G(IO(0))]"" U IO(0) ;Make sure return with home active 33 29 G SETVAR:'POP!(%IS["T"),KILVAR … … 37 33 S %IS=%IS_%X K IOP W %X D SETQ Q 38 34 ;Get ready to ask user for device 39 R I %IS["Q",$D(XQNOGO) W !, $C(7),"AT THIS TIME, OUTPUT MUST BE QUEUED"35 R I %IS["Q",$D(XQNOGO) W !,*7,"AT THIS TIME, OUTPUT MUST BE QUEUED" 40 36 S %A=$S($D(%IS("B")):%IS("B"),1:"HOME") ;Setup default 41 37 I %IS["P",%A="HOME",$D(^%ZIS(1,%E,99)),$D(^%ZIS(1,+^(99),0)) S %A=$P(^(0),"^",1) … … 60 56 I %X'=%ZISVT S %ZISVT=%X D VTLKUP^%ZIS S %A=%E Q:%A>0 ;uppercase lookup 61 57 N %XX,%YY S %XX=%X D 1^%ZIS5 S %A=+%YY Q 62 SBR K DFOUT,DTOUT,DUOUT R %X:$S($D(DTIME)#2:DTIME,1:300) E W $C(7)S DTOUT=1 Q58 SBR K DFOUT,DTOUT,DUOUT R %X:$S($D(DTIME)#2:DTIME,1:300) E W *7 S DTOUT=1 Q 63 59 S:%X="."!(%X="^") DUOUT=1,%X="" Q 64 60 LC S %X=$$UP(%X) … … 66 62 LOW(%) Q $TR(%,"ABCDEFGHIJKLMNOPQRSTUVWXYZ","abcdefghijklmnopqrstuvwxyz") 67 63 UP(%) Q $TR(%,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ") 68 ; 69 ;Call/Return % = 1 (yes), 2 (no) -1 (^) 70 YN W "? ",$P("Yes// ^No// ",U,%) 71 RYN R %X:$S($D(DTIME):DTIME,$D(%ZISDTIM):%ZISDTIM,1:300) E S DTOUT=1,%X=U W $C(7) 64 YN W "? ",$P("YES// ^NO// ",U,%) 65 RYN R %X:$S($D(DTIME):DTIME,$D(%ZISDTIM):%ZISDTIM,1:300) E S DTOUT=1,%X=U W *7 72 66 S:%X]""!'% %=$A(%X),%=$S(%=89:1,%=121:1,%=78:2,%=110:2,%=94:-1,1:0) 73 I '%,%X'?."?" W $C(7),"??",!?4,"ANSWER 'Yes' OR 'No': " G RYN 74 W:$X>73 ! W $P(" (Yes)^ (No)",U,%) 75 Q 76 MSG1 I '$D(IOP) W ?20,$C(7)," [DEVICE DOES NOT EXIST]" 67 I '%,%X'?."?" W *7,"??",!?4,"ANSWER 'YES' OR 'NO': " G RYN 68 W:$X>73 ! W $P(" (YES)^ (NO)",U,%) Q 69 MSG1 I '$D(IOP) W ?20,*7," [DEVICE DOES NOT EXIST]" 77 70 Q 78 71 SETVAR ;Come here to setup the variables for the selected device … … 84 77 S IOT=%ZTYPE,IOST(0)=%ZISIOST(0),IOST=%ZISIOST,IOPAR=%ZISOPAR,IOUPAR=%ZISUPAR,IOHG=%ZISHG 85 78 S:IOF="" IOF="#" ;See that IOF has something 86 K IOCPU S:$D(%ZISCPU) IOCPU=%ZISCPU 87 G KIL 79 K IOCPU S:$D(%ZISCPU) IOCPU=%ZISCPU G KIL 88 80 ; 89 81 KILVAR ;Come here to restore the calling variables … … 97 89 S:%IS["T" IO("T")=1 K %ZIS,%IS,%A,%E,%H,%ZISOS,%ZISV,IOP 98 90 K2 K %I,%X,%Y,%Z,%Z1,%Z91,%Z95,%ZTYPE,%ZTIME 99 K %ZISCHK,%ZISCPU,%ZISI,%ZISR,%ZISVT,%ZISB,%ZISX,ZISI,%ZISHGL,%ZISHP,%ZISIO,%ZISIOS,%ZISIOM 100 K %ZISIOF,%ZISIOSL,%ZISIOBS,%ZISIOST,%ZISIOST(0),%ZISTO,%ZISTP,%ZISHG,%ZISSIO,%ZISOPEN,%ZISOPAR,%ZISUPAR 101 K %ZISMY,%ZISQUIT,%ZISLOCK 91 K %ZISCHK,%ZISCPU,%ZISI,%ZISR,%ZISVT,%ZISB,%ZISX,ZISI,%ZISHGL,%ZISHP,%ZISIO,%ZISIOS,%ZISIOM,%ZISIOF,%ZISIOSL,%ZISIOBS,%ZISIOST,%ZISIOST(0),%ZISTO,%ZISTP,%ZISHG,%ZISSIO,%ZISOPEN,%ZISOPAR,%ZISUPAR 92 K %ZISMY,%ZISQUIT 102 93 Q -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/_ZIS2.m
r628 r636 1 %ZIS2 ;SFISC/AC,RWF -- DEVICE HANDLER (CHECKS) ;1/24/08 16:07 2 ;;8.0;KERNEL;**69,104,112,118,136,241,440**;JUL 10, 1995;Build 13 3 ;Per VHA Directive 2004-038, this routine should not be modified 1 %ZIS2 ;SFISC/AC,RWF -- DEVICE HANDLER (CHECKS) ;06/12/2002 15:41 2 ;;8.0;KERNEL;**69,104,112,118,136,241**;JUL 10, 1995 4 3 HUNT S:'$D(%ZISHP) %ZISHP=%E,%ZISHGL=0 S %E=0 5 4 F S %ZISHGL=$O(^%ZIS(1,%ZISHG(0),"HG",%ZISHGL)) Q:%ZISHGL'>0 D Q:%E … … 12 11 L2 ;Entry point from %ZIS1 13 12 I $D(DTOUT)!$D(DUOUT) K %ZISHP,%ZISHPOP Q 14 CHECK ;Get IO check for secondary $I 15 K %ZISCPU N %Z2 16 S POP=0,%Z=^%ZIS(1,%E,0),%Z2=$S(%ZIS("PRI")=1:"",1:$G(^%ZIS(1,%E,2))) ;Get Primary and secondary IO. 17 S IO=$S(%ZIS("PRI")=1:$P(%Z,"^",2),$L($P(%Z2,"^")):$P(%Z2,"^"),1:$P(%Z,"^",2)) ; 18 S:%IS["Q"&'$D(ZTQUEUED)&($P(%Z,"^",12)=1!$D(XQNOGO)) %ZISB=0,IO("Q")=1 ;Forced Queueing 13 CHECK K %ZISCPU S POP=0,%Z=^%ZIS(1,%E,0),IO=$P(%Z,"^",2) 14 S:%IS["Q"&'$D(ZTQUEUED)&($P(%Z,"^",12)=1!$D(XQNOGO)) %ZISB=0,IO("Q")=1 ;Forced Queueing 19 15 I $P(%Z,"^",12)=2 S %IS=$TR(%IS,"Q") I $D(IO("Q")) D Q 20 16 . I '$D(IOP) W !,"Queuing NOT ALLOWED on this device" -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/_ZIS3.m
r628 r636 1 %ZIS3 ;SFISC/AC,RWF -- DEVICE HANDLER(DEVICE TYPES & PARAMETERS) ;1/24/08 13:18 2 ;;8.0;KERNEL;**18,36,69,104,391,440**;JUL 10, 1995;Build 13 3 ;Per VHA Directive 2004-038, this routine should not be modified 4 ;Call with a Go from ^%ZIS2 5 I %ZIS'["T",$G(^%ZIS(1,+%E,"POX"))]"" D XPOX^ZISX(%E) ;Pre-Open 1 %ZIS3 ;SFISC/AC,RWF -- DEVICE HANDLER(DEVICE TYPES & PARAMETERS) ;10/06/2005 13:23 2 ;;8.0;KERNEL;**18,36,69,104,391**;JUL 10, 1995 3 I %ZIS'["T",$G(^%ZIS(1,+%E,"POX"))]"" D XPOX^ZISX(%E) 6 4 I $D(%ZISQUIT) S POP=1 K %ZISQUIT 7 5 S %ZISCHK=1 8 ;I 'POP&(%ZISB)&(%ZTYPE'="RES")&(%ZTYPE'="OTH")&(%ZTYPE'="SDP")&(IO'["::") D DEVOK 9 ;See if need to lock. 10 K %ZISLOCK 11 I %ZIS'["T",+$G(^%ZIS(1,+%E,"GBL")) S %ZISLOCK=$NA(^%ZIS("lock",IO)) 12 ; 13 I 'POP G TRM:(%ZTYPE["TRM"),@(%ZTYPE_"^%ZIS6") ;Jump to next part 14 ; 15 Q ;%ZIS6 Returns here 16 ;See if need to un-lock. 17 I $D(%ZISUOUT) K %ZISUOUT,%ZISHP,%ZISHPOP Q 6 I 'POP&(%ZISB)&(%ZTYPE'="RES")&(%ZTYPE'="OTH")&(%ZTYPE'="SDP")&(IO'["::") D DEVOK 7 G Q:POP 8 G @%ZTYPE:(%ZTYPE["TRM"),@(%ZTYPE_"^%ZIS6") ;Jump to next part 9 ; 10 Q I $D(%ZISUOUT) K %ZISUOUT,%ZISHP,%ZISHPOP Q 18 11 I $D(%ZISHPOP)&$S(IO="":1,1:'$D(IO(1,IO))) D HGBSY^%ZIS2 Q 19 I POP S:%ZIS'["T" IO="" I $D(%ZISHG(0)),%ZIS'["D",'$D(%ZISHPOP) G HUNT^%ZIS2 20 Q ;Return to %ZIS1 21 ; 12 I POP S:%IS'["T" IO="" I $D(%ZISHG(0)),%IS'["D",'$D(%ZISHPOP) G HUNT^%ZIS2 13 Q 22 14 VTRM ;Virtual terminal type 23 TRM ;D OPEN^%ZIS4:'POP&(%ZISB&(%ZIS'["T")),MARGN:'POP,SETPAR:'POP ;Terminal type 24 D MARGN:'POP,SETPAR:'POP ;Terminal type// TEST CHANGE 25 I 'POP,%ZIS'["T",%ZISB=1,'$D(IOP),IO'=IO(0),'$D(IO("Q")),%ZIS["Q" D AQUE 26 W:'$D(IOP) ! 27 I '$D(IO("Q")),'POP,%ZISB,%ZIS'["T" D O^%ZIS4 15 TRM D OPEN^%ZIS4:'POP&(%ZISB&(%IS'["T")),MARGN:'POP,SETPAR:'POP ;Terminal type 16 I 'POP,%IS'["T",%ZISB=1,'$D(IOP),IO'=IO(0),'$D(IO("Q")),%IS["Q" D AQUE 17 W:'$D(IOP) ! I '$D(IO("Q")) D O^%ZIS4:'POP&(%ZISB&(%IS'["T")) 28 18 G Q 29 DEVOK N X,Y,X1 ;Not sure this is needed19 DEVOK N X,Y,X1 30 20 S X=IO,X1=%ZTYPE 31 21 D DEVOK^%ZOSV I Y=-99!(Y=0)!(Y=$J) Q 32 I Y>0 S POP=1 W:'$D(IOP)&('$D(%ZISHG(0))!(%IS["D")) !, $C(7),"[Device Unavailable]" Q33 I Y=-1 S IO="",POP=1 W:'$D(IOP)&('$D(ZISHG(0))!(%IS["D")) !, $C(7),"[Device does not Exist or Unavailable]" Q22 I Y>0 S POP=1 W:'$D(IOP)&('$D(%ZISHG(0))!(%IS["D")) !,*7,"[Device Unavailable]" Q 23 I Y=-1 S IO="",POP=1 W:'$D(IOP)&('$D(ZISHG(0))!(%IS["D")) !,*7,"[Device does not Exist or Unavailable]" Q 34 24 Q 35 25 ; … … 49 39 S POP=1 I %ZISB&(%ZTYPE["TRM")&(IO'=IO(0)) C IO K IO(1,IO) Q 50 40 Q 51 SETPAR S: $L(%ZISOPAR)&($E(%ZISOPAR)'="(") %ZISOPAR="("_%ZISOPAR_")"41 SETPAR S:%ZISOPAR]""&($A(%ZISOPAR)-40) %ZISOPAR="("_%ZISOPAR_")" 52 42 Q 53 AQUE ;Ask about Queueing 54 W ! S %=$S($D(IO("Q")):1,1:2),U="^",%ZISDTIM=60 43 AQUE W ! S %=$S($D(IO("Q")):1,1:2),U="^",%ZISDTIM=60 55 44 I $D(IO("Q")) W !,"Previously, you have selected queueing." 56 45 W !,"Do you "_$S($D(IO("Q")):"STILL ",1:"")_"want your output QUEUED" … … 58 47 I %=-1 S POP=1,%ZISHPOP=1,%ZISUOUT=1 C IO K IO(1,IO) Q 59 48 I %=1 S IO("Q")=1 C IO K IO(1,IO) Q 60 ;I %=2 K IO("Q")61 49 Q 62 50 ST(%ZISTP) ; … … 81 69 S:IOST="" IOST="P-OTHER",IOST(0)=0 82 70 Q 71 -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/_ZIS4.m
r628 r636 1 %ZIS4 ;ISF/RWF,DW - DEVICE HANDLER SPECIFIC CODE (GT.M for Unix/VMS) ; 1/24/08 16:082 ;;8.0;KERNEL;**275,425 ,440**;Jul 10, 1995;Build 133 ; Per VHA Directive 2004-038, this routine should not be modified1 %ZIS4 ;ISF/RWF,DW - DEVICE HANDLER SPECIFIC CODE (GT.M for Unix/VMS) ;03/07/2007 2 ;;8.0;KERNEL;**275,425**;Jul 10, 1995;Build 18 3 ; 4 4 OPEN ;From %ZIS3 for TRM 5 5 G OPN2:$D(IO(1,IO)) … … 13 13 Q 14 14 ;Why no open paraneters??? 15 OP1 N $E T S $ET="G OPNERR^%ZIS4"16 I $D(%ZISLOCK) L +@%ZISLOCK:5 E S POP=1 Q17 O IO::%ZISTO S:$T IO(1,IO)="" S:'$T POP=1 15 OP1 N $ES,$ET S $ET="G OPNERR^%ZIS4" 16 L:$D(%ZISLOCK) +@%ZISLOCK:60 17 O IO::%ZISTO S:$T IO(1,IO)="" S:'$T POP=1 L:$D(%ZISLOCK) -@%ZISLOCK 18 18 Q 19 19 OPNERR ;Open Error 20 S POP=1,IO("LASTERR")=$G(IO("ERROR")),IO("ERROR")=$$EC^%ZOSV,$EC="" 21 Q 20 S POP=1,IO("LASTERR")=$G(IO("ERROR")),IO("ERROR")=$$EC^%ZOSV,$EC="" Q 22 21 ; 23 O ;From %ZIS6 for alltypes.22 O ;From %ZIS6 for other types. 24 23 D:%IS["L" ZIO 25 I $D(IO("S")),$D(^%ZIS(2,IO("S"),10)),^(10)]"" U IO(0) D X10^ZISX ;Open Printer Port 24 LCKGBL ;Lock Global 25 I %ZTYPE="CHAN" N % S %=$G(^%ZIS(1,+%E,"GBL")) I $L(%) L @("+^"_%_":0") S:'$T POP=1 I POP W:'$D(IOP) !,?5,*7,"[DEVICE IS BUSY]" Q 26 I $D(IO("S")),$D(^%ZIS(2,IO("S"),10)),^(10)]"" U IO(0) D X10^ZISX 26 27 OPAR I $D(IOP),%ZTYPE="HFS",$D(%IS("HFSIO")),$D(%IS("IOPAR")),%IS("HFSIO")]"" S IO=%IS("HFSIO"),%ZISOPAR=%IS("IOPAR") 27 28 I %ZTYPE="CHAN" D TCPIP Q:POP G OXECUTE^%ZIS6 28 S %A=%ZISOPAR_$S(%ZISOPAR["):":"", 1:":"_%ZISTO)29 S %A=%ZISOPAR_$S(%ZISOPAR["):":"",%ZTYPE["CHAN"&($P(%ZTIME,"^",3)="n"):"",1:":"_%ZISTO) 29 30 N % S %(IO)="",%=$P($P($NA(%(IO)),"(",2),")") 30 31 S %A=%_$E(":",%A]"")_%A … … 39 40 ; 40 41 O1 N $ES,$ET S $ET="G OPNERR^%ZIS4" 41 I $D(%ZISLOCK) L +@%ZISLOCK:5 E S POP=1 Q42 O @%A S:'$T&(%A?.E1":".N) POP=1 S:'POP IO(1,IO)="" 42 L:$D(%ZISLOCK) +@%ZISLOCK:60 43 O @%A S:'$T&(%A?.E1":".N) POP=1 S:'POP IO(1,IO)="" L:$D(%ZISLOCK) -@%ZISLOCK 43 44 S IO("ERROR")="" Q 44 45 ; … … 53 54 Q 54 55 ; 55 TCPIP ;For TCP/IP devices , should use ^%ZISTCP56 TCPIP ;For TCP/IP devices 56 57 N %S 57 58 S %ZISTO=$G(%ZISTO,3) … … 66 67 I $D(ZISDA) W:'$D(IOP) !?5,*7,"You may not Spool the printing of a Spool document" G N 67 68 I $D(DUZ)[0 W:'$D(IOP) !,"Must be a valid user." G N 68 R S %ZY=-1 D NEWDOC^ZISPL1 G N:%ZY'>0 69 S %ZDA=+%ZY,%ZFN=$P(%ZY(0),U,2),IO("DOC")=$P(%ZY(0),U,1) G OK:$D(IO("Q")) 70 G:'%ZISB OK I '$P(%ZY,"^",3),$L(%ZFN) O %ZFN:(append:nowrap):2 G DOC 69 R S %ZY=-1 D NEWDOC^ZISPL1 G N:%ZY'>0 S %ZDA=+%ZY,%ZFN=$P(%ZY(0),U,2),IO("DOC")=$P(%ZY(0),U,1) G OK:$D(IO("Q")) 70 G:'%ZISB OK I '$P(%ZY,"^",3),%ZFN]"" D SPL3 G N:%ZFN']"",DOC 71 71 S %ZFN=IO_"SPOOL_no_"_%ZDA_".TMP" D SPL2 G:%ZFN']"" N S $P(^XMB(3.51,%ZDA,0),U,2)=%ZFN,^XMB(3.51,"C",%ZFN,%ZDA)="" 72 72 DOC S IO=%ZFN,IO("SPOOL")=%ZDA,^XUTL("XQ",$J,"SPOOL")=%ZDA,IOF="#" … … 74 74 OK K %ZDA,%ZFN Q 75 75 N K %ZDA,%ZFN,IO("DOC") S POP=1 Q 76 ; 77 SPL2 ;Open for write 78 O %ZFN:(newversion:noreadonly:nowrap:exception="G SPL4"):2 G:$ZA<0 SPL4 S IO(1,%ZFN)="" Q 79 ; 80 SPL3 ;Open for Read 81 O %ZFN:(readonly:exception="G SPL4"):2 S:'$T ZISPLQ=1 G:'$T SPL4 S IO(1,%ZFN)="" Q 76 SPL2 O %ZFN:(NEWVERSION:WORLD=RWD) G:$ZA<0 SPL4 S IO(1,%ZFN)="" Q 77 SPL3 N X S X="SPL4^%ZIS4",@^%ZOSF("TRAP") 78 O %ZFN:READONLY:1 S:'$T ZISPLQ=1 G:$ZA<0!('$T) SPL4 S IO(1,%ZFN)="" Q 82 79 SPL4 W:'$D(IOP)&'$D(ZTQUEUED) !?5,*7,"Couldn't open the spool file." S %ZFN="" Q 83 ; 84 CLOSE ;Close out the spool 85 N %,%1,%Z1,%ZFN,%ZS,%ZDA,XS,%Y,%X 86 I $L(IO) C IO K IO(1,IO) 87 D FILE^ZISPL1 I %ZDA'>0 K ZISPLAD Q 88 S %ZFN=$P(%ZS,"^",2) D SPL3 Q:%ZFN']"" S %ZCR=$C(13),%Y="" 89 S %Z1=+$G(^XTV(8989.3,1,"SPL")),%=0 90 U %ZFN F R %X#255:5 Q:$ZEOF S %2=%X D CL2 Q:%Z1<% 80 CLOSE N %Z1 C:IO]"" IO K:IO]"" IO(1,IO) D FILE^ZISPL1 I %ZDA'>0 K ZISPLAD Q 81 S %ZFN=$P(%ZS,"^",2) D SPL3 Q:%ZFN']"" U %ZFN S %ZCR=$C(13),%Y="",X="SPLEOF^%ZIS4",@^%ZOSF("TRAP") 82 S %Z1=+$G(^XTV(8989.3,1,"SPL")) 83 F %=0:0 R %X#255:5 Q:$ZA<0 S %2=%X D CL2 G:%Z1<% SPLEX 84 SPLEOF I $ZE'["ENDO" Q ;Send error up 91 85 SPLEX C %ZFN:(DELETE) K:%ZFN]"" IO(1,%ZFN) D CLOSE^ZISPL1 K %Y,%X,%1,%ZFN Q 92 86 ; -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/_ZIS6.m
r628 r636 1 %ZIS6 ;SFISC/AC - DEVICE HANDLER -- RESOURCES ;1/24/08 16:09 2 ;;8.0;KERNEL;**24,49,69,118,127,136,440**;JUL 10, 1995;Build 13 3 ;Per VHA Directive 2004-038, this routine should not be modified 1 %ZIS6 ;SFISC/AC - DEVICE HANDLER -- RESOURCES ;02/04/2000 08:14 2 ;;8.0;KERNEL;**24,49,69,118,127,136**;JUL 10, 1995 4 3 ;Expect that IO is current device 5 OXECUTE ;Open Execute 6 I $D(^%ZIS(2,%ZISIOST(0),2))=1 S %Y=^(2) D 2 7 ANSBAK ;Answer Back 8 I $D(^%ZIS(2,%ZISIOST(0),102)) S %Y=^(102) D 2 E S POP=1 D:'$D(IOP) SAY($C(7)_"[NOT ON LINE]") C:%ZISB IO K IO(1,IO) G QUIT 4 OXECUTE I $D(^%ZIS(2,%ZISIOST(0),2))=1 S %Y=^(2) D 2 5 ANSBAK I $D(^%ZIS(2,%ZISIOST(0),102)) S %Y=^(102) D 2 E S POP=1 D:'$D(IOP) SAY($C(7)_"[NOT ON LINE]") C:%ZISB IO K IO(1,IO) G QUIT 9 6 I $D(%ZISMTR) X ^%ZOSF("MAGTAPE") U IO W:$D(%MT("REW")) @%MT("REW") U IO(0) K %MT 10 7 G QUIT:'$D(IO("P")) … … 63 60 HG ; 64 61 Q 65 SPL ;Spool type 66 N %E,%Z D MARGN^%ZIS3 W:'$D(IOP) ! D SPOOL^%ZIS4:%IS'["T" 62 SPL N %E,%Z D MARGN^%ZIS3 W:'$D(IOP) ! D SPOOL^%ZIS4:%IS'["T" ;Spool type 67 63 G Q 68 64 MT D MARGN^%ZIS3,ASKPAR,AMTREW:'POP&'$D(IOP)&%ZISB W:'$D(IOP) ! D O^%ZIS4:'POP&(%ZISB&(%IS'["T")) ;Magtape type 69 65 G Q 70 SDP ;Sequential disk processor type 71 D MARGN^%ZIS3,ASKPAR W:'$D(IOP) ! D O^%ZIS4:'POP&(%ZISB&(%IS'["T")) 66 SDP D MARGN^%ZIS3,ASKPAR W:'$D(IOP) ! D O^%ZIS4:'POP&(%ZISB&(%IS'["T")) ;Sequential disk processor type 72 67 G Q 73 HFS ;Host File Server type 74 D MARGN^%ZIS3,HFS^%ZIS4 W:'$D(IOP) ! D O^%ZIS4:'POP&(%ZISB&(%IS'["T")) 68 HFS D MARGN^%ZIS3,HFS^%ZIS4 W:'$D(IOP) ! D O^%ZIS4:'POP&(%ZISB&(%IS'["T")) ;Host File Server type 75 69 G Q 76 RES ;Resources 77 G Q:%IS["T" N X,X1 I %IS'["R"!'$D(IOP) S POP=1 W:'$D(IOP) *7," [NOT AVAILABLE]" Q 70 RES G Q:%IS["T" N X,X1 I %IS'["R"!'$D(IOP) S POP=1 W:'$D(IOP) *7," [NOT AVAILABLE]" Q ;Resources 78 71 G Q:$D(IO(1,IO)) I %IS["T" S X=IO,X1="RES" D DEVOK^%ZIS3 S:Y POP=1 G Q:POP 79 72 D:%ZISB RES1 G Q … … 84 77 IMPC ;Imaging Work Station 85 78 BAR ;Bar Code 86 OTH ;Other Device type 87 D MARGN^%ZIS3:'POP,ASKPAR:'POP W:'$D(IOP) ! D O^%ZIS4:'POP&(%ZISB&(%IS'["T")) 79 OTH D MARGN^%ZIS3:'POP,ASKPAR:'POP W:'$D(IOP) ! D O^%ZIS4:'POP&(%ZISB&(%IS'["T")) ;Other Device type 88 80 G Q 89 81 ; 90 ASKPAR ;Ask Parameters 91 G SETPAR^%ZIS3:$D(IOP),SETPAR^%ZIS3:'$P(^%ZIS(1,%E,0),"^",4) W " ADDRESS/PARAMETERS: " W:%ZISOPAR]"" %ZISOPAR_"// " D SBR^%ZIS1 D MSG1:%X="?" G ASKPAR:%X="?" S:%X]"" %ZISOPAR=%X I $D(DTOUT)!$D(DUOUT) S POP=1 82 ASKPAR G SETPAR^%ZIS3:$D(IOP),SETPAR^%ZIS3:'$P(^%ZIS(1,%E,0),"^",4) W " ADDRESS/PARAMETERS: " W:%ZISOPAR]"" %ZISOPAR_"// " D SBR^%ZIS1 D MSG1:%X="?" G ASKPAR:%X="?" S:%X]"" %ZISOPAR=%X I $D(DTOUT)!$D(DUOUT) S POP=1 92 83 I POP,%ZISB&(%ZTYPE["TRM") C IO K IO(1,IO) Q 93 84 Q:POP G SETPAR^%ZIS3 85 AMTREW I %ZISB,%ZTYPE="MT",'$D(IOP) W " REWIND" S %=2,U="^",%ZISDTIM=60 D YN^%ZIS1 K %ZISDTIM G AMTREW:%=0 I %=-1 S POP=1 Q 86 S:%=1 %ZISMTR=1 Q 87 MSG1 W !?5,"Enter the desired parameters needed to open the selected device.",!?25 Q 94 88 ; 95 AMTREW ;Mag Tape Rewind96 I %ZISB,%ZTYPE="MT",'$D(IOP) W " REWIND" S %=2,U="^",%ZISDTIM=60 D YN^%ZIS1 K %ZISDTIM G AMTREW:%=0 I %=-1 S POP=1 Q97 S:%=1 %ZISMTR=198 Q99 MSG1 W !?5,"Enter the desired parameters needed to open the selected device.",!?25100 Q101 ; -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/_ZISC.m
r628 r636 1 %ZISC ;SFISC/GFT,AC,MUS - CLOSE LOGIC FOR DEVICES ;1/24/08 16:09 2 ;;8.0;KERNEL;**24,36,49,69,199,216,275,409,440**;JUL 10, 1995;Build 13 3 ;Per VHA Directive 2004-038, this routine should not be modified 1 %ZISC ;SFISC/GFT,AC,MUS - CLOSE LOGIC FOR DEVICES ;01/14/2002 09:06 2 ;;8.0;KERNEL;**24,36,49,69,199,216,275,409**;JUL 10, 1995;Build 3 4 3 C0 ; 5 4 N %,%E,%H,%ZISI,%ZISOS,%ZISX,%ZISV … … 42 41 . U:$S($D(ZTQUEUED):0,'$L($G(IO(0))):0,$D(IO(1,IO(0)))#2:1,1:0) IO(0) 43 42 . C IO K IO(1,IO) S IO("CLOSE")=IO ;close device 44 ;Unlock global used to control access.45 S %=$G(^XUTL("XQ",$J,"lock",+$G(IOS))) I $L(%) L -@% K ^XUTL("XQ",$J,"lock",IOS)46 43 ; 44 ; 45 I $D(IOT),IOT="CHAN",$D(IOS) D 46 .S %=$G(^%ZIS(1,+IOS,"GBL")) 47 .I %]"" L @("-^"_%) ;unlock global used to control access to network channels. 47 48 I $D(IO("SPOOL")) D CLOSE^%ZIS4 ;Special close for spool device 48 49 ; -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/_ZISS1.m
r628 r636 1 %ZISS1 ;AC/SFISC - Collect screen parameters 5/29/88 2:02 PM ;1/24/08 16:10 2 ;;8.0;KERNEL;**69,440**;JUL 10, 1995;Build 13 3 ;Per VHA Directive 2004-038, this routine should not be modified 4 VALID ; 5 N %ZISI,%ZISNP,ZISCH,ZISEND,ZISNUM,ZISQ,ZISXL,ZISXLN ;p440 6 D L 1 %ZISS1 ;AC/SFISC - Collect screen parameters 5/29/88 2:02 PM ;11/05/97 08:40 2 ;;8.0;KERNEL;**69**;JUL 10, 1995 3 VALID D L K %ZISI,%ZISNP,ZISCH,ZISEND,ZISNUM,ZISQ,ZISXL,ZISXLN Q 4 ; 5 SET2 S %ZISFN="" F %ZISZ=0:0 S %ZISFN=$O(%ZISZ(%ZISFN)) Q:%ZISFN="" I $D(%ZISZ(%ZISFN))#2 S %ZISXX=%ZISZ(%ZISFN) D INDCK 7 6 Q 8 ; 9 SET2 ; 10 S %ZISFN="" F %ZISZ=0:0 S %ZISFN=$O(%ZISZ(%ZISFN)) Q:%ZISFN="" I $D(%ZISZ(%ZISFN))#2 S %ZISXX=%ZISZ(%ZISFN) D INDCK 11 Q 12 INDCK ; 13 S %ZISY="" 7 INDCK S %ZISY="" 14 8 I "IOEFLD^IOSTBM"[%ZISFN S @%ZISFN=%ZISXX Q 15 9 I %ZISXX]"" S @("%ZISY="_%ZISXX) … … 18 12 E S @("IO"_$E(%ZISFN,1,6))=%ZISY 19 13 Q:'$D(%ZIS)#2 Q:%ZIS'["I" Q:'$D(%ZISZ(%ZISFN,1)) 20 ; 21 SRAY ; 22 S %=%ZISY,%ZISY=$A($E(%ZISY,1)) 14 SRAY S %=%ZISY,%ZISY=$A($E(%ZISY,1)) 23 15 F %1=2:1:$L(%) S %ZISY=%ZISY_$S($A(%,%1)<32:$A(%,%1),$A(%,%1)=127:127,1:$E(%,%1)) 24 16 S IOIS(%ZISY)=%ZISFN 25 17 Q 26 18 CHECK ;Entry point called from input transforms of fields in DEV/TT files. 27 N %ZISXX,%ZISYY,%ZISI,%ZISNP,%ZISX1,%ZISX2,ZISCH,ZISNUM,ZISQ,ZISXL,ZISXLN ;p440 28 S %ZISXX=X D L S X=%ZISYY 19 S %ZISXX=X D L S X=%ZISYY K %ZISXX,%ZISYY,%ZISI,%ZISNP,%ZISX1,%ZISX2,ZISCH,ZISNUM,ZISQ,ZISXL,ZISXLN 29 20 Q 30 21 CHECK1 ;Entry point called from input transforms of fields in DEV/TT files. 31 N %ZISXX,%ZISYY,%ZISI,%ZISNP,%ZISX1,%ZISX2,ZISCH,ZISNUM,ZISQ,ZISXL,ZISXLN ;p44032 22 S %ZISXX=$S(X?1"W ".E:$E(X,3,$L(X)),1:X) 33 D L S X=$S(X?1"W ".E:"W "_%ZISYY,1:%ZISYY) 23 D L S X=$S(X?1"W ".E:"W "_%ZISYY,1:%ZISYY) K %ZISXX,%ZISYY,%ZISI,%ZISNP,%ZISX1,%ZISX2,ZISCH,ZISNUM,ZISQ,ZISXL,ZISXLN 34 24 Q 35 25 FORM ;Entry point called from input transforms of fields in DEV/TT files. 36 26 Q:$L(X,"_")'>1 37 N %ZISSI,%ZISSY ;p44038 27 ;F %ZISSI=1:1:$L(X,"_") S %ZISX1=$P(X,"_",%ZISSI) I %ZISX1]"","#?!"[$E(%ZISX1) S X=$S(%ZISSI=1:"",1:$P(X,"_",1,%ZISSI-1)_",")_%ZISX1_$S(%ZISSI<$L(X,"_"):","_$P(X,"_",%ZISSI+1,255),1:"") W !,%ZISSI_"==>"_X 39 28 S %ZISSY="" 40 29 F %ZISSI=1:1:$L(X,"_") S %ZISSY=%ZISSY_$P(X,"_",%ZISSI)_$S($P(X,"_",%ZISSI+1)="":"","#?!"[$E($P(X,"_",%ZISSI+1)):",","#?!"[$E($P(X,"_",%ZISSI)):",",1:"_") 41 S X=%ZISSY 30 S X=%ZISSY K %ZISSI,%ZISSY 42 31 Q 43 32 ; 44 33 L S ZISQ="""",%ZISNP=0,ZISXLN=$L(%ZISXX) I 'ZISXLN S %ZISYY="" Q 45 S ZISXL=0,%ZISYY="" F %ZISI=0:0 S ZISXL=ZISXL+1 S ZISCH=$E(%ZISXX,ZISXL) D L1 Q:ZISXL'<ZISXLN34 S (ZISXL)=0,%ZISYY="" F %ZISI=0:0 S ZISXL=ZISXL+1 S ZISCH=$E(%ZISXX,ZISXL) D L1 Q:ZISXL'<ZISXLN 46 35 ;I $L(%ZISYY,"$C(")>2,%ZISYY[")_$C(" S %ZISXX=%ZISYY D L2,L3 S %ZISYY=%ZISXX Q 47 36 S %ZISXX=%ZISYY D L2,L3 S %ZISYY=%ZISXX … … 52 41 I ZISCH="*" D STAR Q 53 42 I ZISCH="(" D PAREN Q 54 S %ZISYY=%ZISYY_ZISCH 43 S %ZISYY=%ZISYY_ZISCH Q 44 L2 F I=1:1:$L(%ZISXX,"_") S %ZISX1=$P(%ZISXX,"_",I),%ZISX2=$P(%ZISXX,"_",I+1) I $E(%ZISX1,1,3)="$C(",$E(%ZISX2,1,3)="$C(" D S2 55 45 Q 56 L2 ;Find $C(x)_$C(y) and merge 57 N I ;p440 58 F I=1:1:$L(%ZISXX,"_") S %ZISX1=$P(%ZISXX,"_",I),%ZISX2=$P(%ZISXX,"_",I+1) I $E(%ZISX1,1,3)="$C(",$E(%ZISX2,1,3)="$C(" D S2 59 Q 60 L3 ; 61 N I 62 F I=1:1:$L(%ZISXX,"_") I $P(%ZISXX,"_",I)["+","$("'[$E($P(%ZISXX,"_",I)),")"'[$E($P(%ZISXX,"_",I),$L($P(%ZISXX,"_",I))) S $P(%ZISXX,"_",I)="("_$P(%ZISXX,"_",I)_")" 46 L3 F I=1:1:$L(%ZISXX,"_") I $P(%ZISXX,"_",I)["+","$("'[$E($P(%ZISXX,"_",I)),")"'[$E($P(%ZISXX,"_",I),$L($P(%ZISXX,"_",I))) S $P(%ZISXX,"_",I)="("_$P(%ZISXX,"_",I)_")" 63 47 Q 64 48 STAR ;S ZISNUM="" F %ZISI=0:0 S ZISXL=ZISXL+1 S ZISCH=$E(%ZISXX,ZISXL) S:ZISCH?1N ZISNUM=ZISNUM_ZISCH I ZISCH=""!(ZISCH=",") S %ZISYY=%ZISYY_"$C("_+ZISNUM_")",ZISXL=ZISXL-1 Q … … 67 51 QUOTE S %ZISYY=%ZISYY_ZISCH F %ZISI=0:0 S ZISXL=ZISXL+1 S ZISCH=$E(%ZISXX,ZISXL),%ZISYY=%ZISYY_ZISCH I ZISCH=ZISQ!(ZISXL'<ZISXLN) Q 68 52 Q 69 DOLR ;L ooking for$C.53 DOLR ;LOOKING FOR $C. 70 54 I "IXY"[$E(%ZISXX,ZISXL+1) S %ZISYY=%ZISYY_"$"_$E(%ZISXX,ZISXL+1) S ZISXL=ZISXL+1 Q 71 I "ACDEFJLNOPRSTV"[$E(%ZISXX,ZISXL+1)&($E(%ZISXX,ZISXL+2)="(") S %ZISYY=%ZISYY_"$"_$E(%ZISXX,ZISXL+1),ZISXL=ZISXL+2 D PAREN Q 72 S %ZISYY=%ZISYY_"$" ;p440 55 I "ACDEFJLNOPRSTV"[$E(%ZISXX,ZISXL+1)&($E(%ZISXX,ZISXL+2)="(") S %ZISYY=%ZISYY_"$"_$E(%ZISXX,ZISXL+1),ZISXL=ZISXL+2 D PAREN 73 56 Q 74 PAREN S %ZISYY=%ZISYY_"(",ZISEND=")",%ZISNP=%ZISNP+1 D SCAN S %ZISNP=%ZISNP-1 75 Q 57 PAREN S %ZISYY=%ZISYY_"(",ZISEND=")",%ZISNP=%ZISNP+1 D SCAN S %ZISNP=%ZISNP-1 Q 76 58 SCAN F %ZISI=0:0 S ZISXL=ZISXL+1,ZISCH=$E(%ZISXX,ZISXL) D S1 Q:ZISXL'<ZISXLN!(ZISEND=ZISCH&(%ZISNP)) 77 59 Q … … 79 61 I ZISCH="$" D DOLR Q 80 62 I ZISCH="(" D PAREN Q 81 S %ZISYY=%ZISYY_ZISCH 82 Q 63 S %ZISYY=%ZISYY_ZISCH Q 83 64 ; 84 65 S2 ;MERGE $C -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/_ZOSV2.m
r628 r636 1 1 %ZOSV2 ;ISF/RWF - More GT.M support routines ;10/18/06 14:29 2 ;;8.0;KERNEL;**275,425**;Jul 10, 1995;Build 18 2 ;;8.0;KERNEL;**275,425**;Jul 10, 1995;Build 4;WorldVistA 30-Jan-08 3 ;Modified from FOIA VISTA, 4 ;Copyright 2008 WorldVistA. Licensed under the terms of the GNU 5 ;General Public License See attached copy of the License. 6 ; 7 ;This program is free software; you can redistribute it and/or modify 8 ;it under the terms of the GNU General Public License as published by 9 ;the Free Software Foundation; either version 2 of the License, or 10 ;(at your option) any later version. 11 ; 12 ;This program is distributed in the hope that it will be useful, 13 ;but WITHOUT ANY WARRANTY; without even the implied warranty of 14 ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 ;GNU General Public License for more details. 16 ; 17 ;You should have received a copy of the GNU General Public License along 18 ;with this program; if not, write to the Free Software Foundation, Inc., 19 ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 3 20 Q 4 21 ;SAVE: DIE open array reference. … … 25 42 S $ETRAP="S $ECODE="""" Q" 26 43 S %I=$I,%DIR=$$RTNDIR^%ZOSV,RN=$TR(RN,"%","_") 27 I $L($ZSEARCH(%DIR_RN_".m",244)) ZSYSTEM " DEL "_%DIR_X_".m;*"28 I $L($ZSEARCH(%DIR_RN_".obj",244)) ZSYSTEM " DEL "_%DIR_X_".obj;*"44 I $L($ZSEARCH(%DIR_RN_".m",244)) ZSYSTEM "rm -f "_%DIR_X_".m" 45 I $L($ZSEARCH(%DIR_RN_".obj",244)) ZSYSTEM "rm -f "_%DIR_X_".obj" 29 46 I $L($ZSEARCH(%DIR_RN_".o",244)) ZSYSTEM "rm -f "_%DIR_X_".o" 30 47 Q -
FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/_ZTLOAD4.m
r628 r636 1 %ZTLOAD4 ;SEA/RDS-TaskMan: P I: Is Queued? ; 1/24/08 16:152 ;;8.0;KERNEL; **440**;JUL 10, 1995;Build 133 ; Per VHA Directive 2004-038, this routine should not be modified4 ; Call with ZTSK, [ZTCPU]; Return ZTSK()1 %ZTLOAD4 ;SEA/RDS-TaskMan: P I: Is Queued? ;7/26/91 11:55 ; 2 ;;8.0;KERNEL;;JUL 10, 1995 3 ;;7.0; 4 ; 5 5 INPUT ;check input parameters for error conditions 6 N %,$ES,$ET,%ZTVOL,ZTREC,ZTD,ZT1,ZT2,ZT37 6 I $D(ZTSK)[0 S ZTSK="" 8 I $D(ZTSK)>1 S %=ZTSK K ZTSK S ZTSK=%7 I $D(ZTSK)>1 S ZTLOAD=ZTSK K ZTSK S ZTSK=ZTLOAD K ZTLOAD 9 8 I ZTSK<1!(ZTSK\1'=ZTSK) S ZTSK="",ZTSK(0)="",ZTSK("E")="IT" G QUIT 10 S ZTSK(0)="",ZTSK("E")="U", $ET="Q:$ES S $EC="""" G QUIT^%ZTLOAD4"9 S ZTSK(0)="",ZTSK("E")="U",X="QUIT^%ZTLOAD3",@^%ZOSF("TRAP") 11 10 S %ZTVOL=^%ZOSF("VOL") 12 11 I $D(ZTCPU)[0 S ZTCPU=%ZTVOL … … 15 14 ; 16 15 HERE ;lookup task's status on current volume set 17 L +^%ZTSK(ZTSK):1 18 I $D(^%ZTSK(ZTSK,0))[0 S ZTSK("E")="I" G QUIT 19 S ZTREC=^%ZTSK(ZTSK,0),ZTD=$G(^(.04)) 20 S ZTSK("DUZ")=$P(ZTREC,U,3),ZTSK("D")=$P(ZTREC,U,6) ;scheduled $H 16 L +^%ZTSK(ZTSK) I $D(^%ZTSK(ZTSK,0))[0 S ZTSK("E")="I" G QUIT 17 S ZTREC=^%ZTSK(ZTSK,0),ZTD=$P(ZTREC,U,6) 18 S ZTSK("DUZ")=$P(ZTREC,U,3),ZTSK("D")=ZTD 21 19 I ZTD]"",$D(^%ZTSCH(ZTD,ZTSK))#2 S ZTSK(0)=1 G QUIT 22 20 I ZTD]"",$D(^%ZTSCH("JOB",ZTD,ZTSK))#2 S ZTSK(0)=1 G QUIT 23 21 ; 24 S ZT1="" F S ZT1=$O(^%ZTSCH(ZT1)) Q:'ZT1 I $D(^(ZT1,ZTSK))#2 S ZTSK(0)=1 G QUIT25 S ZT1="IO",ZT2="" F S ZT2=$O(^%ZTSCH(ZT1,ZT2)),ZT3="" Q:ZT2="" FS ZT3=$O(^%ZTSCH(ZT1,ZT2,ZT3)) Q:ZT3="" I $D(^(ZT3,ZTSK))#2 S ZTSK(0)=1 G QUIT26 S ZT1="JOB",ZT2="" F S ZT2=$O(^%ZTSCH(ZT1,ZT2)) Q:ZT2="" I $D(^(ZT2,ZTSK))#2 S ZTSK(0)=1 G QUIT27 S ZT1="LINK",ZT2="" F S ZT2=$O(^%ZTSCH(ZT1,ZT2)),ZT3="" Q:ZT2="" FS ZT3=$O(^%ZTSCH(ZT1,ZT2,ZT3)) Q:ZT3="" I $D(^(ZT3,ZTSK))#2 S ZTSK(0)=1 G QUIT22 S ZT1="" F ZT=0:0 S ZT1=$O(^%ZTSCH(ZT1)) Q:'ZT1 I $D(^(ZT1,ZTSK))#2 S ZTSK(0)=1 G QUIT 23 S ZT1="IO",ZT2="" F ZT=0:0 S ZT2=$O(^%ZTSCH(ZT1,ZT2)),ZT3="" Q:ZT2="" F ZT=0:0 S ZT3=$O(^%ZTSCH(ZT1,ZT2,ZT3)) Q:ZT3="" I $D(^(ZT3,ZTSK))#2 S ZTSK(0)=1 G QUIT 24 S ZT1="JOB",ZT2="" F ZT=0:0 S ZT2=$O(^%ZTSCH(ZT1,ZT2)) Q:ZT2="" I $D(^(ZT2,ZTSK))#2 S ZTSK(0)=1 G QUIT 25 S ZT1="LINK",ZT2="" F ZT=0:0 S ZT2=$O(^%ZTSCH(ZT1,ZT2)),ZT3="" Q:ZT2="" F ZT=0:0 S ZT3=$O(^%ZTSCH(ZT1,ZT2,ZT3)) Q:ZT3="" I $D(^(ZT3,ZTSK))#2 S ZTSK(0)=1 G QUIT 28 26 S ZTSK(0)=0 29 27 ; 30 28 QUIT ;cleanup and quit 31 L:ZTSK -^%ZTSK(ZTSK) ;K %ZTCPU,%ZTM,%ZTM1,%ZTM2,%ZTMAST,%ZTVOL,X,Y,ZT,ZT1,ZT2,ZT3,ZTCPU,ZTD,ZTREC29 L:ZTSK -^%ZTSK(ZTSK) K %ZTCPU,%ZTM,%ZTM1,%ZTM2,%ZTMAST,%ZTVOL,X,Y,ZT,ZT1,ZT2,ZT3,ZTCPU,ZTD,ZTREC 32 30 I ZTSK(0)]"" K ZTSK("E") Q 33 31 I ZTSK("E")'="U" Q … … 36 34 ; 37 35 THERE ;rest of code looks up task's status on some other volume set 38 N %ZTCPU,%ZTM,X,Y39 36 ; 40 37 FILES ;find TaskMan files on the volume set to be searched … … 48 45 SEARCH ;find out if task is queued on that volume set 49 46 I $D(^[X,Y]%ZTSK(ZTSK,0))[0 S ZTSK("E")="I" G QUIT 50 S ZTREC=^[X,Y]%ZTSK(ZTSK,0),ZTD=$ G(^(.04))51 S ZTSK("DUZ")=$P(ZTREC,U,3),ZTSK("D")= $P(ZTREC,U,6)47 S ZTREC=^[X,Y]%ZTSK(ZTSK,0),ZTD=$P(ZTREC,U,6) 48 S ZTSK("DUZ")=$P(ZTREC,U,3),ZTSK("D")=ZTD 52 49 I ZTD]"",$D(^[X,Y]%ZTSCH(ZTD,ZTSK))#2 S ZTSK(0)=1 G QUIT 53 50 I ZTD]"",$D(^[X,Y]%ZTSCH("JOB",ZTD,ZTSK))#2 S ZTSK(0)=1 G QUIT 54 51 ; 55 S ZT1="" F S ZT1=$O(^[X,Y]%ZTSCH(ZT1)) Q:'ZT1 I $D(^(ZT1,ZTSK))#2 S ZTSK(0)=1 G QUIT56 S ZT1="IO",ZT2="" F S ZT2=$O(^[X,Y]%ZTSCH(ZT1,ZT2)),ZT3="" Q:ZT2="" FS ZT3=$O(^[X,Y]%ZTSCH(ZT1,ZT2,ZT3)) Q:ZT3="" I $D(^(ZT3,ZTSK))#2 S ZTSK(0)=1 G QUIT57 S ZT1="JOB",ZT2="" F S ZT2=$O(^[X,Y]%ZTSCH(ZT1,ZT2)) Q:ZT2="" I $D(^(ZT2,ZTSK))#2 S ZTSK(0)=1 G QUIT58 S ZT1="LINK",ZT2="" F S ZT2=$O(^[X,Y]%ZTSCH(ZT1,ZT2)),ZT3="" Q:ZT2="" FS ZT3=$O(^[X,Y]%ZTSCH(ZT1,ZT2,ZT3)) Q:ZT3="" I $D(^(ZT3,ZTSK))#2 S ZTSK(0)=1 G QUIT52 S ZT1="" F ZT=0:0 S ZT1=$O(^[X,Y]%ZTSCH(ZT1)) Q:'ZT1 I $D(^(ZT1,ZTSK))#2 S ZTSK(0)=1 G QUIT 53 S ZT1="IO",ZT2="" F ZT=0:0 S ZT2=$O(^[X,Y]%ZTSCH(ZT1,ZT2)),ZT3="" Q:ZT2="" F ZT=0:0 S ZT3=$O(^[X,Y]%ZTSCH(ZT1,ZT2,ZT3)) Q:ZT3="" I $D(^(ZT3,ZTSK))#2 S ZTSK(0)=1 G QUIT 54 S ZT1="JOB",ZT2="" F ZT=0:0 S ZT2=$O(^[X,Y]%ZTSCH(ZT1,ZT2)) Q:ZT2="" I $D(^(ZT2,ZTSK))#2 S ZTSK(0)=1 G QUIT 55 S ZT1="LINK",ZT2="" F ZT=0:0 S ZT2=$O(^[X,Y]%ZTSCH(ZT1,ZT2)),ZT3="" Q:ZT2="" F ZT=0:0 S ZT3=$O(^[X,Y]%ZTSCH(ZT1,ZT2,ZT3)) Q:ZT3="" I $D(^(ZT3,ZTSK))#2 S ZTSK(0)=1 G QUIT 59 56 S ZTSK(0)=0 G QUIT 60 57 ;
Note:
See TracChangeset
for help on using the changeset viewer.