source: FOIAVistA/trunk/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XUINCON.m@ 1458

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

initial load of FOIAVistA 6/30/08 version

File size: 2.7 KB
Line 
1XUINCON ;SF/XAK - BUILDS ACCESSIBLE FILE MULTIPLE ;2/9/95 09:44
2 ;;8.0;KERNEL;;Jul 10, 1995
3 G A:'$D(^VA(200,"AFOF")) W !,"You currently have the 'AFOF' X-ref that shows you are",!,"using the accessible file."
4 W !,"If you need to re-run the conversion please kill the '^VA(200,""AFOF"")' X-ref first." Q
5A W !!,"Version 7 of the Kernel defined a new multiple-valued field"
6 W !,"in the New Person File called Accessible File. This conversion"
7 W !,"will store file access in this multiple in the following manner:"
8 W !!,"Those Users who have a FileMan Access Code (DUZ(0)) which"
9 W !,"is not null, i.e., contains some character string,"
10 W !,"will have their access string matched to the protection"
11 W !,"currently on your files. For each match between the file"
12 W !,"and the user, the file will be listed in the user's"
13 W !,"Accessible File multiple as will the type of access"
14 W !,"(dictionary, delete, laygo, read, write, audit)."
15 W !!,"NOTE: Files with no protection will NOT be assigned to any user.",!
16AGN S %=2,U="^" W !!,"Would you like to run the conversion now " D YN^DICN
17 G GO:%=1 I %=2!(%<0) W !!,"To run this conversion, D ^XUINCON." G KIL
18 W !!,"If you are uncertain about your current file protection, it would"
19 W !,"be wiser to examine them before running this."
20 W !,"If you are not on the CPU which holds the user file, it would"
21 W !,"be better to run this conversion on that CPU."
22 W !,"If you are short for time, it would be wiser to run this later."
23 G AGN
24GO W !,$H,!,"Build table." I '$D(DT) S DT=$$HTFM^XLFDT($H)\1
25 K ^TMP($J) S X="DD^DEL^LAYGO^RD^WR^$$$" K XU
26 F I=1.99:0 S I=$O(^DIC(I)) Q:I'>0 F J=1:1:6 I $D(^DIC(I,0,$P(X,U,J))),"@"'[^($P(X,U,J)) S %=^($P(X,U,J)) F K=1:1:$L(%) S ^TMP($J,$E(%,K),I,J+1)=""
27 W !,"Convert Users."
28 F I=0:0 S I=$O(^VA(200,I)) Q:I'>0 S X=$G(^(I,0)),%=$P(X,U,11) I $S(%:%'<DT,1:1),$P(X,U,3)]"",$P(X,U,4)]"" S %=$P(X,U,4) D CHECK:%'="@"
29 D DISV,XREF W !,"Done",$H
30KIL K ^TMP($J),I,J,K Q
31 ;
32CHECK ;
33 F J=1:1:$L(%) F K=0:0 S K=$O(^TMP($J,$E(%,J),K)) Q:K'>0 F L=0:0 S L=$O(^TMP($J,$E(%,J),K,L)) Q:L'>0 S $P(^VA(200,I,"FOF",K,0),U,L)=1,$P(^(0),U)=K
34 Q
35DISV ;
36 W !,"Give access from DISV file."
37 F I=.5:0 S I=$O(^DISV(I)) Q:+I'=I I $D(^VA(200,I,0)),'$P(^(0),U,11),$P(^(0),U,3)]"",$P(^(0),U,4)'="@" S X="" D D1
38 Q
39D1 ;
40 F J=0:0 S X=$O(^DISV(I,X)) Q:X="" I $E(X)=U,"(,"[$E(X,$L(X)),$L(X,",")<3,X'?1"^DD".E,X'="^DIC(",X'?1"^DOPT".E,$D(@(X_"0)")) S J=+$P(^(0),U,2) I J'<2,'$D(^VA(200,I,"FOF",J,0)) S ^(0)=J_"^^^^1^"_0 ;(J'=3)
41 Q
42XREF W !,"X-ref."
43 F I=0:0 S I=$O(^VA(200,I)) Q:I'>0 S K=0,%=0 D
44 . F J=0:0 S J=$O(^VA(200,I,"FOF",J)) Q:J'>0 S %=J,K=K+1,^VA(200,I,"FOF","B",J,J)="",^VA(200,"AFOF",J,I,J)=""
45 . S ^VA(200,I,"FOF",0)="^200.032PA^"_%_U_K
46 . Q
47 Q
48 Q
Note: See TracBrowser for help on using the repository browser.