source: Scheduling/trunk/m/BSDX20.m@ 914

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

Updated version numbers

File size: 2.2 KB
Line 
1BSDX20 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ;
2 ;;1.3T1;BSDX;;Jul 18, 2010
3 ;
4 ;
5DELRGID(BSDXY,BSDXIEN) ;EP
6 ;Entry point for debugging
7 ;
8 ;D DEBUG^%Serenji("DELRGI^BSDX20(.BSDXY,BSDXIEN)")
9 Q
10 ;
11DELRGI(BSDXY,BSDXIEN,BSDXIEN1) ;EP
12 ;Deletes entry BSDXIEN1 from entry BSDXIEN in the RESOURCE GROUP file
13 ;Return recordset containing error message or "" if no error
14 ;Called by BSDX DELETE RES GROUP ITEM
15 ;Test Line:
16 ;D DELRU^BSDX18(.RES,99)
17 ;
18 N BSDXI,DIK,DA
19 S BSDXI=0
20 S BSDXY="^BSDXTMP("_$J_")"
21 S ^BSDXTMP($J,0)="I00020RESOURCEGROUPID^I00020ERRORID"_$C(30)
22 I '+BSDXIEN D ERR(BSDXI,BSDXIEN,70) Q
23 I '+BSDXIEN1 D ERR(BSDXI,BSDXIEN,70) Q
24 I '$D(^BSDXDEPT(BSDXIEN,1,BSDXIEN1,0)) D ERR(BSDXI,BSDXIEN,70) Q
25 ;
26 ;Delete entry BSDXIEN1
27 S DIK="^BSDXDEPT("_BSDXIEN_",1,"
28 S DA=BSDXIEN1,DA(1)=BSDXIEN
29 D ^DIK
30 ;
31 S BSDXI=BSDXI+1
32 S ^BSDXTMP($J,BSDXI)=BSDXIEN_"^"_"-1"_$C(30)_$C(31)
33 Q
34 ;
35ADDRGID(BSDXY,BSDXIEN,BSDXIEN1) ;EP
36 ;Entry point for debugging
37 ;
38 ;D DEBUG^%Serenji("ADDRGI^BSDX20(.BSDXY,BSDXIEN,BSDXIEN1)")
39 Q
40 ;
41ADDRGI(BSDXY,BSDXIEN,BSDXIEN1) ;EP
42 ;Adds RESOURCEID BSEDXIEN1 to RESOURCE GROUP entry BSDXIEN
43 ;Return recordset containing added subentry number error message or "" if no error
44 ;Called by BSDX ADD RES GROUP ITEM
45 ;Test Line:
46 ;D ADDRGI^BSDX20(.RES,1,1)
47 ;
48 N BSDXI,BSDXIENS,BSDXMSG,BSDXFDA
49 S X="ETRAP^BSDX20",@^%ZOSF("TRAP")
50 S BSDXI=0
51 S BSDXY="^BSDXTMP("_$J_")"
52 S ^BSDXTMP($J,0)="I00020RESOURCEGROUPITEMID^I00020ERRORID"_$C(30)
53 I '+BSDXIEN D ERR(BSDXI,BSDXIEN,70) Q
54 I '+BSDXIEN1 D ERR(BSDXI,BSDXIEN,70) Q
55 I '$D(^BSDXDEPT(BSDXIEN,0)) D ERR(BSDXI,BSDXIEN,70) Q
56 I '$D(^BSDXRES(BSDXIEN1,0)) D ERR(BSDXI,BSDXIEN1,70) Q
57 I $D(^BSDXDEPT(BSDXIEN,1,"B",BSDXIEN1)) D ERR(BSDXI,0,0) Q
58 ;^BSDXDEPT(3,1,"B",3,1)=
59 ;
60 S BSDXIENS="+1,"_BSDXIEN_","
61 S BSDXFDA(9002018.21,BSDXIENS,.01)=BSDXIEN1 ;RESOURCEID
62 K BSDXIEN
63 D UPDATE^DIE("","BSDXFDA","BSDXIEN","BSDXMSG")
64 S BSDXI=BSDXI+1
65 S ^BSDXTMP($J,BSDXI)=+$G(BSDXIEN(1))_"^"_"-1"_$C(30)_$C(31)
66 Q
67 ;
68ERR(BSDXI,BSDXID,BSDXERR) ;Error processing
69 S BSDXI=BSDXI+1
70 S ^BSDXTMP($J,BSDXI)=BSDXID_"^"_BSDXERR_$C(30)
71 S BSDXI=BSDXI+1
72 S ^BSDXTMP($J,BSDXI)=$C(31)
73 Q
74 ;
75ETRAP ;EP Error trap entry
76 I '$D(BSDXI) N BSDXI S BSDXI=999
77 S BSDXI=BSDXI+1
78 D ERR(BSDXI,99,70)
79 Q
Note: See TracBrowser for help on using the repository browser.