Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ABPAPI02

ABPAPI02.m

Go to the documentation of this file.
  1. ABPAPI02 ;POST INITIALIZATION TASKS - PART 2; [ 04/18/91 9:53 AM ]
  1. ;;1.4;AO PVT-INS TRACKING;*0*;IHS-OKC/KJR;JULY 25, 1991
  1. ;---------------------------------------------------------------------
  1. OPTS ;PROCEDURE TO CHECK FOR AND REMOVE UNUSED OPTIONS
  1. W !!," Checking for old, unused options..."
  1. S ABPAMENU=$O(^DIC(19,"B","ABPAMENU","")) Q:+ABPAMENU'>0
  1. Q:$D(^DIC(19,ABPAMENU,10,"B"))'=10
  1. K X S R1=0 F I=0:0 D Q:+R1=0
  1. .S R1=$O(^DIC(19,ABPAMENU,10,"B",R1)) Q:+R1=0 S X(1,R1)=""
  1. I $D(X(1))=10 S R1=0 F I=0:0 D Q:+R1=0
  1. .S R1=$O(X(1,R1)) Q:+R1=0
  1. .S R2=0 F I=0:0 D Q:+R2=0
  1. ..S R2=$O(^DIC(19,R1,10,"B",R2)) Q:+R2=0 S X(2,R2)=""
  1. I $D(X(2))=10 S R2=0 F I=0:0 D Q:+R2=0
  1. .S R2=$O(X(2,R2)) Q:+R2=0
  1. .S R3=0 F I=0:0 D Q:+R3=0
  1. ..S R3=$O(^DIC(19,R2,10,"B",R3)) Q:+R3=0 S X(3,R3)=""
  1. I $D(X(3))=10 S R3=0 F I=0:0 D Q:+R3=0
  1. .S R3=$O(X(3,R3)) Q:+R3=0
  1. .S R4=0 F I=0:0 D Q:+R4=0
  1. ..S R4=$O(^DIC(19,R3,10,"B",R4)) Q:+R4=0 S X(4,R4)=""
  1. I $D(X(4))=10 S R4=0 F I=0:0 D Q:+R4=0
  1. .S R4=$O(X(4,R4)) Q:+R4=0
  1. .S R5=0 F I=0:0 D Q:+R5=0
  1. ..S R5=$O(^DIC(19,R4,10,"B",R5)) Q:+R5=0 S X(5,R5)=""
  1. K ABPAOPT S R=0 F I=0:0 D Q:+R=0
  1. .S R=$O(X(R)) Q:+R=0
  1. .S RR=0 F I=0:0 D Q:+RR=0
  1. ..S RR=$O(X(R,RR)) Q:+RR=0 S ABPAOPT(RR)=$P(^DIC(19,RR,0),"^",2)
  1. K X,MSG S ABPAOPT(ABPAMENU)=$P(^DIC(19,ABPAMENU,0),"^",2)
  1. S ABPAR="ABPA",MSG="no problems here!"
  1. F I=0:0 D Q:$E(ABPAR,1,4)'="ABPA"
  1. .S ABPAR=$O(^DIC(19,"B",ABPAR)) Q:$E(ABPAR,1,4)'="ABPA"
  1. .Q:ABPAR["AUTO" S ABPARR=0 F J=0:0 D Q:+ABPARR=0
  1. ..S ABPARR=$O(^DIC(19,"B",ABPAR,ABPARR)) Q:+ABPARR=0
  1. ..Q:$D(^DIC(19,ABPARR,0))'=1
  1. ..I $D(ABPAOPT(ABPARR))'=1 D
  1. ...W !," Deleting the '",ABPAR,"' option." K MSG
  1. ...K DIK,DA S DIK="^DIC(19,",DA=ABPARR D ^DIK
  1. W:$D(MSG)=1 MSG K ABPAOPT
  1. Q
  1. ;---------------------------------------------------------------------
  1. LOCKS ;PROCEDURE TO CHECK VALIDITY OF THE OPTION/LOCK RELATIONSHIPS
  1. W !!," Inspecting your option/lock relationships..."
  1. K MSG S MSG="everything looks O.K.!"
  1. S ABPAR="ABPA" F I=0:0 D Q:$E(ABPAR,1,4)'="ABPA"
  1. .S ABPAR=$O(^DIC(19,"B",ABPAR)) Q:$E(ABPAR,1,4)'="ABPA"
  1. .S ABPARR=0 F J=0:0 D Q:+ABPARR=0
  1. ..S ABPARR=$O(^DIC(19,"B",ABPAR,ABPARR)) Q:+ABPARR=0
  1. ..Q:$D(^DIC(19,ABPARR,0))'=1
  1. ..S ABPALOCK="ABPAZ"_$E(ABPAR,5,99)
  1. ..I $P(^DIC(19,ABPARR,0),"^",6)]"" D
  1. ...I $P(^DIC(19,ABPARR,0),"^",6)'=ABPALOCK D
  1. ....W !," '",ABPAR,"' has the wrong lock..." K MSG
  1. ....K DIE,DA,DR S DIE="^DIC(19,",DR="3///@",DA=ABPARR D ^DIE
  1. ....W "fixed!"
  1. I $D(MSG)=1 W MSG
  1. Q