source: Scheduling/trunk/m/BSDX22.m@ 1034

Last change on this file since 1034 was 968, checked in by Sam Habiel, 14 years ago

Bumped version up to 1.41

File size: 2.8 KB
Line 
1BSDX22 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ;
2 ;;1.41;BSDX;;Sep 29, 2010
3 ;
4 ;
5DELAGID(BSDXY,BSDXIEN,BSDXIEN1) ;EP
6 ;Entry point for debugging
7 ;
8 ;D DEBUG^%Serenji("DELAGI^BSDX22(.BSDXY,BSDXIEN,BSDXIEN1)")
9 Q
10 ;
11DELAGI(BSDXY,BSDXIEN,BSDXIEN1) ;EP
12 ;Deletes entry having Access Group BSDXIEN and Access Type BSDXIEN1 the ACCESS GROUP TYPE file
13 ;Return recordset containing error message or "" if no error
14 ;Called by BSDX DELETE ACCESS GROUP ITEM
15 ;Test Line:
16 ;D DELAGI^BSDX22(.RES,99)
17 ;
18 S X="ERROR^BSDX22",@^%ZOSF("TRAP")
19 N BSDXI,DIK,DA,BSDXIEN2
20 S BSDXI=0
21 S BSDXY="^BSDXTMP("_$J_")"
22 S ^BSDXTMP($J,0)="I00020ACCESSGROUPTYPEID^T00030ERRORTEXT"_$C(30)
23 I '+BSDXIEN D ERR(0,"BSDX22: Invalid null Access Group ID") Q
24 I '+BSDXIEN1 D ERR(0,"BSDX22: Invalid null Access Type ID") Q
25 I '$D(^BSDXAGTP("AC",BSDXIEN,BSDXIEN1)) D Q
26 . D ERR(0,"BSDX22: Invalid null Access Group Type ID")
27 . Q
28 S BSDXIEN2=$O(^BSDXAGTP("AC",BSDXIEN,BSDXIEN1,0))
29 I '+BSDXIEN2 D ERR(0,"BSDX22: Invalid null Access Group Type ID") Q
30 ;
31 ;Delete entry
32 S DIK="^BSDXAGTP("
33 S DA=BSDXIEN2
34 D ^DIK
35 ;
36 S BSDXI=BSDXI+1
37 S ^BSDXTMP($J,BSDXI)=BSDXIEN2_"^"_"-1"_$C(30)_$C(31)
38 Q
39 ;
40ADDAGID(BSDXY,BSDXIEN,BSDXIEN1) ;EP
41 ;Entry point for debugging
42 ;
43 ;D DEBUG^%Serenji("ADDAGI^BSDX22(.BSDXY,BSDXIEN,BSDXIEN1)")
44 Q
45 ;
46ADDAGI(BSDXY,BSDXIEN,BSDXIEN1) ;EP
47 ;Adds ACCESS GROUP TYPE file entry having access group BSDXIEN and access type BSDXIEN1
48 ;Return recordset containing added entry number error message or "" if no error
49 ;Called by BSDX ADD ACCESS GROUP ITEM
50 ;Test Line:
51 ;D ADDAGI^BSDX22(.RES,1,1)
52 ;
53 S X="ERROR^BSDX22",@^%ZOSF("TRAP")
54 N BSDXI,BSDXIENS,BSDXMSG,BSDXFDA
55 S BSDXI=0
56 S BSDXY="^BSDXTMP("_$J_")"
57 ;S ^BSDXTMP($J,0)="I00020ACCESSGROUPTYPEID^I00020ERRORID"_$C(30)
58 S ^BSDXTMP($J,0)="I00020ACCESSGROUPTYPEID^T00030ERRORTEXT"_$C(30)
59 I '+BSDXIEN D ERR(0,"BSDX22: Invalid null Access Group ID") Q
60 I '+BSDXIEN1 D ERR(0,"BSDX22: Invalid null Access Type ID") Q
61 I '$D(^BSDXAGP(BSDXIEN,0)) D ERR(0,"BSDX22: Invalid Access Group ID") Q
62 I '$D(^BSDXTYPE(BSDXIEN1,0)) D ERR(0,"BSDX22: Invalid Access Type ID") Q
63 I $D(^BSDXAGTP("AC",BSDXIEN,BSDXIEN1)) D Q
64 . S BSDXIENS=$O(^BSDXAGTP("AC",BSDXIEN,BSDXIEN1,0))
65 . S ^BSDXTMP($J,BSDXI+1)=+BSDXIENS_"^"_$C(30)_$C(31)
66 . Q
67 ;
68 S BSDXIENS="+1,"
69 S BSDXFDA(9002018.39,BSDXIENS,.01)=BSDXIEN ;ACCESS GROUP ID
70 S BSDXFDA(9002018.39,BSDXIENS,.02)=BSDXIEN1 ;ACCESS TYPE ID
71 K BSDXIEN
72 D UPDATE^DIE("","BSDXFDA","BSDXIEN","BSDXMSG")
73 S BSDXI=BSDXI+1
74 S ^BSDXTMP($J,BSDXI)=+$G(BSDXIEN(1))_"^"_$C(30)_$C(31)
75 Q
76 ;
77ERR(BSDXERID,ERRTXT) ;Error processing
78 S:'+$G(BSDXI) BSDXI=999999
79 S BSDXI=BSDXI+1
80 S ^BSDXTMP($J,BSDXI)=BSDXERID_"^"_ERRTXT_$C(30)
81 S BSDXI=BSDXI+1
82 S ^BSDXTMP($J,BSDXI)=$C(31)
83 Q
84 ;
85ERROR ;
86 D ^%ZTER
87 I '+$G(BSDXI) N BSDXI S BSDXI=999999
88 S BSDXI=BSDXI+1
89 D ERR(0,"BSDX22 M Error: <"_$G(%ZTERROR)_">")
90 Q
Note: See TracBrowser for help on using the repository browser.