Ignore:
Timestamp:
Dec 4, 2009, 8:26:01 PM (15 years ago)
Author:
George Lilly
Message:

WorldVistAEHR overlayed on FOIAVistA

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/2006
    2  ;;8.0;KERNEL;**34,244,365**;Jul 10, 1995;Build 5
     1XGKB ;SFISC/VYD - Read with Escape Processing ;07/10/2002  10:58
     2 ;;8.0;KERNEL;**34,244**;Jul 10, 1995
    33 ;;Special thanks to MELDRUM.KEVIN@ISC-SLC.VA.GOV
    44 ;
     
    88 I %OS["MSM" U $I:(0::::64) D:'$D(^XUTL("XGKB")) MSM^XGKB1
    99 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
    1111 I %OS["GT.M" U $I:(ESCAPE) D:'$D(^XUTL("XGKB")) GTM^XGKB1
    1212 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
     1XPDDP ;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
     3EN1 ;print from Build file
     4 N DIC,D0,XPD,XPDT,XPDST,Y,Z
    85 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)
    118 Q
    12 EN2 ; Print from Distribution
     9EN2 ;print from Distribution
    1310 N D0,DIC,POP,XPD,XPDA,XPDNM,XPDT,XPDST,Y,Z,%ZIS
    1411 S XPDST=$$LOOK^XPDI1("I $D(^XTMP(""XPDI"",Y))",1)
    15  S D0=$O(^XTMP("XPDI",XPDST,"BLD",0)) Q:'D0
    16  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)
    1815 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 ;
     17LST1 ;
     18 K DIRUT N XPDIT S XPDIT=0
     19 F  S XPDIT=$O(XPDT(XPDIT)) Q:$D(DIRUT)!(XPDIT'>0)  D
    2420 . S D0=+XPDT(XPDIT) D PNT("XPD(9.6,D0)")
    25  D WAIT
    2621 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 ;
     23LST2 ;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
    3226 . S XPDA=+XPDT(XPDIT),D0=$O(^XTMP("XPDI",XPDA,"BLD",0)) D PNT("XTMP(""XPDI"",XPDA,""BLD"",D0)")
    33  D WAIT
    3427 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 ;
     29PNT(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
    4733 Q:$G(XPDGR)=""  S XPDGR="^"_XPDGR
    4834 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,!
     63PNT2 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),!
     76COMP 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)
     111REQB 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))
    61115 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
     116GLOBAL ;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 ;
     122MULT ;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"
    202129CHK(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"
    204130 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
    206134 S XPD=$G(XPD),XPDPG=XPDPG+1
    207135 W @IOF D HDR,HDR1:XPD
    208  W !,XPDUL
     136 W XPDUL,!
    209137 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 ;
    216139XMP2(X,D0) ;called from ^XMP2
    217140 N XPDA S XPDA=-1
    218  D PNT(X)
     141 D PNT(X) Q
     142 ;
     143HDR W !,"PACKAGE: ",$P(XPD0,U),"     ",XPDDT,?70,"PAGE ",XPDPG,!
    219144 Q
    220 HDR ;
    221  W "PACKAGE: ",$P(XPD0,U),"     ",XPDDT,?70,$$RJ^XLFSTR("PAGE "_XPDPG,9)
     145HDR1 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",!
    222147 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:29
     1XPDI ;SFISC/RSD - Install Process ;9:53 AM  31 Jan 2008
    22 ;;8.0;KERNEL;**10,21,39,41,44,58,68,108,145,184,229**;Jul 10, 1995
    33EN ;install
     
    66 Q:'XPDST!$D(XPDQUIT)
    77 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 ;
    814 ;Check each part of XPDT array
    915 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:14
    2  ;;8.0;KERNEL;**58,61,95,108,229,275**;Jul 10, 1995
     1XPDI1 ;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
    33 ;lookup into file 9.7, XPDS=DIC("S") for lookup
    44 ;return 0-fail or ien, XPDT=array of linked builds
    55LOOK(XPDS,XPDL) ;lookup Install
    66 N DIC,Y,XPD,XPDIT,%
     7 S:$D(AAQP) DIC("B")=AAQP ;MPLS XU*L33 used only by XPDZPAT and AAQMENU
    78 S DIC(0)="QEAMZ",DIC="^XPD(9.7,"
    89 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/2006
     1XPDIL ;SFISC/RSD - load Distribution Global ;10/10/06  17:00
    22 ;;8.0;KERNEL;**15,44,58,68,108,422**;Jul 10, 1995;Build 2
    33 ;This routine has the changes made for patch 345 but was released as 422 to fix a read HFS problem
     
    4141 I '$G(XPDAUTO) D HOME^%ZIS
    4242 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
    4345 S DIR(0)="F^3:75",DIR("A")="Enter a Host File",DIR("?")="Enter a filename and/or path to input Distribution."
    4446 ;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.
     1XPDIST ;SFISC/RSD - site tracking; 06/01/2006
     2 ;;8.0;KERNEL;**66,108,185,233,350,393**;Jul 10, 1995;Build 12
    43 ;Returns ""=failed, XMZ=sent
    54 ;D0=ien in file 9.7, XPY=national site tracking^address(optional)
    65EN(D0,XPY) ;send message
    7  N %,DIFROM,XPD,XPD0,XPD1,XPD2,XPDV,XPZ,X,X1,Z,Y,XPD6,XPDTRACK
     6 N %,DIFROM,XPD,XPD0,XPD1,XPD2,XPDV,XPDTEXT,XPZ,XMDUZ,XMSUB,XMTEXT,XMY,XMZ,X,X1,Z,Y,XPD6
    87 ;Get data needed
    98 I '$D(^XPD(9.7,$G(D0),0)) D BMES^XPDUTL(" INSTALL file entry missing") Q ""
     
    1615 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))
    1716 D LOCAL
    18  S XPDTRACK=$$TRACK
    1917 D REMEDY ;p350 -REM
    2018 Q $$FORUM()
     19 ;
     20 ;
     21FORUM() ;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 ;
    2149LOCAL ;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
    2451 S X=$$MAILGRP^XPDUTL(XPD) Q:X=""
    2552 S XMY(X)="" D GETENV^%ZOSV
     
    3865 D ^XMD
    3966 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 ;
    5068REMEDY ;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)=""
    5471 S:XPY XMY("ESSRESOURCE@MED.VA.GOV")=""
    5572 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
    5678 ;Message for server (all in one string)
    5779 ;XMTEXT=Type(1),Domain(2-65),Pkg(66-95),Version(96-125),
     
    6890 D ^XMD
    6991 Q
    70 FORUM() ;send to Server on FORUM
    71  Q:'XPDTRACK ""
    72  N XMY,XPDTEXT,XMTEXT,XMDUZ,XMSUB,XMZ
    73  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 server
    77  S XPDTEXT(1,0)="PACKAGE INSTALL"
    78  S XPDTEXT(2,0)="SITE: "_$G(^XMB("NETNAME"))
    79  S XPDTEXT(3,0)="PACKAGE: "_XPD
    80  S XPDTEXT(4,0)="VERSION: "_XPDV
    81  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: "_DT
    85  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)=XPD2
    89  S XMDUZ=$S($P(XPD0,U,11):+$P(XPD0,U,11),1:.5),XMTEXT="XPDTEXT(",XMSUB=$P(XPD0,U)_" INSTALLATION"
    90  D ^XMD
    91  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:06
    2  ;;8.0;KERNEL;**80,501**;Jul 10, 1995;Build 1
     1XQ3 ;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
    33 Q
    44ENASK ;Ask to fix up dirty OPTION/HELP FRAME File
    5  N IX,XUT,J,K,XQFL,X
    65 I '$D(%) W !,$C(7),"ENTRY MUST BE WITH THE VARIABLE '%' SET TO INDICATE DESIRED FILE.",$C(7),! Q
    76 S XQFL=$S(%=1:"OPTION",%=2:"PROTOCOL",1:"HELP FRAME")
     
    2221 W !!,"Enter:  NO or ^ to continue on without effecting the ",XQFL," File."
    2322 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"
     23REMOVE 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
     26ENFIX ;Kill any dangling pointers in the OPTION File (#19)
     27 S (I,X)=0 ;X=Total Deletions
     28L1 S I=$O(^DIC(19,I)) I I>0 S (Y,J)=0 G L2 ;Loop through menus
    2729 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
     30L2 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
     35ITEM 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
     39XREFS S K=":"
     40L3 S K=$O(^DIC(19,I,10,K)) I K="" G L1 ;Loop through cross references
     41 S L=-1
     42L4 S L=$O(^DIC(19,I,10,K,L)) I L="" G L3
     43 S J=0
     44L5 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
     46L6 S M=^DIC(19,I,10,J,0) I (M=L)!(M[L_"^") G L5
     47KILLXR 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
     49HFFIX ; 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
    3351 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
     52HF1 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)
    4053 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
     54HF2 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
    4956 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."
     57HF3 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
    7058 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)
     59HF4 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)
    8360 Q
    8461PFIX ;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
     63P1 S I=$O(^ORD(101,I)) I I>0 S (Y,J)=0 G P2 ;Loop through protocols
    8864 Q
    89 P2 S J=$O(^ORD(101,IX,10,J)) I J>0 G PITEM ;Loop through items
    90  I '$D(^ORD(101,IX,10,0)) G P1
    91  S (K,J)=0 F L=1:1 S J=$O(^ORD(101,IX,10,J)) Q:J'>0  S K=J ;K=Last item
    92  S J=^ORD(101,IX,10,0),^(0)=$P(J,"^",1,2)_"^"_K_"^"_Y ;fix counters
     65P2 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
    9369 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
     70PITEM 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
    9873 G P2
    9974PXREFS S K=":"
    100 P3 S K=$O(^ORD(101,IX,10,K)) I K="" G P1 ;Loop through cross references
     75P3 S K=$O(^ORD(101,I,10,K)) I K="" G P1 ;Loop through cross references
    10176 S L=-1
    102 P4 S L=$O(^ORD(101,IX,10,K,L)) I L="" G P3
     77P4 S L=$O(^ORD(101,I,10,K,L)) I L="" G P3
    10378 S J=0
    104 P5 S J=$O(^ORD(101,IX,10,K,L,J)) I J'>0 G P4
    105  I '$D(^ORD(101,IX,10,J,0)) G PKILLXR ;kill xref to invalid item
    106 P6 S M=^ORD(101,IX,10,J,0) I (M=L)!(M[L_"^") G P5
    107 PKILLXR K ^ORD(101,IX,10,K,L,J) I $O(^ORD(101,IX,10,K,L,-1))="" K ^ORD(101,IX,10,K,L)
     79P5 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
     81P6 S M=^ORD(101,I,10,J,0) I (M=L)!(M[L_"^") G P5
     82PKILLXR K ^ORD(101,I,10,K,L,J) I $O(^ORD(101,I,10,K,L,-1))="" K ^ORD(101,I,10,K,L)
    10883 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
     1XQ5 ;SF/GFT,MJM,KLD - Menu edit utilities [XUEDITOPT] ;09/20/96  15:33
     2 ;;8.0;KERNEL;**44,130**;Jul 10, 1995
    53DIP ;
    64 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)
     
    3331Q1 K XQDIC,XQ,Y S DIC=DIE Q
    3432 ;
    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"
     33DIC S XQ=$P(^DIC(XQDIC,0),U,1),XQ(30)=$P(^(0,"GL"),U,2),XQ(31)="AEMQ"
    3734 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
    3835 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"
    4237A Q
    4338 ;
     
    4843 G:DUZ0 DIQ1 S DIC("S")="I 1 Q:'$D(^(0,""RD""))  F %=1:1:$L(^(""RD"")) I DUZ(0)[$E(^(""RD""),%) Q"
    4944DIQ1 ;
    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
    5346 ;
    5447NAME ;
     
    6760PRNT W !,?16,"*** IMPORTANT PLEASE READ ***",!
    6861 W !,"By selecting a new Print/Sort Template below, your defaults will"
    69  W !,"be changed. Your defaults are currently set as follows (see below)."
     62 W !,"be changed. Your defaults are currently set as follows(see below)."
    7063 W !,"Should you desire to keep the defaults as they are, or to revise"
    7164 W !,"one or more, enter an '^' up-arrow, without selecting a new"
    7265 W !,"template name."
    7366 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)
    7568 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)
    7770 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)
    7972 W ?40,"TO: "_$$GET1^DIQ(19,DA,66),!!
    8073 Q
     
    8275SORT W !,?16,"*** IMPORTANT PLEASE READ ***",!
    8376 W !,"By selecting a new Sort Template below, your defaults will be"
    84  W !,"changed. Your defaults are currently set as follows (see below)."
     77 W !,"changed. Your defaults are currently set as follow(see below)."
    8578 W !,"Should you desire to keep the defaults as they are, or to revise"
    8679 W !,"one or more, enter an '^' up-arrow, without selecting a new Sort"
    8780 W !,"Template."
    8881 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)
    9184 W ?40,"TO: "_$$GET1^DIQ(19,DA,66),!!
    9285 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
     1XQ55 ; 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
    43INIT ;
    54 S XQDSH="-------------------------------------------------------------------------------"
     
    87MPAT 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
    98 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=0
     9 S K=^DIC(19,XQOPT,0),XQHDR="Access to '"_$P(K,U,2)_"'  ["_$P(K,U,1)_"]",XQSCD=0
    1110LOOP1 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
    1211 G LOOP2
     
    2625LOOP2 ;
    2726 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 menu
    2927 G LOOP3
    3028USERS ;
    3129 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
    3230 Q
    33 USERS1 ; 080115 code added to handle options on the COMMON (XUCOMMAND) menu
    34  N XUCOMMON
    35  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 D
    37  . D  Q:'Y
    38  . . 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:'Y
    44  . . Q
    45  . 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 SETU
    46  Q
    47  ;
    4831EACHU ;
    4932 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
    5139 Q
    52  ;
    53 KEYCHECK() ; 080115 extracted common code
    54  ; returns 1 if user has access to the option, 0 if the user does not have access
    55  S XQK=$P(^TMP($J,XQP,J),U,1),XX=$L(XQK,",")-1,XQGO=1
    56  I XX F X=1:1:XX S Y=$P(XQK,",",X) I Y'="",('$D(^XUSEC(Y,XQU))) S XQGO=0
    57  S XQK=$P(^TMP($J,XQP,J),U,3),XX=$L(XQK,",")-1
    58  I XX F X=1:1:XX S Y=$P(XQK,",",X) I Y'="",($D(^XUSEC(Y,XQU))) S XQGO=0
    59  Q XQGO
    60  ;
    6140SETU ;
    6241 S XQPA=$P(^TMP($J,XQP,J),U,2)
    6342 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 ; 080115
     43 S XQPA=XQPA(XQPA) S:XQPS="AD" XQPA=XQPA_"(S)",XQSCD=1
    6544 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
    6645 Q
     
    10281 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)
    10382 I XQSCD W !,"(S) - secondary menu pathway"
    104  I XQCOM W !,"(C) - SYSTEM COMMAND OPTIONS (XUCOMMAND) menu pathway"
    10583 Q
    10684MUS G:X="^" OUT I XQPG,$E(IOST,1)="C" W !!,"Press return when finished viewing " R X:DTIME W @IOF G OUT
     
    10987 D ^%ZISC
    11088KILL 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,XQNOPRNT I $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)
    11290 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/07
    2  ;;8.0;KERNEL;**81,116,157,253,478**;Jul 10, 1995;Build 3
     1XQ81 ;SEA/AMF/LUKE,SF/RWF - Build menu trees ;03/03/2003  10:00
     2 ;;8.0;KERNEL;**81,116,157,253**;Jul 10, 1995
    33BUILD ;
    44 ;
     
    1010 S XQSTART=$$HTE^XLFDT($H)
    1111 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) BLDEND1 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) BLDEND1 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) BLDEND1 I Y=1 D
     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 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
    1616 .S ZTRTN="QUE^XQ81",ZTIO=""
    1717 .S ZTSAVE("XQVE")="",ZTSAVE("XQBSEC")="",ZTSAVE("XQSTART")=""
     
    2424 E  S ^DIC(19,"AXQ","P0")=$H L +^DIC(19,"AXQ","P0")
    2525 ;
    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) BLDEND1 G:Y'=1 RD2
     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 G:Y'=1 RD2
    2727 ;
    2828KIDS ;Entry from KIDS
     
    251251 G UNWIND^%ZTER
    252252 Q
    253  ;
    254 BLDEND1 ;Quit and clean
    255  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,XQJ
    256  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:39
    2  ;;8.0;KERNEL;**207,285,443**;Jul 10, 1995;Build 4
     1XQALDATA ;ISC-SF/JLI - PROVIDE DATA ON ALERTS ;9/9/03  15:13
     2 ;;8.0;KERNEL;**207,285**;Jul 10, 1995
    33 Q
    44GETUSER(ROOT,XQAUSER,FRSTDATE,LASTDATE) ;
    5  N XREF,XVAL,X,X2,X3,I,NCNT ; P443
     5 N XREF,XVAL
    66 S:$G(XQAUSER)'>0 XQAUSER=DUZ
    77 S:$G(FRSTDATE)'>0 FRSTDATE=0
     
    99 S NCNT=0 K @ROOT
    1010 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)) D
     11 . F I=0:0 S I=$O(^XTV(8992,XQAUSER,"XQA",I)) Q:I'>0  S X=^(I,0),X3=$G(^(3)) D
    1212 . . 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:"") ; P443
     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)
    1414 . S @ROOT=NCNT
    1515 S XREF="R"
     
    1818 Q
    1919GETPAT(ROOT,PATIENT,FRSTDATE,LASTDATE) ;
    20  N XREF,XVAL,NCNT
     20 N XREF,XVAL
    2121 S NCNT=0 K @ROOT
    2222 I $G(PATIENT)'>0 S @ROOT=0 Q
     
    2626 Q
    2727CHKTRAIL ;
    28  N XQ1,X,X1,X2,X3
    29  ; ZEXCEPT: FRSTDATE,LASTDATE,NCNT,ROOT,XREF,XVAL  -- from GETPAT or GETUSER
    3028 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=""
    3230 . I FRSTDATE'>0,'$D(^XTV(8992,"AXQA",$P(X,U))) Q
    3331 . I FRSTDATE>0,$P(X,U,2)<FRSTDATE Q
    3432 . I FRSTDATE>0,LASTDATE>0,$P(X,U,2)>LASTDATE Q
    3533 . 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:"") ; P443
     34 . 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)
    3735 S @ROOT=NCNT
    3836 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:13
    2  ;;8.0;KERNEL;**6,24,65,114,174,285,443**;Jul 10, 1995;Build 4
     1XQALDEL ;ISC-SF.SEA/JLI - DELETE ALERTS ;6/28/04  11:02
     2 ;;8.0;KERNEL;**6,24,65,114,174,285**;Jul 10, 1995
    33 ;;
    44 Q
     
    107107 S XQDAT=$$FMADD^XLFDT(DT,-30)
    108108 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)
    110110 . S DA=XQDEL1 I X2="",X1>XQDAT Q
    111111 . 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:54
    2  ;;8.0;KERNEL;**20,65,114,123,125,164,173,285,366,443**;Jul 10, 1995;Build 4
     1XQALERT1 ;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
    33 ;;
    44 Q
     
    2929SUBLOOP W @IOF
    3030 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 DOIT1
     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) D  I XQX'="" D DOIT1
    3232 . I '$D(^XTV(8992,XQAUSER,"XQA",XQII)) S XQX="" K ^TMP("XQ",$J,"XQA",XQI),^TMP("XQ",$J,"XQA1",(999999-XQI))
    3333 . Q
     
    4040 ;
    4141RESTORE ; Restore a deleted message for use
    42  N ALERTREF,XTVGLOB,ADUZ,X,X0,X1,X2,TIME,MESG,OPT,TAG,ROU,X4,LONG
     42 N ALERTREF,XTVGLOB,ADUZ,X,X0,X1,X2,TIME,MESG,OPT,TAG,ROU
    4343 S XTVGLOB=$NA(^XTV(8992,DUZ,"XQA"))
    4444 S ADUZ=$O(^XTV(8992,"AXQA",XQAID,0)) I ADUZ>0 S TIME=$O(^(ADUZ,0)) D  I 1
    4545 . M @XTVGLOB@(TIME)=^XTV(8992,ADUZ,"XQA",TIME) K @XTVGLOB@(TIME,2) ; copy alert, kill comment if any
    4646 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:" ")
    5050 . S @XTVGLOB@(TIME,0)=X I $G(X2)'="" S ^(1)=X2
    5151 S ^XTV(8992,"AXQA",XQAID,DUZ,TIME)="",^XTV(8992,"AXQAN",$E($P(XQAID,";"),1,30),DUZ,TIME)=""
     
    6969 I XQK=0 S XQALINFO=0 I '$D(XQALFWD) W @IOF
    7070 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'=""  ; P285
     71 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
    7272 . W !?8,"Forwarded by: ",$P(^VA(200,+XQZ1,0),U),"  Generated: ",$$DAT8^XQALERT(+$P($P(XQX,U,2),";",3),1)
    7373 . I $P(XQZ1,U,3)'="" W !?8,$P(XQZ1,U,3)
     
    129129 ;
    130130SORT ;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
    134133 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)
    135134 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:03
    2  ;;8.0;KERNEL;**443**;Jul 10, 1995;Build 4
     1XQALMAKE ;ISC-SF.SEA/JLI- HIGH LEVEL SETUP ALERT ;9/23/94  13:28
     2 ;;8.0;KERNEL;;Jul 10, 1995
    33 ;;
    44ENTRY ;
     
    1111 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
    1212SETIT ;
    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 LONGTEXT
    1413 W !!,"As currently entered, this alert will display the following text:",!!,XQAMSG
    1514 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
     
    3332 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)=""
    3433 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:06
    2  ;;8.0;KERNEL;**1,6,65,75,114,125,173,207,285,443**;Jul 10, 1995;Build 4
     1XQALSET ;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
    33 ;;
    44 Q
     
    88 Q
    99 ;
    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.
     10SETUP1() ; .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. 
    1111 ; If not successful XQALERR is defined and contains reason for failure.
    1212 K XQALERR
     
    2323REENT() ; Entry for forwarding, etc.
    2424 N RETVAL S RETVAL=1
    25  K ^TMP("XQAGROUP",$J) ; P443 - clear location for storage of groups processed
    2625 N XQADATIM,XQALIST,XQALIST1,XQNRECIP S XQNRECIP=0 S XQADATIM=$$NOW^XLFDT()
    2726 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
     
    6059REP I $D(^XTV(8992,XQJ,"XQA",XQXI,0)) S XQXI=XQXI+.00000001 G REP
    6160 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 ARRAY
     61 I $D(XQATEXT) D WP^DIE(8992.01,(XQXI_","_XQJ_","),4,"","XQATEXT")
    6362 L -^XTV(8992,XQJ)
    6463 K XQA(XQJ) S:XQAID'="" ^XTV(8992,"AXQA",XQAID,XQJ,XQXI)="",^XTV(8992,"AXQAN",XQA1,XQJ,XQXI)=""
     
    111110 I RETVAL S RETVAL=RETVAL_U_$G(XQADA)_U_XQAID
    112111 K:XQAID'="" ^XTV(8992,"AXQA",XQAID,0,0)
    113  K ^TMP("XQAGROUP",$J) ; P443 - clear global used to track processing of groups
    114112 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
    115113 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:26
    2  ;;8.0;KERNEL;**285,443**;Jul 10, 1995;Build 4
     1XQALSET1 ;ISC-SF.SEA/JLI - SETUP ALERTS (OVERFLOW) ;10/20/03  15:03
     2 ;;8.0;KERNEL;**285**;Jul 10, 1995
    33 ;;
    44 Q
    5 GROUP ;
     5GROUP ; 
    66 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
    1011 S XQI=$$FIND1^DIC(3.8,,"X",XQL) Q:XQI'>0
    1112 N XQLIST D LIST^DIC(3.81,","_XQI_",",".01","I",,,,,,,.XQLIST) I XQLIST("ORDER")>0 D
     
    1314 . Q
    1415 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
    1717 . Q
    18  K @XQLIST,XQLIST
    1918 K XQA(XQJ)
    2019 D CHEKACTV(.XQA)
     
    2726 Q
    2827 ;
    29 CHEKUSER(XQAUSER) ; Returns 0 if no valid user or surrogate, otherwise returns IEN of user or surrogate
     28CHEKUSER(XQAUSER) ;SR. Returns 0 if no valid user or surrogate, otherwise returns IEN of user or surrogate
    3029 N VALUE
    3130 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:35
    2  ;;8.0;KERNEL;**366,443**;Jul 10, 1995;Build 4
     1XQALSUR1 ;ISC-SF.SEA/JLI - SURROGATES FOR ALERTS ;9/6/05  14:26
     2 ;;8.0;KERNEL;**366**;Jul 10, 1995
    33 Q
    44 ;
     
    9292SURRO11 ;
    9393 S XQALSURO=$$NEWDLG() I XQALSURO'>0 Q
    94  I $$CYCLIC^XQALSURO(XQALSURO,XQAUSER)'>0 W $C(7),!,$$CYCLIC^XQALSURO(XQALSURO,XQAUSER),! G SURRO11
     94 I $$CYCLIC^XQALSURO(XQALSURO,XQAUSER)'>0 W $C(7),!,$$CYCLIC^XQALSURO(XQALSURO,XQAUSER),! G SURRO1
    9595 S XQALSTRT=+$$STRTDLG() I XQALSTRT<0 Q
    9696 S XQALEND=+$$ENDDLG() I XQALEND<0 Q
     
    104104 S XQALSURO=$G(XQALSURO),XQALSTRT=$G(XQALSTRT)
    105105 N XQALFM,XQALXREF,XQALSTR1,XQALSUR1,XQALNOW,XQALEND,XQA0
     106 ; ZEXCEPT: XQATEST   (EXTERNAL VALUE - INDICATING TEST BEING RUN)
    106107 D CHEKSUBS^XQALSUR2(XQAUSER)
    107108 S XQALSUR1=+$P($G(^XTV(8992,XQAUSER,0)),U,2) S:XQALSURO'>0 XQALSURO=XQALSUR1
     
    116117DELETENT(XQAUSER,XQALXREF,XQALSURO,XQALSTRT,XQALSUR1,XQALSTR1,XQALEND) ;
    117118 N XQALNOW,XQALFM
     119 ; ZEXCEPT: XQATEST   (EXTERNAL VALUE - INDICATING TEST BEING RUN)
    118120 S XQAUSER=XQAUSER_",",XQALXREF=XQALXREF_","_XQAUSER
    119121 I XQALXREF>0 D
     
    129131 . Q
    130132 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
    133134 . N XQAMESG,XMSUB,XMTEXT
    134135 . 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:20
    2  ;;8.0;KERNEL;**114,125,173,285,366,443**;Jul 10, 1995;Build 4
     1XQALSURO ;ISC-SF.SEA/JLI - SURROGATES FOR ALERTS ;9/6/05  15:13
     2 ;;8.0;KERNEL;**114,125,173,285,366**;Jul 10, 1995
    33 ;;
    44 Q
     
    1616 D SURRO1^XQALSUR1(XQAUSER)
    1717 Q
     18 ; P366 - optional start and end dates added to permit identification of cyclical surrogates in specific times
    1819CYCLIC(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!" ;P443
    20  I XQALSURO=XQAUSER Q "You cannot specify yourself as your own surrogate!" ; moved in P443
    2120 I $G(XQASTRT)>0 Q $$DCYCLIC^XQALSUR1(XQALSURO,XQAUSER,XQASTRT,$G(XQAEND))
    2221 N XQALSTRT
     22 I XQALSURO=XQAUSER Q "You cannot specify yourself as your own surrogate!"
    2323 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!" Q
     24 . I XQALSTRT=XQAUSER S XQALSURO="YOU are designated as the surrogate for this user - can't do it!" Q
    2525 . 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
    2626 . Q
    2727 Q XQALSURO
    2828 ;
    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
     29SETSURO(XQAUSER,XQALSURO,XQALSTRT,XQALEND) ; SR
    3530 N XQALFM,XQALIEN,XQAIENS
    3631 I $G(XQAUSER)'>0 Q
     
    6055 S XMSUB="Surrogate Recipient for "_$$GET1^DIQ(200,XQAIENS,.01,"E")
    6156 S XMTEXT="XQAMESG("
    62  ; ZEXCEPT: XTMUNIT   - Defined if unit tests are being run
    63  D:'$D(XTMUNIT) SENDMESG
     57 D:'$D(XQATEST) SENDMESG
    6458 Q
    6559 ;
     
    8074 N XQAVAL
    8175 S XQAVAL=$$CYCLIC(XQALSURO,XQAUSER,XQALSTRT,$G(XQALEND)) I XQAVAL'>0 Q XQAVAL ; Can't use as surrogate
    82  D SETSUROX(XQAUSER,XQALSURO,XQALSTRT,$G(XQALEND)) ; P443
     76 D SETSURO(XQAUSER,XQALSURO,XQALSTRT,$G(XQALEND))
    8377 Q XQALSURO
    8478 ;
     
    108102 ;
    109103 ; 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
    111107 . S XQAIVAL=0,XQASTR1=0
    112108 . 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
     
    124120 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)
    125121 . 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)
    139124 . Q
    140125 Q -1
    141  ;
    142 ISACTIVE(XQAUSER) ; checks for whether a surrogate relationship is active or not (returns 0 or 1)
    143  N DATA
    144  S DATA=$G(^XTV(8992,XQAUSER,0)) Q:$P(DATA,U,2)="" 0  ; NO SURROGATE SPECIFIED
    145  I $P(DATA,U,3)>0,$P(DATA,U,3)>$$NOW^XLFDT() Q 0  ; START DATE/TIME NOT YET
    146  I $P(DATA,U,4)>0,$P(DATA,U,4)<$$NOW^XLFDT() Q 0  ; PAST END DATE/TIME
    147  Q 1
    148126 ;
    149127ACTVSURO(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:16
    2  ;;8.0;KERNEL;**316,443**;Jul 10, 1995;Build 4
     1XQARPRT2 ;DCN/BUF,JLI/OAK-OIFO - LOOKUP PROVIDER ALERTS 25 SEP 98 ;9/3/03  11:15
     2 ;;8.0;KERNEL;**316**;Jul 10, 1995
    33 ;  Based on the original routine AEKALERT
    44 Q
     
    1313 N XQANWID,XQAIEN,XQADATE,XQANODE0,XQACTR,HEADERID,XQATOT
    1414 S HEADERID="User "_$$GET1^DIQ(200,XQADOC_",",.01)_" (DFN="_XQADOC_")"
    15  U IO
    1615 D HEADER(HEADERID,1)
    1716 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
     
    2019 . D PRNTATRK(XQAIEN)
    2120 D HEADER(HEADERID,0)
    22  D ^%ZISC
    2321 K XQADATE,XQACTR,DATA,DIR,DIRUT,XQADOC,XQAIEN,XQANODE0,XQASDATE,Y
    2422 Q
     
    4745 . Q
    4846 ;
    49  I $D(XQAWORDS)>1,$G(TYPE)="" D
     47 I $D(XQAWORDS)>1,$G(TYPE)="" D 
    5048 . 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)."
    5149 . 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
     
    8280 S XQACTR=XQACTR+2 I XQACTR>(IOSL-4) D  Q:$D(DIRUT)  S XQACTR=0
    8381 . 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 !
    8683 . Q
    8784 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  ;
     1XQCHK ; 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
    53 Q:'$D(XQCY)!(XQCY<1)  S:'$D(XQJMP) XQJMP=0
    64 I '$D(XQY0) S XQY0=^DIC(19,+XQCY,0)
     
    1816 Q
    1917 ;
    20 OUT K %,%XQI,XQCY0,%Y,XQZ
     18OUT ;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
    2121 Q
    2222 ;
     
    6767 Q %
    6868 ;
     69 ;
    6970ACCESS(%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 ;
     169KEYS ;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
    71189 ;
    72190OPACCES ;Entry point for the option that checks to see if a user has
    73191 ;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 ;
     231KILLFM ;Kill off the FileMan variables
     232 K D0,DI,DIC,DIE,DISYS,DQ,DR,DUOUT,DTOUT,X,Y
    75233 Q
    76234 ;
  • 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)
     1XQCHK2 ; 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
     4CHCKL(XQCY0,DUZ) ;
    135 N XQI,XQY,XQX,XQRT,XQK S (XQRT,XQX)=0
    14  ;check Key for the option; p457
    15  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 XQRT
    18  ;loop through higher menu options.
    196 S XQY=$P(XQCY0,"^",5)
    207 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 Q
     8 . I +XQX S XQK=$$GET1^DIQ(19,XQX,3) I XQK'="",'$D(^XUSEC(XQK,DUZ)) S XQRT=1_"^"_XQK Q
    229 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
     11CHCKRL(XQCY0,DUZ) ;
    2912 N XQI,XQY,XQX,XQRT,XQK S (XQRT,XQX)=0
    30  ;check Reversed Key for the option; p457
    31  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 XQRT
    34  ;loop through higher menu options.
    3513 S XQY=$P(XQCY0,"^",5)
    3614 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 Q
     15 . I +XQX S XQK=$$GET1^DIQ(19,XQX,3.01) I XQK'="",$D(^XUSEC(XQK,DUZ)) S XQRT=1_"^"_XQK Q
    3816 Q XQRT
    39  ;
    40 GETIEN(XQNAME) ;get IEN for an option; 457
    41  ;; XQNAME is name of an option
    42  ;; Retrun XQIEN: Null or IEN if existed
    43  N XQIEN S XQIEN=""
    44  I $G(XQNAME)="" Q XQIEN
    45  I '$D(^DIC(19,"B",XQNAME)) Q XQIEN
    46  S XQIEN=$O(^DIC(19,"B",XQNAME,XQIEN))
    47  Q XQIEN
    48  ;
    49 CHKTOPL(XQIEN,XQDUZ) ;Check Lock for the top level of the secondary options
    50  ;this need to be called to check the top level first when check the
    51  ;Locks for lower menu option because the 6th piece of ^XUTL does not
    52  ;contain the IEN of the top menu option.
    53  N XQRT,XQK S XQRT=0
    54  I XQIEN'=+$G(XQIEN) Q XQRT
    55  S XQK=$$GET1^DIQ(19,XQIEN,3)
    56  I $G(XQK)'="",'$D(^XUSEC(XQK,XQDUZ)) S XQRT=1_"^"_XQK
    57  Q XQRT
    58  ;
    59 CHKTOPRL(XQIEN,XQDUZ) ;Check Reversed Lock the top level of the secondary options
    60  ;this need to be called to check the top level first when check the
    61  ;Reversed Locks for lower menu option because the 6th piece of ^XUTL does not
    62  ;contain the IEN of the top menu option.
    63  N XQRT,XQK S XQRT=0
    64  I XQIEN'=+$G(XQIEN) Q XQRT
    65  S XQK=$$GET1^DIQ(19,XQIEN,3.01)
    66  I $G(XQK)'="",$D(^XUSEC(XQK,XQDUZ)) S XQRT=1_"^"_XQK
    67  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
     1XQOR ; 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
    319 S DIC=19,DIC(0)="AEMQ" D ^DIC K DIC Q:Y<0  S X=+Y_";DIC(19,"
    420EN ;Process options/protocols from top
     
    1228 S XQORNEST(XQORS)=^TMP("XQORS",$J,XQORS,"VPT"),XQORNEST=XQORS
    1329 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
    1534 D C19^XQOR4 G:Y<0 EX
    1635 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
     1XQOR4 ; 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
    319DJMP ;From: STAK^XQOR1
    420 Q:'$D(^TMP("XQORS",$J,XQORS,"ITM",^TMP("XQORS",$J,XQORS,"ITM"),"IN"))
     
    2137 Q:'$D(@(^TMP("XQORS",$J,XQORS,"REF")_"0)"))  S X=$P(^(0),"^",2) W:X'?1." " !!?(36-($L(X)\2)),"--- "_X_" ---"
    2238 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
     40READ 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
    2443 Q
    2544C19 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/04
     1XQORC ; DRIVER FOR COMPILED XREFS FOR FILE #101 ; 01/30/05
    22 ;
    33 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/04
     1XQORC1 ; COMPILED XREF FOR FILE #101 ; 01/30/05
    22 ;
    33 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/04
     1XQORC10 ; COMPILED XREF FOR FILE #101.02 ; 01/30/05
    22 ;
    33 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/04
     1XQORC11 ; COMPILED XREF FOR FILE #101.021 ; 01/30/05
    22 ;
    33 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/04
     1XQORC12 ; COMPILED XREF FOR FILE #101.03 ; 01/30/05
    22 ;
    33 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/04
     1XQORC13 ; COMPILED XREF FOR FILE #101.07 ; 01/30/05
    22 ;
    33 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/04
     1XQORC14 ; COMPILED XREF FOR FILE #101.0775 ; 01/30/05
    22 ;
    33 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/04
     1XQORC2 ; COMPILED XREF FOR FILE #101.01 ; 01/30/05
    22 ;
    33 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/04
     1XQORC3 ; COMPILED XREF FOR FILE #101.02 ; 01/30/05
    22 ;
    33 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/04
     1XQORC4 ; COMPILED XREF FOR FILE #101.021 ; 01/30/05
    22 ;
    33 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/04
     1XQORC5 ; COMPILED XREF FOR FILE #101.03 ; 01/30/05
    22 ;
    33 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/04
     1XQORC6 ; COMPILED XREF FOR FILE #101.07 ; 01/30/05
    22 ;
    33 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/04
     1XQORC7 ; COMPILED XREF FOR FILE #101.0775 ; 01/30/05
    22 ;
    33 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/04
     1XQORC8 ; COMPILED XREF FOR FILE #101 ; 01/30/05
    22 ;
    33 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/04
     1XQORC9 ; COMPILED XREF FOR FILE #101.01 ; 01/30/05
    22 ;
    33 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  
    11XQSUITE ;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.
    320 ;
    421 ;Jump-start XQSUITE by asking which suite to run
     
    134151 .D GET^XGCLOAD(XQSUI,$NA(^TMP($J,XQWIN)))
    135152 .D M^XG(XQWIN,$NA(^TMP($J,XQWIN)))
    136  .D SD^XG($PD,"FOCUS",XQWIN)
     153 .D SD^XG($P,"FOCUS",XQWIN)
    137154 .;D ESTA^XG() ;Send it off to window land
    138155 .;
  • 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:45
    2  ;;8.0;KERNEL;**208,258,284,432**;Jul 10, 1995;Build 3
     1XUP ;SFISC/RWF - Setup enviroment for programmers ;09/21/2004  16:35
     2 ;;8.0;KERNEL;**208,258,284**;Jul 10, 1995
    33 W !,"Setting up programmer environment"
    4  S U="^",$ECODE="",$ETRAP="" ;Clear error and error trap
     4 N $ESTACK,$ETRAP S $ECODE="",$ETRAP="" ;Clear and error trap
    55 X ^%ZOSF("TYPE-AHEAD")
    66 ;Check if Production and report
     
    1414 I $D(DUZ("SAV")) S DUZ=+DUZ("SAV"),DUZ(0)=$P(DUZ("SAV"),U,2) K DUZ("SAV")
    1515 ;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 ;p432
    1716 I $G(DUZ)>0 D DUZ(DUZ)
    1817 I $G(DUZ)'>0!('$D(DUZ(0))) D ASKDUZ G:Y'>0 EXIT
    1918 I '$D(XQUSER) S XQUSER=$S($D(^VA(200,DUZ,20)):$P(^(20),"^",2),1:"Unk")
    2019 S DTIME=600 ;Set a temp DTIME
    21  S DILOCKTM=+$G(^DD("DILOCKTM"),1) ;p432
    2220 ;Getting Terminal Type
    2321ZIS 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
     
    3331 I $$GET^XPAR("USR^SYS","XUS-XUP SET ERROR TRAP",1,"Q") S $ETRAP="D ERR^XUP"
    3432 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
     33EXIT D KILL1^XUSCLEAN K XQY,XQY0
     34 I $$GET^XPAR("USR^SYS","XUS-XUP VPE",1,"Q"),$D(^%ZVEMS) X ^%ZVEMS ;Run VPE
    3835 Q
    3936 ;
    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
     37ASKDUZ X XUEOFF S DIR(0)="FO",DIR("A")="Access Code" D ^DIR W ! X XUEON I $D(DIRUT) S Y=-1 Q
    4538 S X=$$UP^XLFSTR(X) S:X[":" XUTT=1,X=$P(X,":",1)_$P(X,":",2)
    4639 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
    4941 ;
    5042DUZ(DA) ;Build DUZ for a user.  Used by Mailman.
    5143 ;(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"))
    5445 S DUZ=DA
    5546 S:$G(DUZ(0))'="@" DUZ(0)=$P(Y(0),"^",4)
    5647 S DUZ(1)="",DUZ("AG")=$P($G(^XTV(8989.3,1,0)),"^",8)
    5748 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)
    6051 Q
    6152 ;
    6253DTIME(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)
    6555 Q $S(P]"":P,1:300)
    6656 ;
    6757ERR ;
    68  N %XUP U $P
     58 U $P
    6959 W !,"$ECODE=",$ECODE,"   $STACK=",$STACK
    70  W !,"Location: ",$STACK($STACK-1,"PLACE")
    7160 R !!,"Want to record the error: No// ",%XUP:600 I "Yy"[$E(%XUP_"N") D ^%ZTER
    7261 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:47
    2  ;;8.0;KERNEL;**284,440**;Jul 10, 1995;Build 13
     1XUPROD ;ISF/RWF - Is this a PROD account. ;06/17/2004  08:13
     2 ;;8.0;KERNEL;**284**;Jul 10, 1995
    33 ;
    44 ;IA# 4440
     
    3232 N DIR,P S P=$$PROD
    3333 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."
    3938 D ^DIR Q:$D(DIRUT)
    4039 I Y=1 D SSID($$SID^%ZOSV)
     
    4342 W:P !!,"This is now a PRODUCTION account.",! W:'P !!,"This is now a TEST account.",!
    4443 Q
    45  ;
    46 EDIT ;Edit Logical - Physical fields
    47  N DIE,DA,DR
    48  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 ^DIE
    52  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
     1XUS ;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
    319 ;Sign-on message numbers are 30810.51 to 30810.99
    420 S U="^" D INTRO^XUS1A()
     
    8096 . Q
    8197 Q A
    82  ;
     98 ; 
    8399CHECKAV(X1) ;Check A/V code return DUZ or Zero. (Called from XUSRB)
    84100 N %,%1,X,Y,IEN,DA,DIK
     
    90106 . Q
    91107 ;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
    93109 S X=$P(X1,";") Q:X="^" -1 S:XUF %1="Access: "_X
    94110 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
    96112 S %1="",IEN=$O(^VA(200,"A",X,0)),XUF(.3)=IEN D USER(IEN)
    97113 S X=$P(X1,";",2) S:XUF %1="Verify: "_X S X=$$EN^XUSHSH(X)
     
    121137 N %
    122138 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_","_XQVOL
     139 D XUVOL,XOPT S DUZ("LANG")=$P(XOPT,U,7) S:$P(XUVOL,U,6)="y" XRTL=XUCI_","_XQVOL
    124140 K ^XUTL("XQ",$J) S XUF=0,XUDEV=0,DUZ=0,DUZ(0)="@",IOS=0,ION=""
    125141 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
    127143 D GETFAC^XUS3($G(IO("IP")))
    128144 S %=$P(XOPT,U,14)
     
    130146 . S XUF=(%["R")+1,XUF(.1)="",XUF(.2)=0,XUF(.3)=0
    131147 . I %["D" S:$D(^XTV(8989.3,1,4.33,"B",XUDEV))[0 XUF=0
    132  S DILOCKTM=+$G(^DD("DILOCKTM"),1) ;p434 IA#4909
    133148 Q
    134149SET2() ;EF. Return error code (also called from XUSRB)
     
    142157 S DTIME=600
    143158 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
    144160 Q 0
    145161 ;
     
    148164 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
    149165 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 p434
    151166 I $P(XUSER(0),U,7) Q 5 ;Disuser flag set
    152  I '$L($P(XUSER(1),U,2)) Q 21 ;p419, p434
     167 I '$L($P(XUSER(1),U,2)) Q 21 ;419
    153168 Q 0
    154169 ;
  • 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/2006
    2  ;;8.0;KERNEL;**59,180,313,419,437**;Jul 10, 1995;Build 2
     1XUS2 ;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
    33 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
    420 ;
    521ACCED ; ACCESS CODE EDIT from DD
     
    4460GET ;Get the user input and convert case.
    4561 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
    4763 Q
    4864 ;
     
    6581 ;Fall into next code
    6682VERED ; VERIFY CODE EDIT From DD
    67  N DIR,DIR0,XUAUTO
     83 N DIR,DIR0,XUAUTO,ASKINGVC
    6884 I "Nn"[$E(X,1) S X="" Q
    6985 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 admin
     86 S ASKINGVC=1,XUH="",XUAUTO=($P($G(^XTV(8989.3,1,3)),U,3)="y") S:DUZ=DA XUAUTO="n" ;Auto only for admin
    7187VC1 D CLR,VASK:'XUAUTO,VAUTO:XUAUTO G OUT:$D(DIRUT) D REASK G OUT:$D(DIRUT),VC1:'XUK D CLR,VST(XUH,1)
    7288 D CALL^XUSERP(DA,2)
     
    84100 N PUNC,NA S PUNC="~`!@#$%&*()_-+=|\{}[]'<>,.?/"
    85101 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
    87104 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."
    88105 I $D(^VA(200,DA,.1)),EC=$P(^(.1),U,2) Q "3^This code is the same as the current one."
     
    110127 ;
    111128AGEN ;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 AGEN
     129 S XUU=$$AC^XUS4 S X=$$EN^XUSHSH(XUU),XUH=X I $D(^VA(200,"A",X))!$D(^VA(200,"AOLD",X)) G AGEN
    113130 D CLR W "The new ACCESS CODE is: ",XUU,"   This is ",XUK," of 3 tries."
    114131 D YN
     
    129146 ;
    130147VGEN ;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 VGEN
     148 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
    132149 D CLR W "The new VERIFY CODE is: ",XUU,"   This is ",XUK," of 3 tries."
    133150 D YN
     
    135152YN ;Ask if want to keep
    136153 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!",!
    142156 Q
    143157 ;
  • 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:12
    2  ;;8.0;KERNEL;**13,59,165,353,434**;Jul 10, 1995;Build 6
     1XUSCLEAN ;SF/STAFF - CLEANUP BEFORE EXIT ;05/26/2005  14:28
     2 ;;8.0;KERNEL;**13,59,165,353**;Jul 10, 1995;Build 1
    33H ;;Exit point for all R/S applications
    44 LOCK  ;Unlock any locks
     
    1919H2 ;No talking after this point
    2020 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 
    2222 ;after each session.
    2323 ;K ^DISV($G(DUZ,0))
     
    7878KILL1 ;To clean up ALL but kernel variables.
    7979 I $$BROKER^XWBLIB S %2=$P($T(VARLST^XWBLIB),";;",2) I %2]"" N @%2 ;Protect Broker variables.
    80  N XGWIN,XGDI,XGEVENT ;P434 remove KWAPI
     80 N KWAPI,XGWIN,XGDI,XGEVENT
    8181 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)
    8483 K IO("C"),IO("Q")
    8584 Q
    8685 ;
    8786XMR ;Entry point from XUS to DO xmr and cleanup after.
    88  N XQXFLG ;p434
    8987 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
     1XUSERBLK ;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
    53 ; This routine allows the Cloning of one person to a group of others.
    64A ;
    75 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,XMQUIET
     6 N DIC,DIR,%,L,XUIOP,XUNODE,XU1,X1,X2,X3,X4,X5,X6,XUTEXT,XUNEW,XUSER,XUTMP,XUTERMDT,XUH,XUU,XUU2,M,P,XU
    97 K ^TMP($J)
    108B1 W @IOF,!?26,"Batch Entry of New Persons"
    119 W !?26,"--------------------------",!!,"Please select a person to copy from"
    1210 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
    1512 ; Show INFO to be copied"
    1613 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
    2317 K XUSER S XUSER=0
    2418B2 ;
    2519 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)
    2721 ;;
    2822B3 F  S XUY=$$ADD^XUSERNEW Q:XUY<0  D  ;Create new entry
     
    3529 . . S DIR(0)="Y",DIR("A")="Do You Want To Clone PERSON CLASS" D ^DIR
    3630 . . 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!",!
    3832 . Q
    3933B4 ;
    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
    5339 I '$D(IO("Q")) G CLONE
    5440START ;
    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 ;;
     44QUIT ;
     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)
    5847 Q
    5948 ;;
    6049CLONE ;;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
    6351 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  Q
     52 G QUIT
     53 ;
    6654C2 ;
    67  N XUU,XUU2,XFDA,XUH,XUH2,XIEN,XERR,Y,XMZ,XMM,XMDT
     55 N XUH,XUH2,XUU,XUU2
    6856 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..."
    6957 D BLDFDA
     
    7866 ;
    7967BLDFDA ;Build the FDA
    80  N X2,X3,X4,X5,X6,X7,XUNODE,XU
    8168 S XFDA="^TMP($J,""XFDA"")",XIEN="^TMP($J,""XIEN"")" K ^TMP($J)
    8269 ;Move piece on nodes from list, Build XU only once
     
    10289 ;
    10390ACODE ;
    104  N Z
    10591 F Z=0:0 S XUU=$$AC^XUS4(),XUH=$$EN^XUSHSH(XUU) Q:'($D(^VA(200,"AOLD",XUH))!$D(^VA(200,"A",XUH)))
    10692 Q
     
    138124 ;
    139125LET(DA,XUTEXT) ;Write access letter
    140  N DIWF,FR,TO,BY,IOP
     126 N DIWF,FR,TO,BY
    141127 S DIWF="^DIC(9.2,"_XUTEXT_",1,",DIWF(1)=200,FR=DA,TO=DA,BY="NUMBER",IOP=XUIOP D EN2^DIWF
    142128 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 ;
     1XUSHSH ;SF-ISC/STAFF - PASSWORD ENCRYPTION ;3/23/89  15:09 ; 4/14/05 1:22pm
    22 ;;8.0;KERNEL;;Jul 10, 1995
    33 ;; This is the public domain version of the VA Kernel.
     
    55 ;; Input in X
    66 ;; Output in X
    7 A Q
    8 EN(X) Q X
     7 ;; Algorithm for VistA Office EHR encryption (BSL)
     8A ;
     9 S X=$$EN(X)
     10 Q
     11EN(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
    43 N %ZISOS,%ZISV
    54 S U="^",%ZISOS=$G(^%ZOSF("OS")),%ZISV=$G(^%ZOSF("VOL"))
     
    98 I '$D(%ZIS),$D(%IS) M %ZIS=%IS
    109 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^%ZOSV
    12  S %ZIS("PRI")=$G(^XUTL("XQ",$J,"MIXED OS"),1)
    1310 ;
    1411 I $D(ZTQUEUED) D  I '$D(IOP) S POP=1 G EXIT^%ZIS1
    1512 .I $D(ZTIO)#2,ZTIO="" S:%IS'[0 %IS=%IS_"0",%ZIS=%ZIS_"0"
    1613 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,%Z2,%Z9,%Z90,%Z91,%Z95,%ZISB,%ZTIME,%ZTYPE
     14 N %,%A,%E,%H,%I,%X,%XX,%Y,%Z,%Z1,%Z9,%Z90,%Z91,%Z95,%ZISB,%ZTIME,%ZTYPE
    1815 N %ZHFN,%ZISOLD,DTOUT,DUOUT
    1916 ;Save symbols to restore if don't open a device
     
    3431 S %=$$LINEPORT^%ZISUTL I % S (%E,%H)=% Q
    3532 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!",*7
     33 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
    3734 S %H=%E S:'%H&(%IS'[0) POP=1 S:(%H>0)&('$D(IO("HOME"))) IO("HOME")=%H_"^"_$I
    3835 Q
     
    6360 ;IO("Q") is checked by many routines after a call to ^%ZISC, so only clean on call to %ZIS.
    6461CLEAN ;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)
    6763 S (IOPAR,IOUPAR)=""
    6864 Q
     
    7066RESETVAR ;Reset home IO* variables.
    7167 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)=""
    7670 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,%)=@%
     71SAVEVAR ;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,%)=@%
    8173 Q
    8274ZISLPC 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
    43MAIN ;Called from %ZIS with a GO
    54 I '$D(IOP),$D(^%ZIS(1,%E,0)),'$P(^(0),"^",3) S %A=%H,%Z=^(0) D L2^%ZIS2 G EXIT
     
    76 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
    87 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 EXIT
     8 I %IS'["Q",$D(XQNOGO) S POP=1 W:'$D(IOP) !,*7,"OUTPUT IS NEVER ALLOWED FOR THIS OPTION" G EXIT
    109 D IOP:$D(IOP),R:'$D(IOP)
    1110 G EXIT:$D(DTOUT)!$D(DUOUT)!(POP&$D(IOP)),L1:POP&'$D(IOP)
    1211 D LKUP I %A'>0 S POP=1 D:'$D(DUOUT) MSG1 K DUOUT
     12 I POP G EXIT:$D(IOP),L1:'$D(IOP)
    1313 I '$D(^%ZIS(1,%A,0)) D MSG1 K %ZISIOS S POP=1
    1414 I POP G EXIT:$D(IOP),L1:'$D(IOP)
     
    1616 I $D(%ZIS("S")) N Y S Y=%E D XS^ZISX S:'$T POP=1 G G:POP
    1717 W:'$D(IOP)&($P(%Z,"^",2)'=$I)&($P(%Z1,"^")]"") "  ",$P(%Z1,"^")
    18  D L2^%ZIS2 ;Call
     18 D L2^%ZIS2
    1919G 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
    2022 ;
    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
     23EXIT I $D(IO)#2,IO]"",$D(IO(1,IO))#2,$D(%Z1),$P(%Z1,"^",11) S IO(1,IO,"NOFF")=1
    2524 ;Do count of number of times device opened.  Field 51.
    26  I $L($G(IO)),$D(IO(1,IO))#2,$G(%ZISIOS) D
     25 I $L($G(IO)),$D(IO(1,IO))#2,'POP,$G(%ZISIOS) D
    2726 . 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
    3228 I %IS'[0,$G(IO(0))]"" U IO(0) ;Make sure return with home active
    3329 G SETVAR:'POP!(%IS["T"),KILVAR
     
    3733 S %IS=%IS_%X K IOP W %X D SETQ Q
    3834 ;Get ready to ask user for device
    39 R I %IS["Q",$D(XQNOGO) W !,$C(7),"AT THIS TIME, OUTPUT MUST BE QUEUED"
     35R I %IS["Q",$D(XQNOGO) W !,*7,"AT THIS TIME, OUTPUT MUST BE QUEUED"
    4036 S %A=$S($D(%IS("B")):%IS("B"),1:"HOME") ;Setup default
    4137 I %IS["P",%A="HOME",$D(^%ZIS(1,%E,99)),$D(^%ZIS(1,+^(99),0)) S %A=$P(^(0),"^",1)
     
    6056 I %X'=%ZISVT S %ZISVT=%X D VTLKUP^%ZIS S %A=%E Q:%A>0  ;uppercase lookup
    6157 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 Q
     58SBR K DFOUT,DTOUT,DUOUT R %X:$S($D(DTIME)#2:DTIME,1:300) E  W *7 S DTOUT=1 Q
    6359 S:%X="."!(%X="^") DUOUT=1,%X="" Q
    6460LC S %X=$$UP(%X)
     
    6662LOW(%) Q $TR(%,"ABCDEFGHIJKLMNOPQRSTUVWXYZ","abcdefghijklmnopqrstuvwxyz")
    6763UP(%) 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)
     64YN W "? ",$P("YES// ^NO// ",U,%)
     65RYN R %X:$S($D(DTIME):DTIME,$D(%ZISDTIM):%ZISDTIM,1:300) E  S DTOUT=1,%X=U W *7
    7266 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
     69MSG1 I '$D(IOP) W ?20,*7,"  [DEVICE DOES NOT EXIST]"
    7770 Q
    7871SETVAR ;Come here to setup the variables for the selected device
     
    8477 S IOT=%ZTYPE,IOST(0)=%ZISIOST(0),IOST=%ZISIOST,IOPAR=%ZISOPAR,IOUPAR=%ZISUPAR,IOHG=%ZISHG
    8578 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
    8880 ;
    8981KILVAR ;Come here to restore the calling variables
     
    9789 S:%IS["T" IO("T")=1 K %ZIS,%IS,%A,%E,%H,%ZISOS,%ZISV,IOP
    9890K2 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
    10293 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
    43HUNT S:'$D(%ZISHP) %ZISHP=%E,%ZISHGL=0 S %E=0
    54 F  S %ZISHGL=$O(^%ZIS(1,%ZISHG(0),"HG",%ZISHGL)) Q:%ZISHGL'>0  D  Q:%E
     
    1211L2 ;Entry point from %ZIS1
    1312 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
     13CHECK 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
    1915 I $P(%Z,"^",12)=2 S %IS=$TR(%IS,"Q") I $D(IO("Q")) D  Q
    2016 . 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)
    64 I $D(%ZISQUIT) S POP=1 K %ZISQUIT
    75 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 ;
     10Q I $D(%ZISUOUT) K %ZISUOUT,%ZISHP,%ZISHPOP Q
    1811 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
    2214VTRM ;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
     15TRM 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"))
    2818 G Q
    29 DEVOK N X,Y,X1 ;Not sure this is needed
     19DEVOK N X,Y,X1
    3020 S X=IO,X1=%ZTYPE
    3121 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]" Q
    33  I Y=-1 S IO="",POP=1 W:'$D(IOP)&('$D(ZISHG(0))!(%IS["D")) !,$C(7),"[Device does not Exist or Unavailable]" Q
     22 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
    3424 Q
    3525 ;
     
    4939 S POP=1 I %ZISB&(%ZTYPE["TRM")&(IO'=IO(0)) C IO K IO(1,IO) Q
    5040 Q
    51 SETPAR S:$L(%ZISOPAR)&($E(%ZISOPAR)'="(") %ZISOPAR="("_%ZISOPAR_")"
     41SETPAR S:%ZISOPAR]""&($A(%ZISOPAR)-40) %ZISOPAR="("_%ZISOPAR_")"
    5242 Q
    53 AQUE ;Ask about Queueing
    54  W ! S %=$S($D(IO("Q")):1,1:2),U="^",%ZISDTIM=60
     43AQUE W ! S %=$S($D(IO("Q")):1,1:2),U="^",%ZISDTIM=60
    5544 I $D(IO("Q")) W !,"Previously, you have selected queueing."
    5645 W !,"Do you "_$S($D(IO("Q")):"STILL ",1:"")_"want your output QUEUED"
     
    5847 I %=-1 S POP=1,%ZISHPOP=1,%ZISUOUT=1 C IO K IO(1,IO) Q
    5948 I %=1 S IO("Q")=1 C IO K IO(1,IO) Q
    60  ;I %=2 K IO("Q")
    6149 Q
    6250ST(%ZISTP) ;
     
    8169 S:IOST="" IOST="P-OTHER",IOST(0)=0
    8270 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:08
    2  ;;8.0;KERNEL;**275,425,440**;Jul 10, 1995;Build 13
    3  ;Per VHA Directive 2004-038, this routine should not be modified
     1%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 ;
    44OPEN ;From %ZIS3 for TRM
    55 G OPN2:$D(IO(1,IO))
     
    1313 Q
    1414 ;Why no open paraneters???
    15 OP1 N $ET S $ET="G OPNERR^%ZIS4"
    16  I $D(%ZISLOCK) L +@%ZISLOCK:5 E  S POP=1 Q
    17  O IO::%ZISTO S:$T IO(1,IO)="" S:'$T POP=1
     15OP1 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
    1818 Q
    1919OPNERR ;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
    2221 ;
    23 O ;From %ZIS6 for all types.
     22O ;From %ZIS6 for other types.
    2423 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
     24LCKGBL ;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
    2627OPAR I $D(IOP),%ZTYPE="HFS",$D(%IS("HFSIO")),$D(%IS("IOPAR")),%IS("HFSIO")]"" S IO=%IS("HFSIO"),%ZISOPAR=%IS("IOPAR")
    2728 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)
    2930 N % S %(IO)="",%=$P($P($NA(%(IO)),"(",2),")")
    3031 S %A=%_$E(":",%A]"")_%A
     
    3940 ;
    4041O1 N $ES,$ET S $ET="G OPNERR^%ZIS4"
    41  I $D(%ZISLOCK) L +@%ZISLOCK:5 E  S POP=1 Q
    42  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
    4344 S IO("ERROR")="" Q
    4445 ;
     
    5354 Q
    5455 ;
    55 TCPIP ;For TCP/IP devices, should use ^%ZISTCP
     56TCPIP ;For TCP/IP devices
    5657 N %S
    5758 S %ZISTO=$G(%ZISTO,3)
     
    6667 I $D(ZISDA) W:'$D(IOP) !?5,*7,"You may not Spool the printing of a Spool document" G N
    6768 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
     69R 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
    7171 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)=""
    7272DOC S IO=%ZFN,IO("SPOOL")=%ZDA,^XUTL("XQ",$J,"SPOOL")=%ZDA,IOF="#"
     
    7474OK K %ZDA,%ZFN Q
    7575N 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
     76SPL2 O %ZFN:(NEWVERSION:WORLD=RWD) G:$ZA<0 SPL4 S IO(1,%ZFN)="" Q
     77SPL3 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
    8279SPL4 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<%
     80CLOSE 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
     84SPLEOF I $ZE'["ENDO" Q  ;Send error up
    9185SPLEX C %ZFN:(DELETE) K:%ZFN]"" IO(1,%ZFN) D CLOSE^ZISPL1 K %Y,%X,%1,%ZFN Q
    9286 ;
  • 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 ;
     4OPEN G OPN2:$D(IO(1,IO))
    65 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:"")
     6OPN2 I $D(%ZISHP),'$D(IOP) W !,$C(7)_" Routing to device "_$P(^%ZIS(1,%E,0),"^",1)_$S($D(^(1)):" "_$P(^(1),"^",1)_" ",1:"")
    97 Q
    10 NOPEN ;
    11  I %IS'["D",$D(%ZISHP)!(%ZISHG]"") S POP=1 Q
     8NOPEN I %IS'["D",$D(%ZISHP)!(%ZISHG]"") S POP=1 Q
    129 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)
    1311 S POP=1 Q
    1412 Q
    15 OP1 N $ET S $ET="G OPNERR^%ZIS4"
    16  I $D(%ZISLOCK) L +@%ZISLOCK:5 E  S POP=1 Q
    17  O IO::%ZISTO S:$T IO(1,IO)="" S:'$T POP=1
     13OP1 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
    1816 Q
    19 OPNERR S POP=1,IO("LASTERR")=$G(IO("ERROR")),IO("ERROR")=$ZE,$EC=""
    20  Q
     17OPNERR S POP=1,IO("LASTERR")=$G(IO("ERROR")),IO("ERROR")=$ZE,$EC="" Q
    2118 ;
    22 O ;Gets called for all devices
    23  N X,%A1
    24  D:%ZIS["L" ZIO
     19O N X D:%IS["L" ZIO
    2520 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)
     21OPAR 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)
    2823 S %A=%A_$S(%A["):":"",%ZTYPE["OTH"&($P(%ZTIME,"^",3)="n"):"",1:":"_%ZISTO),%A=""""_IO_""""_$E(":",%A]"")_%A
    2924 D O1 I POP W:'$D(IOP) !,?5,$C(7)_"[Device is BUSY]" Q
    3025 ;I %ZTYPE="HFS" U IO S X=IO,IO=IO_";"_$P($ZIO,";",2),IO(1,IO)="" K IO(1,X)
    3126 U IO S $X=0,$Y=0
    32  I $L(%ZISUPAR) S %A1=""""_IO_""":"_%ZISUPAR U @%A1
     27 I %ZISUPAR]"" S %A1=""""_IO_""":"_%ZISUPAR U @%A1
    3328 ;U:%IS'[0 IO(0)
    3429 G OXECUTE^%ZIS6
    3530 ;
    36 O1 N $ET S $ET="G OPNERR^%ZIS4"
    37  I $D(%ZISLOCK) L +@%ZISLOCK:5 E  S POP=1 Q
     31O1 N X S X="OPNERR^%ZIS4",@^%ZOSF("TRAP")
     32 L:$D(%ZISLOCK) +@%ZISLOCK:60
    3833 O @%A S:'$T&(%A?.E1":".N) POP=1 S:'POP IO(1,IO)=""
     34 L:$D(%ZISLOCK) -@%ZISLOCK
    3935 S IO("ERROR")=""
    4036 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
    43 ;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
     4OXECUTE I $D(^%ZIS(2,%ZISIOST(0),2))=1 S %Y=^(2) D 2
     5ANSBAK 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
    96 I $D(%ZISMTR) X ^%ZOSF("MAGTAPE") U IO W:$D(%MT("REW")) @%MT("REW") U IO(0) K %MT
    107 G QUIT:'$D(IO("P"))
     
    6360HG ;
    6461 Q
    65 SPL ;Spool type
    66  N %E,%Z D MARGN^%ZIS3 W:'$D(IOP) ! D SPOOL^%ZIS4:%IS'["T"
     62SPL N %E,%Z D MARGN^%ZIS3 W:'$D(IOP) ! D SPOOL^%ZIS4:%IS'["T" ;Spool type
    6763 G Q
    6864MT D MARGN^%ZIS3,ASKPAR,AMTREW:'POP&'$D(IOP)&%ZISB W:'$D(IOP) ! D O^%ZIS4:'POP&(%ZISB&(%IS'["T")) ;Magtape type
    6965 G Q
    70 SDP ;Sequential disk processor type
    71  D MARGN^%ZIS3,ASKPAR W:'$D(IOP) ! D O^%ZIS4:'POP&(%ZISB&(%IS'["T"))
     66SDP D MARGN^%ZIS3,ASKPAR W:'$D(IOP) ! D O^%ZIS4:'POP&(%ZISB&(%IS'["T")) ;Sequential disk processor type
    7267 G Q
    73 HFS ;Host File Server type
    74  D MARGN^%ZIS3,HFS^%ZIS4 W:'$D(IOP) ! D O^%ZIS4:'POP&(%ZISB&(%IS'["T"))
     68HFS D MARGN^%ZIS3,HFS^%ZIS4 W:'$D(IOP) ! D O^%ZIS4:'POP&(%ZISB&(%IS'["T")) ;Host File Server type
    7569 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
     70RES G Q:%IS["T" N X,X1 I %IS'["R"!'$D(IOP) S POP=1 W:'$D(IOP) *7,"  [NOT AVAILABLE]" Q  ;Resources
    7871 G Q:$D(IO(1,IO)) I %IS["T" S X=IO,X1="RES" D DEVOK^%ZIS3 S:Y POP=1 G Q:POP
    7972 D:%ZISB RES1 G Q
     
    8477IMPC ;Imaging Work Station
    8578BAR ;Bar Code
    86 OTH ;Other Device type
    87  D MARGN^%ZIS3:'POP,ASKPAR:'POP W:'$D(IOP) ! D O^%ZIS4:'POP&(%ZISB&(%IS'["T"))
     79OTH D MARGN^%ZIS3:'POP,ASKPAR:'POP W:'$D(IOP) ! D O^%ZIS4:'POP&(%ZISB&(%IS'["T")) ;Other Device type
    8880 G Q
    8981 ;
    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
     82ASKPAR 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
    9283 I POP,%ZISB&(%ZTYPE["TRM") C IO K IO(1,IO) Q
    9384 Q:POP  G SETPAR^%ZIS3
     85AMTREW 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
     87MSG1 W !?5,"Enter the desired parameters needed to open the selected device.",!?25 Q
    9488 ;
    95 AMTREW ;Mag Tape Rewind
    96  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
    97  S:%=1 %ZISMTR=1
    98  Q
    99 MSG1 W !?5,"Enter the desired parameters needed to open the selected device.",!?25
    100  Q
    101  ;
  • 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
    43C0 ;
    54 N %,%E,%H,%ZISI,%ZISOS,%ZISX,%ZISV
     
    4241 . U:$S($D(ZTQUEUED):0,'$L($G(IO(0))):0,$D(IO(1,IO(0)))#2:1,1:0) IO(0)
    4342 . 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)
    4643 ;
     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.
    4748 I $D(IO("SPOOL")) D CLOSE^%ZIS4 ;Special close for spool device
    4849 ;
  • 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/2008
    2  ;;8.0;KERNEL;**440**;Jul 10, 1995;Build 13
     1ZISEDIT ;SFISC/AC - DEVICE EDIT ;11/9/92  17:00
     2 ;;8.0;KERNEL;;Jul 10, 1995
    33 ;
    4 TRM ;TRM or VTRM
    5  D EDIT("TRM",,"Select Terminal/Printer Device: ")
     4MT S ZISTYPE="MT",DIC("A")="Select Magtape Device: " D EDIT K ZISTYPE
    65 Q
    76 ;
    8 LPD ;LPD fields of a TRM device
    9  D EDIT("LPD","TRM","Select LPD (Terminal/Printer) Device: ")
     7SDP S ZISTYPE="SDP",DIC("A")="Select SDP Device: " D EDIT K ZISTYPE
    108 Q
    119 ;
    12 MT ;Mag Tape
    13  D EDIT("MT",,"Select Magtape Device: ")
     10SPL S ZISTYPE="SPL",DIC("A")="Select Spool Device: " D EDIT K ZISTYPE
    1411 Q
    1512 ;
    16 SDP ;
    17  D EDIT("SDP",,"Select SDP Device: ")
     13HFS S ZISTYPE="HFS",DIC("A")="Select Host File Device: " D EDIT K ZISTYPE
    1814 Q
    1915 ;
    20 SPL ;Spool
    21  D EDIT("SPL",,"Select Spool Device: ")
     16CHAN S ZISTYPE="CHAN",DIC("A")="Select Network Channel: " D EDIT K ZISTYPE
    2217 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;;
     19EDIT 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
    4722 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:11
    2  ;;8.0;KERNEL;**34,65,84,104,191,306,385,440**;JUL 10, 1995;Build 13
    3  ;Per VHA Directive 2004-038, this routine should not be modified
     1%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 ;
    44 ; **MODIFIED VERSION FOR CACHE/VMS -- 9/7/01**
    55 ;
     
    4343 Q 0
    4444 ;
    45 DEL(%ZX1,%ZX2) ;ef,SR. Del files, return 1 if deleted all requested.
     45DEL(%ZX1,%ZX2) ;ef,SR. Del fl(s)
    4646 ;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
    5750 . 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.
    7157 Q %ZXDEL
    7258 ;
    7359DELERR ;Trap any $ETRAP error, unwind and return.
    7460 S $ETRAP="D UNWIND^%ZTER"
    75  S %ZXDEL=0,%ZARG=""
     61 S %ZXDEL=0
    7662 D UNWIND^%ZTER
    7763 Q
    7864 ;
    79 DEL1(%ZX3) ;ef,SR. Delete one file
    80  N %ZI1,%ZI2
    81  D SPLIT(%ZX3,.%ZI1,.%ZI2) S %ZI2(%ZI2)=""
    82  Q $$DEL(%ZI1,$NA(%ZI2))
    83  ;
    84 SPLIT(%I,%O1,%O2) ;Split to path,file
    85  N %ZOS,%D,D S %ZOS=$$OS^%ZOSV
    86  I %ZOS["VMS" D  Q
    87  . S D=$S(%I["]":"]",1:":")
    88  . S %O1=$P(%I,D,1)_D,%O2=$P(%I,D,2)
    89  . Q
    90  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  Q
    93  ;
    94 FEXIST(%PATH,%FL) ;Check if files exsist.
    95  ;S Y=$$DTEST("/usr/var",$NA(array))
    96  N %ZISH,%ZISHY
    97  S %ZISH=$$LIST(%PATH,%FL,"%ZISHY")
    98  Q %ZISH
    99  ;
    10065LIST(%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 anything
     66 ;S Y=$$LIST^ZOSHDOS("\dir\",$NA(array),$NA(return array)) Return 1 if found anything
    10267 ;
    10368 N %ZISH,%ZISHN,%ZX,%ZISHY,%ZY,%ZOS
     
    11075 . ;NT, display case, ignore for lookup
    11176 . S %ZX=%ZX1_%ZISH
    112  . F %ZISHN=0:1 D  Q:(%ZX="")
     77 . F %ZISHN=0:1 D  Q:(%ZX="") 
    11378 . . S %ZX=$ZSEARCH($S(%ZISHN:"",1:%ZX))
    11479 . . ;Q:(%ZX="")!($$UP^XLFSTR(%ZX)'[%ZISHY)!(%ZX?.E1.2".")
     
    161126 N %ZOS,P1,P2 S %ZOS=$$OS^%ZOSV,DF=$G(DF)
    162127 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"))
    164129 Q:DF="" ""
    165130 ;Check syntax, VMS needs disk:[dir] or logical:
     
    171136 . S DF=P1_P2 S:DF'[":" DF=DF_":"
    172137 . Q
    173  ;Check syntax, Unix needs /mnt/fl, ./fl, ~/fl $HOME/fl
     138 ;Check syntax, Unix needs /mnt/fl, ./fl
    174139 I %ZOS="UNIX" D
    175140 . S DF=$TR(DF,"\","/")
    176141 . S:$E(DF,$L(DF))'="/" DF=DF_"/"
    177142 . Q
    178  ;Check syntax, NT needs c:\dir\
     143 ;Check syntax, NT needs c:\dir\ 
    179144 I %ZOS="NT" D
    180145 . N P1,P2
     
    227192 ;
    228193FTG(%ZX1,%ZX2,%ZX3,%ZX4,%ZX5) ;ef,SR. Unload contents of host file into global
    229  ;p1=hostf file directory
     194 ;p1=hostf file directory 
    230195 ;p2=host file name
    231196 ;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
     3VALID D L K %ZISI,%ZISNP,ZISCH,ZISEND,ZISNUM,ZISQ,ZISXL,ZISXLN Q
     4 ;
     5SET2 S %ZISFN="" F %ZISZ=0:0 S %ZISFN=$O(%ZISZ(%ZISFN)) Q:%ZISFN=""  I $D(%ZISZ(%ZISFN))#2 S %ZISXX=%ZISZ(%ZISFN) D INDCK
    76 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=""
     7INDCK S %ZISY=""
    148 I "IOEFLD^IOSTBM"[%ZISFN S @%ZISFN=%ZISXX Q
    159 I %ZISXX]"" S @("%ZISY="_%ZISXX)
     
    1812 E  S @("IO"_$E(%ZISFN,1,6))=%ZISY
    1913 Q:'$D(%ZIS)#2  Q:%ZIS'["I"  Q:'$D(%ZISZ(%ZISFN,1))
    20  ;
    21 SRAY ;
    22  S %=%ZISY,%ZISY=$A($E(%ZISY,1))
     14SRAY S %=%ZISY,%ZISY=$A($E(%ZISY,1))
    2315 F %1=2:1:$L(%) S %ZISY=%ZISY_$S($A(%,%1)<32:$A(%,%1),$A(%,%1)=127:127,1:$E(%,%1))
    2416 S IOIS(%ZISY)=%ZISFN
    2517 Q
    2618CHECK ;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
    2920 Q
    3021CHECK1 ;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 ;p440
    3222 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
    3424 Q
    3525FORM ;Entry point called from input transforms of fields in DEV/TT files.
    3626 Q:$L(X,"_")'>1
    37  N %ZISSI,%ZISSY ;p440
    3827 ;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
    3928 S %ZISSY=""
    4029 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
    4231 Q
    4332 ;
    4433L 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'<ZISXLN
     34 S (ZISXL)=0,%ZISYY="" F %ZISI=0:0 S ZISXL=ZISXL+1 S ZISCH=$E(%ZISXX,ZISXL) D L1 Q:ZISXL'<ZISXLN
    4635 ;I $L(%ZISYY,"$C(")>2,%ZISYY[")_$C(" S %ZISXX=%ZISYY D L2,L3 S %ZISYY=%ZISXX Q
    4736 S %ZISXX=%ZISYY D L2,L3 S %ZISYY=%ZISXX
     
    5241 I ZISCH="*" D STAR Q
    5342 I ZISCH="(" D PAREN Q
    54  S %ZISYY=%ZISYY_ZISCH
     43 S %ZISYY=%ZISYY_ZISCH Q
     44L2 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
    5545 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)_")"
     46L3 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)_")"
    6347 Q
    6448STAR ;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
     
    6751QUOTE 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
    6852 Q
    69 DOLR ;Looking for $C.
     53DOLR ;LOOKING FOR $C.
    7054 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
    7356 Q
    74 PAREN S %ZISYY=%ZISYY_"(",ZISEND=")",%ZISNP=%ZISNP+1 D SCAN S %ZISNP=%ZISNP-1
    75  Q
     57PAREN S %ZISYY=%ZISYY_"(",ZISEND=")",%ZISNP=%ZISNP+1 D SCAN S %ZISNP=%ZISNP-1 Q
    7658SCAN F %ZISI=0:0 S ZISXL=ZISXL+1,ZISCH=$E(%ZISXX,ZISXL) D S1 Q:ZISXL'<ZISXLN!(ZISEND=ZISCH&(%ZISNP))
    7759 Q
     
    7961 I ZISCH="$" D DOLR Q
    8062 I ZISCH="(" D PAREN Q
    81  S %ZISYY=%ZISYY_ZISCH
    82  Q
     63 S %ZISYY=%ZISYY_ZISCH Q
    8364 ;
    8465S2 ;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
     1ZOSFONT ;SFISC/AC - SETS UP ^%ZOSF FOR Open M for NT ;09/29/98  08:26
     2 ;;8.0;KERNEL;**34,104**;JUL 03, 1995
    43 S %Y=1 K ^%ZOSF("MASTER"),^%ZOSF("SIGNOFF")
    5  N ZO 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)
    65 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  ;
     6MGR 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
     7PROD 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
     8VOL 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
    129OS S $P(^%ZOSF("OS"),"^",1)="OpenM-NT" S:'$P(^%ZOSF("OS"),"^",2) $P(^%ZOSF("OS"),"^",2)=18
    13  ;For Cache 5.1 and above
    14  I $$VERSION^ZOSVONT>5 S ^%ZOSF("GSEL")="K ^CacheTempJ($J),^UTILITY($J) D ^%SYS.GSET M ^UTILITY($J)=CacheTempJ($J)"
    1510 W !!,"ALL SET UP",!! Q
    1611Z ;;
     
    2217 ;;U $I:("":"+B")
    2318 ;;DEL
    24  ;;X "ZR  ZS @X"
     19 ;;X "ZR  ZS @X" K ^UTILITY("ROU",X)
    2520 ;;EOFF
    2621 ;;U $I:("":"+S")
     
    3530 ;;GD
    3631 ;;D ^%GD
    37  ;;GSEL;Select Globals
    38  ;;K ^UTILITY($J) D ^%GSET
    3932 ;;JOBPARAM
    4033 ;;D JOBPAR^%ZOSV
     
    4235 ;;U IO:("":"+S+I-T":$C(13,27))
    4336 ;;LOAD
    44  ;;N %,%N S %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)"")=%"
    4538 ;;LPC
    4639 ;;S Y=$ZC(X)
     
    7265 ;;D @($S(X>7:"NORMAL",X>3:"NORMAL",1:"LOW")_"^%PRIO") ;Don't do HIGH
    7366 ;;PROGMODE
    74  ;;S Y=$ZJOB#2
     67 ;;S Y=$ZJ#2
    7568 ;;PROD
    7669 ;;VAH
     
    7871 ;;D ^%RD
    7972 ;;RESJOB
    80  ;;N OLD S OLD=$ZNSPACE ZNSPACE "%SYS" D ^RESJOB ZNSPACE OLD Q
     73 ;;Q:'$D(DUZ)  Q:'$D(^XUSEC("XUMGR",+DUZ))  N XQZ S XQZ="^RESJOB[MGR]" D DO^%XUCI
    8174 ;;RM
    82  ;;I $G(IOT)["TRM" U $I:X
     75 ;;U $I:X
    8376 ;;RSEL;;ROUTINE SELECT
    8477 ;;K ^UTILITY($J) D KERNEL^%RSET K %ST ;Special entry point for VA
    8578 ;;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
    8980 ;;SS
    9081 ;;D ^%SS
    9182 ;;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
    9384 ;;SIZE
    9485 ;;S Y=0 F I=1:1 S %=$T(+I) Q:%=""  S Y=Y+$L(%)+2
     
    9788 ;;TMK;;MAGTAPE MARK
    9889 ;;S Y=$ZA\4#2
    99  ;;TRAP;;S X="^%ET",@^%ZOSF("TRAP"); User $ETRAP
     90 ;;TRAP;;S X="^%ET",@^%ZOSF("TRAP") TO SET ERROR TRAP
    10091 ;;$ZT=X
    10192 ;;TRMOFF
     
    10394 ;;TRMON
    10495 ;;U $I:("":"+I+T")
    105  ;;TRMRD;;old Y=$A($ZB),Y=$S(Y<32:Y,Y=127:Y,1:0)
     96 ;;TRMRD
    10697 ;;S Y=$A($ZB),Y=$S(Y<32:Y,Y=127:Y,1:0)
    10798 ;;TYPE-AHEAD
     
    117108 ;;VOL;;VOLUME SET NAME
    118109 ;;ROU
    119  ;;ZD;;$H to external
     110 ;;ZD
    120111 ;;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  
    11%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.
    320 Q
    421 ;SAVE: DIE open array reference.
     
    2542 S $ETRAP="S $ECODE="""" Q"
    2643 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"
    2946 I $L($ZSEARCH(%DIR_RN_".o",244)) ZSYSTEM "rm -f "_%DIR_X_".o"
    3047 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
    43ACTJ() ;# Active jobs
    54 N %,V,Y S V=$$VERSION()
     
    1413 ;maxpid: from %SS
    1514 I V<5 D  Q AVJ
    16  . N PORT,T,X,MAXPID,LMFLIM
    17  . 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 info
     15 . 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
    1918 . ;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 total
    22  . S AVJ=$S(T<MAXPID:X,1:MAXPID-$$ACTJ) ;Return the smaller of license or pid
     19 . 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
    2322 ;To get available jobs from Cache 5.0 up
    2423 I V'<5 D  Q AVJ
     
    3938 ;
    4039GETPEER() ;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=""
    4241 I $$OS="VMS" S PEER=$ZF("TRNLNM","VISTA$IP")
    4342 I '$L(PEER) S PEER=$ZU(111,0) S:$L(PEER) PEER=$A(PEER,1)_"."_$A(PEER,2)_"."_$A(PEER,3)_"."_$A(PEER,4)
     
    4544 ;
    4645SHARELIC(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 Q
    5046 ;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=""
    5453 Q
    55  ;
    5654JOBPAR ;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  Q
     55 N ZJ S Y="",$ZT="JOBX"
     56 Q:'$D(^$JOB(X)) S Y=$V(-1,X),Y=$P(Y,"^",14)_","_^%ZOSF("VOL")
     57JOBX Q
    6058 ;
    6159NOLOG ;4096 is switch 12 - sign on inhibited.
     
    6361 ;
    6462PROGMODE() ;Check if in PROG mode
    65  Q $ZJOB#2
     63 Q $ZJ#2
    6664 ;
    6765PRGMODE ;
     
    7270 D UCI S XUCI=Y,XQZ="PRGM^ZUA[MGR]",XUSLNT=1 D DO^%XUCI D ^%PMODE U $I:(:"+B+C+R") S $ZT="" Q
    7371 Q
    74 LGR() ;Last Global ref.
    75  N $ET,NL S NL="",$ET="S $EC=NL Q NL"
    76  Q $ZR
     72LGR() S $ZT="LGRX^%ZOSV"
     73 Q $ZR ;Last Global ref.
     74LGRX Q ""
    7775 ;
    78 EC() ;Error code
    79  Q $ZE
     76EC() Q $ZE ;Error code
    8077 ;
    8178DOLRO ;SAVE ENTIRE SYMBOL TABLE IN LOCATION SPECIFIED BY X
     
    9592 Q
    9693 ;
    97 PARSIZ ;Old and not used.
     94PARSIZ ;
    9895 S X=3
    9996 Q
    10097 ;
    101 DEVOPN ;List of Devices opened, Not used
     98DEVOPN ;List of Devices opened
    10299 ;Returns variable Y. Y=Devices owned separated by a comma
    103100 Q
    104  ;
    105101DEVOK ;
    106102 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
     
    122118 ;
    123119OS() ;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")
    125121 ;
    126122SETNM(X) ;Set name, Fall into SETENV
     
    131127 ;
    132128SID() ;System ID Ver 1
    133  N %1,%2,%3,%4,%5,T S T="~"
     129 N %1,%2,%3,T S T="~"
    134130 S %1=$ZU(5) ;namespace
    135131 S %2=$ZU(12,"") ;directory
    136132 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)
    139133 S %3=%1_T_%2 ;namespace~directory
    140134 Q "1~"_%3
     
    142136PRI() ;Check if a mixed OS enviroment.
    143137 ;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.
    145139 N % S %=1
    146140 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
    147142 Q %
    148143 ;
     
    162157 Q 1
    163158 ;
    164 T0 ; start RT clock, obsolete
     159T0 ; start RT clock
    165160 ;S XRT0=$H
    166161 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:15
    2  ;;8.0;KERNEL;**440**;JUL 10, 1995;Build 13
    3  ;Per VHA Directive 2004-038, this routine should not be modified
    4  ;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 ;
    55INPUT ;check input parameters for error conditions
    6  N %,$ES,$ET,%ZTVOL,ZTREC,ZTD,ZT1,ZT2,ZT3
    76 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
    98 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")
    1110 S %ZTVOL=^%ZOSF("VOL")
    1211 I $D(ZTCPU)[0 S ZTCPU=%ZTVOL
     
    1514 ;
    1615HERE ;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
    2119 I ZTD]"",$D(^%ZTSCH(ZTD,ZTSK))#2 S ZTSK(0)=1 G QUIT
    2220 I ZTD]"",$D(^%ZTSCH("JOB",ZTD,ZTSK))#2 S ZTSK(0)=1 G QUIT
    2321 ;
    24  S ZT1="" F S ZT1=$O(^%ZTSCH(ZT1)) Q:'ZT1  I $D(^(ZT1,ZTSK))#2 S ZTSK(0)=1 G QUIT
    25  S ZT1="IO",ZT2="" F  S ZT2=$O(^%ZTSCH(ZT1,ZT2)),ZT3="" Q:ZT2=""  F S ZT3=$O(^%ZTSCH(ZT1,ZT2,ZT3)) Q:ZT3=""  I $D(^(ZT3,ZTSK))#2 S ZTSK(0)=1 G QUIT
    26  S ZT1="JOB",ZT2="" F S ZT2=$O(^%ZTSCH(ZT1,ZT2)) Q:ZT2=""  I $D(^(ZT2,ZTSK))#2 S ZTSK(0)=1 G QUIT
    27  S ZT1="LINK",ZT2="" F  S ZT2=$O(^%ZTSCH(ZT1,ZT2)),ZT3="" Q:ZT2=""  F S ZT3=$O(^%ZTSCH(ZT1,ZT2,ZT3)) Q:ZT3=""  I $D(^(ZT3,ZTSK))#2 S ZTSK(0)=1 G QUIT
     22 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
    2826 S ZTSK(0)=0
    2927 ;
    3028QUIT ;cleanup and quit
    31  L:ZTSK -^%ZTSK(ZTSK) ;K %ZTCPU,%ZTM,%ZTM1,%ZTM2,%ZTMAST,%ZTVOL,X,Y,ZT,ZT1,ZT2,ZT3,ZTCPU,ZTD,ZTREC
     29 L:ZTSK -^%ZTSK(ZTSK) K %ZTCPU,%ZTM,%ZTM1,%ZTM2,%ZTMAST,%ZTVOL,X,Y,ZT,ZT1,ZT2,ZT3,ZTCPU,ZTD,ZTREC
    3230 I ZTSK(0)]"" K ZTSK("E") Q
    3331 I ZTSK("E")'="U" Q
     
    3634 ;
    3735THERE ;rest of code looks up task's status on some other volume set
    38  N %ZTCPU,%ZTM,X,Y
    3936 ;
    4037FILES ;find TaskMan files on the volume set to be searched
     
    4845SEARCH ;find out if task is queued on that volume set
    4946 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
    5249 I ZTD]"",$D(^[X,Y]%ZTSCH(ZTD,ZTSK))#2 S ZTSK(0)=1 G QUIT
    5350 I ZTD]"",$D(^[X,Y]%ZTSCH("JOB",ZTD,ZTSK))#2 S ZTSK(0)=1 G QUIT
    5451 ;
    55  S ZT1="" F S ZT1=$O(^[X,Y]%ZTSCH(ZT1)) Q:'ZT1  I $D(^(ZT1,ZTSK))#2 S ZTSK(0)=1 G QUIT
    56  S ZT1="IO",ZT2="" F  S ZT2=$O(^[X,Y]%ZTSCH(ZT1,ZT2)),ZT3="" Q:ZT2=""  F S ZT3=$O(^[X,Y]%ZTSCH(ZT1,ZT2,ZT3)) Q:ZT3=""  I $D(^(ZT3,ZTSK))#2 S ZTSK(0)=1 G QUIT
    57  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 QUIT
    58  S ZT1="LINK",ZT2="" F  S ZT2=$O(^[X,Y]%ZTSCH(ZT1,ZT2)),ZT3="" Q:ZT2=""  F S ZT3=$O(^[X,Y]%ZTSCH(ZT1,ZT2,ZT3)) Q:ZT3=""  I $D(^(ZT3,ZTSK))#2 S ZTSK(0)=1 G QUIT
     52 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
    5956 S ZTSK(0)=0 G QUIT
    6057 ;
  • 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/2006
     1ZTMGRSET ;SF/RWF,PUG/TOAD - SET UP THE MGR ACCOUNT FOR THE SYSTEM ;6:53 PM  24 Jan 2008
    22 ;;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.
    311 ;
    412 N %D,%S,I,OSMAX,U,X,X1,X2,Y,Z1,Z2,ZTOS,ZTMODE,SCR
     
    165173 ;
    166174R() ; routine directory for GT.M
    167  Q d(1) ;
     175 ;Q d(1) ;WVEHR/SO Commented out
    168176 I ZTOS=7 Q $P($ZRO,",")
    169177 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
    43 N %ZISOS,%ZISV
    54 S U="^",%ZISOS=$G(^%ZOSF("OS")),%ZISV=$G(^%ZOSF("VOL"))
     
    98 I '$D(%ZIS),$D(%IS) M %ZIS=%IS
    109 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^%ZOSV
    12  S %ZIS("PRI")=$G(^XUTL("XQ",$J,"MIXED OS"),1)
    1310 ;
    1411 I $D(ZTQUEUED) D  I '$D(IOP) S POP=1 G EXIT^%ZIS1
    1512 .I $D(ZTIO)#2,ZTIO="" S:%IS'[0 %IS=%IS_"0",%ZIS=%ZIS_"0"
    1613 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,%Z2,%Z9,%Z90,%Z91,%Z95,%ZISB,%ZTIME,%ZTYPE
     14 N %,%A,%E,%H,%I,%X,%XX,%Y,%Z,%Z1,%Z9,%Z90,%Z91,%Z95,%ZISB,%ZTIME,%ZTYPE
    1815 N %ZHFN,%ZISOLD,DTOUT,DUOUT
    1916 ;Save symbols to restore if don't open a device
     
    3431 S %=$$LINEPORT^%ZISUTL I % S (%E,%H)=% Q
    3532 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!",*7
     33 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
    3734 S %H=%E S:'%H&(%IS'[0) POP=1 S:(%H>0)&('$D(IO("HOME"))) IO("HOME")=%H_"^"_$I
    3835 Q
     
    6360 ;IO("Q") is checked by many routines after a call to ^%ZISC, so only clean on call to %ZIS.
    6461CLEAN ;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)
    6763 S (IOPAR,IOUPAR)=""
    6864 Q
     
    7066RESETVAR ;Reset home IO* variables.
    7167 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)=""
    7670 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,%)=@%
     71SAVEVAR ;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,%)=@%
    8173 Q
    8274ZISLPC 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
    43MAIN ;Called from %ZIS with a GO
    54 I '$D(IOP),$D(^%ZIS(1,%E,0)),'$P(^(0),"^",3) S %A=%H,%Z=^(0) D L2^%ZIS2 G EXIT
     
    76 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
    87 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 EXIT
     8 I %IS'["Q",$D(XQNOGO) S POP=1 W:'$D(IOP) !,*7,"OUTPUT IS NEVER ALLOWED FOR THIS OPTION" G EXIT
    109 D IOP:$D(IOP),R:'$D(IOP)
    1110 G EXIT:$D(DTOUT)!$D(DUOUT)!(POP&$D(IOP)),L1:POP&'$D(IOP)
    1211 D LKUP I %A'>0 S POP=1 D:'$D(DUOUT) MSG1 K DUOUT
     12 I POP G EXIT:$D(IOP),L1:'$D(IOP)
    1313 I '$D(^%ZIS(1,%A,0)) D MSG1 K %ZISIOS S POP=1
    1414 I POP G EXIT:$D(IOP),L1:'$D(IOP)
     
    1616 I $D(%ZIS("S")) N Y S Y=%E D XS^ZISX S:'$T POP=1 G G:POP
    1717 W:'$D(IOP)&($P(%Z,"^",2)'=$I)&($P(%Z1,"^")]"") "  ",$P(%Z1,"^")
    18  D L2^%ZIS2 ;Call
     18 D L2^%ZIS2
    1919G 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
    2022 ;
    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
     23EXIT I $D(IO)#2,IO]"",$D(IO(1,IO))#2,$D(%Z1),$P(%Z1,"^",11) S IO(1,IO,"NOFF")=1
    2524 ;Do count of number of times device opened.  Field 51.
    26  I $L($G(IO)),$D(IO(1,IO))#2,$G(%ZISIOS) D
     25 I $L($G(IO)),$D(IO(1,IO))#2,'POP,$G(%ZISIOS) D
    2726 . 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
    3228 I %IS'[0,$G(IO(0))]"" U IO(0) ;Make sure return with home active
    3329 G SETVAR:'POP!(%IS["T"),KILVAR
     
    3733 S %IS=%IS_%X K IOP W %X D SETQ Q
    3834 ;Get ready to ask user for device
    39 R I %IS["Q",$D(XQNOGO) W !,$C(7),"AT THIS TIME, OUTPUT MUST BE QUEUED"
     35R I %IS["Q",$D(XQNOGO) W !,*7,"AT THIS TIME, OUTPUT MUST BE QUEUED"
    4036 S %A=$S($D(%IS("B")):%IS("B"),1:"HOME") ;Setup default
    4137 I %IS["P",%A="HOME",$D(^%ZIS(1,%E,99)),$D(^%ZIS(1,+^(99),0)) S %A=$P(^(0),"^",1)
     
    6056 I %X'=%ZISVT S %ZISVT=%X D VTLKUP^%ZIS S %A=%E Q:%A>0  ;uppercase lookup
    6157 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 Q
     58SBR K DFOUT,DTOUT,DUOUT R %X:$S($D(DTIME)#2:DTIME,1:300) E  W *7 S DTOUT=1 Q
    6359 S:%X="."!(%X="^") DUOUT=1,%X="" Q
    6460LC S %X=$$UP(%X)
     
    6662LOW(%) Q $TR(%,"ABCDEFGHIJKLMNOPQRSTUVWXYZ","abcdefghijklmnopqrstuvwxyz")
    6763UP(%) 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)
     64YN W "? ",$P("YES// ^NO// ",U,%)
     65RYN R %X:$S($D(DTIME):DTIME,$D(%ZISDTIM):%ZISDTIM,1:300) E  S DTOUT=1,%X=U W *7
    7266 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
     69MSG1 I '$D(IOP) W ?20,*7,"  [DEVICE DOES NOT EXIST]"
    7770 Q
    7871SETVAR ;Come here to setup the variables for the selected device
     
    8477 S IOT=%ZTYPE,IOST(0)=%ZISIOST(0),IOST=%ZISIOST,IOPAR=%ZISOPAR,IOUPAR=%ZISUPAR,IOHG=%ZISHG
    8578 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
    8880 ;
    8981KILVAR ;Come here to restore the calling variables
     
    9789 S:%IS["T" IO("T")=1 K %ZIS,%IS,%A,%E,%H,%ZISOS,%ZISV,IOP
    9890K2 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
    10293 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
    43HUNT S:'$D(%ZISHP) %ZISHP=%E,%ZISHGL=0 S %E=0
    54 F  S %ZISHGL=$O(^%ZIS(1,%ZISHG(0),"HG",%ZISHGL)) Q:%ZISHGL'>0  D  Q:%E
     
    1211L2 ;Entry point from %ZIS1
    1312 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
     13CHECK 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
    1915 I $P(%Z,"^",12)=2 S %IS=$TR(%IS,"Q") I $D(IO("Q")) D  Q
    2016 . 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)
    64 I $D(%ZISQUIT) S POP=1 K %ZISQUIT
    75 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 ;
     10Q I $D(%ZISUOUT) K %ZISUOUT,%ZISHP,%ZISHPOP Q
    1811 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
    2214VTRM ;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
     15TRM 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"))
    2818 G Q
    29 DEVOK N X,Y,X1 ;Not sure this is needed
     19DEVOK N X,Y,X1
    3020 S X=IO,X1=%ZTYPE
    3121 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]" Q
    33  I Y=-1 S IO="",POP=1 W:'$D(IOP)&('$D(ZISHG(0))!(%IS["D")) !,$C(7),"[Device does not Exist or Unavailable]" Q
     22 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
    3424 Q
    3525 ;
     
    4939 S POP=1 I %ZISB&(%ZTYPE["TRM")&(IO'=IO(0)) C IO K IO(1,IO) Q
    5040 Q
    51 SETPAR S:$L(%ZISOPAR)&($E(%ZISOPAR)'="(") %ZISOPAR="("_%ZISOPAR_")"
     41SETPAR S:%ZISOPAR]""&($A(%ZISOPAR)-40) %ZISOPAR="("_%ZISOPAR_")"
    5242 Q
    53 AQUE ;Ask about Queueing
    54  W ! S %=$S($D(IO("Q")):1,1:2),U="^",%ZISDTIM=60
     43AQUE W ! S %=$S($D(IO("Q")):1,1:2),U="^",%ZISDTIM=60
    5544 I $D(IO("Q")) W !,"Previously, you have selected queueing."
    5645 W !,"Do you "_$S($D(IO("Q")):"STILL ",1:"")_"want your output QUEUED"
     
    5847 I %=-1 S POP=1,%ZISHPOP=1,%ZISUOUT=1 C IO K IO(1,IO) Q
    5948 I %=1 S IO("Q")=1 C IO K IO(1,IO) Q
    60  ;I %=2 K IO("Q")
    6149 Q
    6250ST(%ZISTP) ;
     
    8169 S:IOST="" IOST="P-OTHER",IOST(0)=0
    8270 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:08
    2  ;;8.0;KERNEL;**275,425,440**;Jul 10, 1995;Build 13
    3  ;Per VHA Directive 2004-038, this routine should not be modified
     1%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 ;
    44OPEN ;From %ZIS3 for TRM
    55 G OPN2:$D(IO(1,IO))
     
    1313 Q
    1414 ;Why no open paraneters???
    15 OP1 N $ET S $ET="G OPNERR^%ZIS4"
    16  I $D(%ZISLOCK) L +@%ZISLOCK:5 E  S POP=1 Q
    17  O IO::%ZISTO S:$T IO(1,IO)="" S:'$T POP=1
     15OP1 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
    1818 Q
    1919OPNERR ;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
    2221 ;
    23 O ;From %ZIS6 for all types.
     22O ;From %ZIS6 for other types.
    2423 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
     24LCKGBL ;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
    2627OPAR I $D(IOP),%ZTYPE="HFS",$D(%IS("HFSIO")),$D(%IS("IOPAR")),%IS("HFSIO")]"" S IO=%IS("HFSIO"),%ZISOPAR=%IS("IOPAR")
    2728 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)
    2930 N % S %(IO)="",%=$P($P($NA(%(IO)),"(",2),")")
    3031 S %A=%_$E(":",%A]"")_%A
     
    3940 ;
    4041O1 N $ES,$ET S $ET="G OPNERR^%ZIS4"
    41  I $D(%ZISLOCK) L +@%ZISLOCK:5 E  S POP=1 Q
    42  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
    4344 S IO("ERROR")="" Q
    4445 ;
     
    5354 Q
    5455 ;
    55 TCPIP ;For TCP/IP devices, should use ^%ZISTCP
     56TCPIP ;For TCP/IP devices
    5657 N %S
    5758 S %ZISTO=$G(%ZISTO,3)
     
    6667 I $D(ZISDA) W:'$D(IOP) !?5,*7,"You may not Spool the printing of a Spool document" G N
    6768 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
     69R 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
    7171 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)=""
    7272DOC S IO=%ZFN,IO("SPOOL")=%ZDA,^XUTL("XQ",$J,"SPOOL")=%ZDA,IOF="#"
     
    7474OK K %ZDA,%ZFN Q
    7575N 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
     76SPL2 O %ZFN:(NEWVERSION:WORLD=RWD) G:$ZA<0 SPL4 S IO(1,%ZFN)="" Q
     77SPL3 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
    8279SPL4 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<%
     80CLOSE 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
     84SPLEOF I $ZE'["ENDO" Q  ;Send error up
    9185SPLEX C %ZFN:(DELETE) K:%ZFN]"" IO(1,%ZFN) D CLOSE^ZISPL1 K %Y,%X,%1,%ZFN Q
    9286 ;
  • 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
    43 ;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
     4OXECUTE I $D(^%ZIS(2,%ZISIOST(0),2))=1 S %Y=^(2) D 2
     5ANSBAK 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
    96 I $D(%ZISMTR) X ^%ZOSF("MAGTAPE") U IO W:$D(%MT("REW")) @%MT("REW") U IO(0) K %MT
    107 G QUIT:'$D(IO("P"))
     
    6360HG ;
    6461 Q
    65 SPL ;Spool type
    66  N %E,%Z D MARGN^%ZIS3 W:'$D(IOP) ! D SPOOL^%ZIS4:%IS'["T"
     62SPL N %E,%Z D MARGN^%ZIS3 W:'$D(IOP) ! D SPOOL^%ZIS4:%IS'["T" ;Spool type
    6763 G Q
    6864MT D MARGN^%ZIS3,ASKPAR,AMTREW:'POP&'$D(IOP)&%ZISB W:'$D(IOP) ! D O^%ZIS4:'POP&(%ZISB&(%IS'["T")) ;Magtape type
    6965 G Q
    70 SDP ;Sequential disk processor type
    71  D MARGN^%ZIS3,ASKPAR W:'$D(IOP) ! D O^%ZIS4:'POP&(%ZISB&(%IS'["T"))
     66SDP D MARGN^%ZIS3,ASKPAR W:'$D(IOP) ! D O^%ZIS4:'POP&(%ZISB&(%IS'["T")) ;Sequential disk processor type
    7267 G Q
    73 HFS ;Host File Server type
    74  D MARGN^%ZIS3,HFS^%ZIS4 W:'$D(IOP) ! D O^%ZIS4:'POP&(%ZISB&(%IS'["T"))
     68HFS D MARGN^%ZIS3,HFS^%ZIS4 W:'$D(IOP) ! D O^%ZIS4:'POP&(%ZISB&(%IS'["T")) ;Host File Server type
    7569 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
     70RES G Q:%IS["T" N X,X1 I %IS'["R"!'$D(IOP) S POP=1 W:'$D(IOP) *7,"  [NOT AVAILABLE]" Q  ;Resources
    7871 G Q:$D(IO(1,IO)) I %IS["T" S X=IO,X1="RES" D DEVOK^%ZIS3 S:Y POP=1 G Q:POP
    7972 D:%ZISB RES1 G Q
     
    8477IMPC ;Imaging Work Station
    8578BAR ;Bar Code
    86 OTH ;Other Device type
    87  D MARGN^%ZIS3:'POP,ASKPAR:'POP W:'$D(IOP) ! D O^%ZIS4:'POP&(%ZISB&(%IS'["T"))
     79OTH D MARGN^%ZIS3:'POP,ASKPAR:'POP W:'$D(IOP) ! D O^%ZIS4:'POP&(%ZISB&(%IS'["T")) ;Other Device type
    8880 G Q
    8981 ;
    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
     82ASKPAR 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
    9283 I POP,%ZISB&(%ZTYPE["TRM") C IO K IO(1,IO) Q
    9384 Q:POP  G SETPAR^%ZIS3
     85AMTREW 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
     87MSG1 W !?5,"Enter the desired parameters needed to open the selected device.",!?25 Q
    9488 ;
    95 AMTREW ;Mag Tape Rewind
    96  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
    97  S:%=1 %ZISMTR=1
    98  Q
    99 MSG1 W !?5,"Enter the desired parameters needed to open the selected device.",!?25
    100  Q
    101  ;
  • 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
    43C0 ;
    54 N %,%E,%H,%ZISI,%ZISOS,%ZISX,%ZISV
     
    4241 . U:$S($D(ZTQUEUED):0,'$L($G(IO(0))):0,$D(IO(1,IO(0)))#2:1,1:0) IO(0)
    4342 . 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)
    4643 ;
     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.
    4748 I $D(IO("SPOOL")) D CLOSE^%ZIS4 ;Special close for spool device
    4849 ;
  • 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
     3VALID D L K %ZISI,%ZISNP,ZISCH,ZISEND,ZISNUM,ZISQ,ZISXL,ZISXLN Q
     4 ;
     5SET2 S %ZISFN="" F %ZISZ=0:0 S %ZISFN=$O(%ZISZ(%ZISFN)) Q:%ZISFN=""  I $D(%ZISZ(%ZISFN))#2 S %ZISXX=%ZISZ(%ZISFN) D INDCK
    76 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=""
     7INDCK S %ZISY=""
    148 I "IOEFLD^IOSTBM"[%ZISFN S @%ZISFN=%ZISXX Q
    159 I %ZISXX]"" S @("%ZISY="_%ZISXX)
     
    1812 E  S @("IO"_$E(%ZISFN,1,6))=%ZISY
    1913 Q:'$D(%ZIS)#2  Q:%ZIS'["I"  Q:'$D(%ZISZ(%ZISFN,1))
    20  ;
    21 SRAY ;
    22  S %=%ZISY,%ZISY=$A($E(%ZISY,1))
     14SRAY S %=%ZISY,%ZISY=$A($E(%ZISY,1))
    2315 F %1=2:1:$L(%) S %ZISY=%ZISY_$S($A(%,%1)<32:$A(%,%1),$A(%,%1)=127:127,1:$E(%,%1))
    2416 S IOIS(%ZISY)=%ZISFN
    2517 Q
    2618CHECK ;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
    2920 Q
    3021CHECK1 ;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 ;p440
    3222 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
    3424 Q
    3525FORM ;Entry point called from input transforms of fields in DEV/TT files.
    3626 Q:$L(X,"_")'>1
    37  N %ZISSI,%ZISSY ;p440
    3827 ;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
    3928 S %ZISSY=""
    4029 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
    4231 Q
    4332 ;
    4433L 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'<ZISXLN
     34 S (ZISXL)=0,%ZISYY="" F %ZISI=0:0 S ZISXL=ZISXL+1 S ZISCH=$E(%ZISXX,ZISXL) D L1 Q:ZISXL'<ZISXLN
    4635 ;I $L(%ZISYY,"$C(")>2,%ZISYY[")_$C(" S %ZISXX=%ZISYY D L2,L3 S %ZISYY=%ZISXX Q
    4736 S %ZISXX=%ZISYY D L2,L3 S %ZISYY=%ZISXX
     
    5241 I ZISCH="*" D STAR Q
    5342 I ZISCH="(" D PAREN Q
    54  S %ZISYY=%ZISYY_ZISCH
     43 S %ZISYY=%ZISYY_ZISCH Q
     44L2 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
    5545 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)_")"
     46L3 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)_")"
    6347 Q
    6448STAR ;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
     
    6751QUOTE 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
    6852 Q
    69 DOLR ;Looking for $C.
     53DOLR ;LOOKING FOR $C.
    7054 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
    7356 Q
    74 PAREN S %ZISYY=%ZISYY_"(",ZISEND=")",%ZISNP=%ZISNP+1 D SCAN S %ZISNP=%ZISNP-1
    75  Q
     57PAREN S %ZISYY=%ZISYY_"(",ZISEND=")",%ZISNP=%ZISNP+1 D SCAN S %ZISNP=%ZISNP-1 Q
    7658SCAN F %ZISI=0:0 S ZISXL=ZISXL+1,ZISCH=$E(%ZISXX,ZISXL) D S1 Q:ZISXL'<ZISXLN!(ZISEND=ZISCH&(%ZISNP))
    7759 Q
     
    7961 I ZISCH="$" D DOLR Q
    8062 I ZISCH="(" D PAREN Q
    81  S %ZISYY=%ZISYY_ZISCH
    82  Q
     63 S %ZISYY=%ZISYY_ZISCH Q
    8364 ;
    8465S2 ;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  
    11%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.
    320 Q
    421 ;SAVE: DIE open array reference.
     
    2542 S $ETRAP="S $ECODE="""" Q"
    2643 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"
    2946 I $L($ZSEARCH(%DIR_RN_".o",244)) ZSYSTEM "rm -f "_%DIR_X_".o"
    3047 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:15
    2  ;;8.0;KERNEL;**440**;JUL 10, 1995;Build 13
    3  ;Per VHA Directive 2004-038, this routine should not be modified
    4  ;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 ;
    55INPUT ;check input parameters for error conditions
    6  N %,$ES,$ET,%ZTVOL,ZTREC,ZTD,ZT1,ZT2,ZT3
    76 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
    98 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")
    1110 S %ZTVOL=^%ZOSF("VOL")
    1211 I $D(ZTCPU)[0 S ZTCPU=%ZTVOL
     
    1514 ;
    1615HERE ;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
    2119 I ZTD]"",$D(^%ZTSCH(ZTD,ZTSK))#2 S ZTSK(0)=1 G QUIT
    2220 I ZTD]"",$D(^%ZTSCH("JOB",ZTD,ZTSK))#2 S ZTSK(0)=1 G QUIT
    2321 ;
    24  S ZT1="" F S ZT1=$O(^%ZTSCH(ZT1)) Q:'ZT1  I $D(^(ZT1,ZTSK))#2 S ZTSK(0)=1 G QUIT
    25  S ZT1="IO",ZT2="" F  S ZT2=$O(^%ZTSCH(ZT1,ZT2)),ZT3="" Q:ZT2=""  F S ZT3=$O(^%ZTSCH(ZT1,ZT2,ZT3)) Q:ZT3=""  I $D(^(ZT3,ZTSK))#2 S ZTSK(0)=1 G QUIT
    26  S ZT1="JOB",ZT2="" F S ZT2=$O(^%ZTSCH(ZT1,ZT2)) Q:ZT2=""  I $D(^(ZT2,ZTSK))#2 S ZTSK(0)=1 G QUIT
    27  S ZT1="LINK",ZT2="" F  S ZT2=$O(^%ZTSCH(ZT1,ZT2)),ZT3="" Q:ZT2=""  F S ZT3=$O(^%ZTSCH(ZT1,ZT2,ZT3)) Q:ZT3=""  I $D(^(ZT3,ZTSK))#2 S ZTSK(0)=1 G QUIT
     22 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
    2826 S ZTSK(0)=0
    2927 ;
    3028QUIT ;cleanup and quit
    31  L:ZTSK -^%ZTSK(ZTSK) ;K %ZTCPU,%ZTM,%ZTM1,%ZTM2,%ZTMAST,%ZTVOL,X,Y,ZT,ZT1,ZT2,ZT3,ZTCPU,ZTD,ZTREC
     29 L:ZTSK -^%ZTSK(ZTSK) K %ZTCPU,%ZTM,%ZTM1,%ZTM2,%ZTMAST,%ZTVOL,X,Y,ZT,ZT1,ZT2,ZT3,ZTCPU,ZTD,ZTREC
    3230 I ZTSK(0)]"" K ZTSK("E") Q
    3331 I ZTSK("E")'="U" Q
     
    3634 ;
    3735THERE ;rest of code looks up task's status on some other volume set
    38  N %ZTCPU,%ZTM,X,Y
    3936 ;
    4037FILES ;find TaskMan files on the volume set to be searched
     
    4845SEARCH ;find out if task is queued on that volume set
    4946 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
    5249 I ZTD]"",$D(^[X,Y]%ZTSCH(ZTD,ZTSK))#2 S ZTSK(0)=1 G QUIT
    5350 I ZTD]"",$D(^[X,Y]%ZTSCH("JOB",ZTD,ZTSK))#2 S ZTSK(0)=1 G QUIT
    5451 ;
    55  S ZT1="" F S ZT1=$O(^[X,Y]%ZTSCH(ZT1)) Q:'ZT1  I $D(^(ZT1,ZTSK))#2 S ZTSK(0)=1 G QUIT
    56  S ZT1="IO",ZT2="" F  S ZT2=$O(^[X,Y]%ZTSCH(ZT1,ZT2)),ZT3="" Q:ZT2=""  F S ZT3=$O(^[X,Y]%ZTSCH(ZT1,ZT2,ZT3)) Q:ZT3=""  I $D(^(ZT3,ZTSK))#2 S ZTSK(0)=1 G QUIT
    57  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 QUIT
    58  S ZT1="LINK",ZT2="" F  S ZT2=$O(^[X,Y]%ZTSCH(ZT1,ZT2)),ZT3="" Q:ZT2=""  F S ZT3=$O(^[X,Y]%ZTSCH(ZT1,ZT2,ZT3)) Q:ZT3=""  I $D(^(ZT3,ZTSK))#2 S ZTSK(0)=1 G QUIT
     52 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
    5956 S ZTSK(0)=0 G QUIT
    6057 ;
Note: See TracChangeset for help on using the changeset viewer.