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/XQ6B.m@ 1800

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

initial load of FOIAVistA 6/30/08 version

File size: 1.8 KB
Line 
1XQ6B ;SFISC/KLD-KEY DISTRIBUTION MUTUALLY EXCLUSION KEYS;4/05/00
2 ;;8.0;KERNEL;**147**;Jul 10, 1995
3 ;
4 Q
5UNABLE(XQIEN,XQPRSN,XQSTP) ;
6 D KEYAVAL Q:XQSTP=1
7 D UNABEXC Q:XQSTP=1
8 D UNABBLK Q:XQSTP=1
9 Q
10KEYAVAL ;Check if key available to users - Self Exclusive
11 I $D(^DIC(19.1,XQIEN,5,"B",XQIEN)) D
12 . W !!,"Key '"_$$GET1^DIQ(19.1,XQIEN,.01)_"' may not be given to any user at this time"
13 . W !,"no action taken",!
14 . S XQSTP=1
15 Q
16UNABEXC ;Key cannot be given Exclusive with Primary
17 N XQCLUDE,XQNUM,XQMKEY,XQTKEY
18 S (XQCLUDE,XQNUM,XQMKEY,XQTKEY)=""
19 F S XQCLUDE=$O(^DIC(19.1,XQIEN,5,"B",XQCLUDE)) Q:XQCLUDE="" D
20 . F S XQNUM=$O(^DIC(19.1,XQIEN,5,"B",XQCLUDE,XQNUM)) Q:XQNUM="" D
21 . . I $D(^VA(200,XQPRSN,51,XQCLUDE)) D
22 . . . S XQMKEY=$$GET1^DIQ(19.1,XQIEN,.01)
23 . . . S XQTKEY=$$GET1^DIQ(19.1,XQCLUDE,.01)
24 . . . W !!,"You are not AUTHORIZED key '"_XQMKEY_"' with EXCLUSIVE key '"_XQTKEY_"'"
25 . . . W !,"no action taken",!
26 . . . S XQSTP=1
27 Q
28UNABBLK ;No Exclusive(s) - Verify primary not exclusive with another key(s)
29 N XQKEY,XQNBR,XQMKEY,XQTKEY
30 S (XQKEY,XQNBR,XQMKEY,XQTKEY)=""
31 I $D(^DIC(19.1,XQIEN,0)) D
32 . F S XQKEY=$O(^DIC(19.1,"B",XQKEY)) Q:XQKEY="" D
33 . . F S XQNBR=$O(^DIC(19.1,"B",XQKEY,XQNBR)) Q:XQNBR="" D
34 . . . I $D(^DIC(19.1,XQNBR,5,"B",XQIEN)) D
35 . . . . I $D(^VA(200,XQPRSN,51,XQNBR)) D
36 . . . . . S XQMKEY=$$GET1^DIQ(19.1,XQIEN,.01)
37 . . . . . S XQTKEY=$$GET1^DIQ(19.1,XQNBR,.01)
38 . . . . . W !!,"You are not AUTHORIZED key '"_XQMKEY_"' with EXCLUSIVE key '"_XQTKEY_"'"
39 . . . . . W !,"no action taken",!
40 . . . . . S XQSTP=1
41 Q
42EXCLUSE ;Set primary exclusive with another key(s)
43 N DIC,DIE,DA,DR,Y
44 W !!
45 S DIC="19.1",DIC(0)="AEQZ",DIC("A")="Select Primary Allocated Key(s): "
46 D ^DIC Q:Y=-1 D
47 . W !
48 . S DIE="^DIC(19.1,",DR="5",DA=+Y
49 . D ^DIE
50 Q
Note: See TracBrowser for help on using the repository browser.