source: 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/XUS1.m@ 1569

Last change on this file since 1569 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 4.9 KB
Line 
1XUS1 ;SF-ISC/STAFF - SIGNON ;05/04/2005 15:37
2 ;;8.0;KERNEL;**9,59,111,165,150,252,265,419**;Jul 10, 1995;Build 5
3 ;User setup
4USER ;
5 K XUTEXT S XUM=$$USER^XUS1A(),$Y=0
6 ;Show post sign-on text
7 F I=0:0 S I=$O(XUTEXT(I)) Q:I'>0 D:$Y>20 W:$E(XUTEXT(I),1)="!" ! W $E(XUTEXT(I),2,999)
8 . N DIR S DIR(0)="E",DIR("A")="Enter RETURN to continue" D ^DIR W @IOF Q
9 ;if XUM=9 multi sign-on NOT allowed
10 I XUM=9 W !!,?8,$$EZBLD^DIALOG(30810.45)
11 Q:XUM ;User can't sign-on.
12SET ;
13 S Y=$$CHKDIV() I $P(Y,U,2)>0,$D(^DIC(4,0)) D ASKDIV
14 S DUZ(2)=+Y D DUZ^XUS1A
15 ;Check verify code
16 I $$VCHG D CVC^XUS2 G:$D(DUOUT) H^XUS
17 S:$P(XOPT,"^",5) XUTT=1 ;Ask Device
18 D ENQ ;Inquire to Terminal Type
19 Q
20 ;
21VCHG() ;Check if the Verify code needs to be changed
22 I $D(DUZ("ASH")) Q 0 ;rwf 403
23 D:'$D(XUSER) USER^XUS(DUZ)
24 Q:'$L($P(XUSER(1),U,2)) 1 ;Null VC
25 I $$BROKER^XWBLIB Q:$P(XUSER(0),U,8)=1 0 ;VC never expires, only for BROKER
26 Q (XUSER(1)+$P(XOPT,U,15))'>$H ;Time to change
27 ;
28ASKDIV ;Ask the user for the Division, return Y
29 N X
30 S DIC="^VA(200,DUZ,2,",DIC(0)="AEMQ",DIC("P")="200.02P",X=$O(^VA(200,DUZ,2,"AX1",1,0)) S:X>0 DIC("B")=$P($$NS^XUAF4(X),U)
31 D ^DIC I Y'>0 W !,*7,"You must select one." G ASKDIV
32 Q
33 ;
34CHKDIV(CD) ;ef,sr Check if user needs to select Division.
35 N %,%1,%2,%3,%4
36 S %=$O(^VA(200,DUZ,2,0)),%1=$O(^(%))
37 I %1,$D(CD) D
38 . S %2=0,%3=0,CD=0
39 . F S %2=$O(^VA(200,DUZ,2,%2)) Q:%2'>0 S %4=^(%2,0),%3=%3+1,CD(%3)=%2_"^"_$$NS^XUAF4(%2)_$S($P(%4,"^",2):"^1",1:"")
40 . S CD=%3
41 Q %_"^"_%1
42 ;
43ENQ ;Get terminal type
44 S XUT1="" I XUTT X XUEOFF R X:0 X ^%ZOSF("TYPE-AHEAD") W $C(27,91,99) R *X:2 I X=27 F R X#1:2 S XUT1=XUT1_X Q:'$T!(X="c")
45 I XUTT,(XUT1'["[") R X:0 S XUT1="" W *5 R *X:2 R:$T XUT1:2 S X=$S(X=6:"C-WYSE 75",1:$C(X)_XUT1),XUT1=""
46 X XUEON I XUTT,XUT1["[" S Y=$O(^%ZIS(3.22,"B",XUT1,0)) I Y>0 S X=$P($G(^%ZIS(3.22,Y,0)),"^",2)
47 I X?1.ANP S DIC="^%ZIS(2,",DIC(0)="MO" D ^DIC I Y>0 S XUIOP(1)=$P(Y,U,2),$P(XUIOP,";",2)=XUIOP(1),^VA(200,DUZ,1.2)=+Y
48 I '$D(XUIOP(1)),$D(^VA(200,DUZ,1.2)) S X=+^(1.2) I X>0,$D(^%ZIS(2,X,0)) S $P(XUIOP,";",2)=$P(^(0),U)
49 Q
50 ;
51NEXT ;Jump to the next routine
52 S IOP=XUIOP D ^%ZIS D SAVE ;Save off device/user info
53 S X=$G(^DISV(DUZ)) ;Add kill by session or day here
54 S ^DISV(DUZ)=$H
55 ;Do we need UCI jump anymore?
56 S X=%UCI,N1=XUCI I PGM["[" S X=$P(PGM,"[",2,4),PGM=$P(PGM,"[",1)
57 S:X["""" X=$P(X,"""",2) S:X?.E1"]"&(X'["[") X=$E(X,1,$L(X)-1) S XUM=14,XUM(0)=X
58 S %UCI=X I "PRODMGR"'[X,$D(^%ZOSF("UCICHECK")) X ^("UCICHECK") G NO:Y="" S:N1=Y %UCI=""
59 S XUM=15,XUM(0)=PGM G NO:PGM'?1AP.AN
60 G NO:":"_XUA_":"'[(":"_PGM_":")
61 D AUDIT
62 S X=$S($D(^VA(200,DUZ,0)):$P($P(^(0),U),","),1:"Unk"),X=$E(X,1,10)_"_"_($J#10000) D SETENV^%ZOSV
63 ;S X=$P(XOPT,U,16) X:X ^%ZOSF("PRIORITY")
64 D LOG:DUZ,KILL
65 I %UCI]"" K ^XUTL("XQ",$J) S $P(^VA(200,DUZ,1.1),U,3)=0 G GO^%XUCI
66 K ^XUTL("OR",$J),^UTILITY($J),%UCI
67 G @(U_PGM)
68 ;
69SAVE ;
70 S X="DUZ" F S X=$Q(@X) Q:X="" I $D(@X) S ^XUTL("XQ",$J,$TR(X,""""))=@X
71 F X="DUZ","IO","IO(""IP"")","IO(""CLNM"")","XQVOL" I $D(@X) S ^XUTL("XQ",$J,X)=@X
72 D SAVEVAR^%ZIS ;Save the HOME device variables
73 Q
74 ;
75LOG ;used by R/S and Broker
76 N XP1,XP2
77 S XP1=$$SLOG($P(XUVOL,U,1),,XUDEV,XUCI,$P(XUENV,U,3))
78 S %=$$COOKIE($P(^VA(200,DUZ,0),U),XP1) I $L(%) S XQXFLG("ZEBRA")=XP1_"~"_%,$P(^XUSEC(0,XP1,0),U,13)=% L +^XWB("SESSION",XQXFLG("ZEBRA")):60
79 S XP2=$G(^VA(200,DUZ,1.1)),XQXFLG("LLOG")=$P(XP2,U) ;Save for LOGIN templates
80 S $P(XP2,"^",1,3)=XP1_"^0^1",$P(XP2,U,5)="" ;Set last Sign-on
81 S ^VA(200,DUZ,1.1)=XP2
82 Q
83 ;
84 ;The other parameters are in the symbol table with known names.
85 ;P1=DUZ,P2=$I,P3=$J,P4=EXIT D/T,P5=VOLUME,P6=TASKMAN,P7=XUDEV,P8=UCI,P9=ZIO,P10=NODE,P11=IP,P12=CLNM,P13=HANDLE,P14=REMOTE SITE,P15=REMOTE IEN
86SLOG(P5,P6,P7,P8,P10,P14,P15) ;
87 N %,I,DA,DIK,XL1 S XL1=$$NOW^XLFDT
88 S P5=$G(P5),P6=$G(P6),P7=$G(P7),P8=$G(P8),P10=$G(P10)
89 F I=XL1:.00000001 L +^XUSEC(0,I):1 Q:'$D(^XUSEC(0,I)) L -^XUSEC(0,I)
90 S ^XUSEC(0,I,0)=DUZ_"^"_$I_"^"_$J_"^^"_P5_"^"_P6_"^"_P7_"^"_P8_"^"_$G(IO("ZIO"))_"^"_P10_"^"_$G(IO("IP"))_"^"_$G(IO("CLNM"))_$S($D(P14):"^^"_P14_"^"_P15,1:"")
91 L -^XUSEC(0,I)
92 S $P(^XUSEC(0,0),"^",3,4)=I_"^"_(1+$P(^XUSEC(0,0),"^",4))
93 S (XL1,DA)=I,DIK="^XUSEC(0," D IX^DIK ;index new entry
94 S ^XUTL("XQ",$J,0)=XL1 ;save for sign-off
95 Q XL1
96 ;
97COOKIE(J1,J2) ;Call VAdeamon for a cookie
98 N ZZ,%
99 I $G(XQXFLG("ZEBRA"))=-1 K XQXFLG("ZEBRA") Q "" ;Disabled
100 Q:$G(IO("IP"))="" "" ;Not using Telnet
101 ;
102 S %=$$CMD^XWBCAGNT(.ZZ,"XWB CREATE HANDLE",J1_"^"_J2) Q:'% ""
103 Q $G(ZZ(1))
104 ;
105AUDIT ;Set-up Audit info
106 N I,I1,I2
107 S I=$G(^XTV(8989.3,1,19)),I1=$P(I,U),I2=$P(I,U,2) Q:"asu"'[I1 I (I2>XUNOW)!($P(I,U,3)<XUNOW) Q
108 I "au"[I1 S:(I1="a")!($D(^XTV(8989.3,1,19.3,"B",DUZ))>1) XQAUDIT=1 Q
109 S XQAUDIT="" F I=0:0 S I=$O(^XTV(8989.3,1,19.1,"B",I)) Q:I'>0!($L(XQAUDIT)>245) S XQAUDIT=XQAUDIT_"2^"_I_U
110 S I1="" F I=0:0 S I1=$O(^XTV(8989.3,1,19.2,"B",I1)) Q:I1']""!($L(XQAUDIT)>245) S XQAUDIT=XQAUDIT_"3^"_I1_U
111 Q
112 ;
113DD(Y) Q $$FMTE^XLFDT(Y,1)
114 ;
115KILL N %UCI,PGM,U,XQUR,XMCHAN G KILL1^XUSCLEAN
116 Q
117NO G NO^XUS
Note: See TracBrowser for help on using the repository browser.