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

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

initial load of WorldVistAEHR

File size: 3.7 KB
Line 
1XUGOT ; DBA/CJS - COMPARE LOCAL/NATIONAL CHECKSUMS REPORT ;10/20/2006
2 ;;8.0;KERNEL;**369**;Jul 10, 1995;Build 27
3 Q
4LOAD ; -- use MFS to get ROUTINE file from FORUM (background job)
5 W !!,">>>This processing will take about thirty minutes. Please wait..."
6 D CLEAN
7 D ARRAY^XUMF(9.8)
8 D INPUT
9 Q
10 ;----------------------------
11CLEAN ; clean all entries in subfile 9.818 if $G(^DIC(9.8,RTNIEN,6))=2 (national tracking)
12 N RTNIEN,XUTR S RTNIEN=0
13 F S RTNIEN=$O(^DIC(9.8,RTNIEN)) Q:RTNIEN'>0 D
14 . S XUTR=$P($G(^DIC(9.8,RTNIEN,6)),"^")
15 . I XUTR="National - report" S XUTR=2
16 . I XUTR=2 D CLN(RTNIEN) S $P(^DIC(9.8,RTNIEN,6),"^")=""
17 Q
18 ;------------------------------
19CLN(RTNIEN) ; clean all entries in sub-file #9.818
20 N XI S XI=0 F S XI=$O(^DIC(9.8,RTNIEN,8,XI)) Q:XI'>0 D
21 . N DA,DIK S DA(1)=RTNIEN,DA=XI,DIK="^DIC(9.8,"_DA(1)_","_"8," D ^DIK
22 Q
23 ;------------------------------
24INPUT ; input routines' information in Routine file
25 N IDX98,ERROR,NAME,HLFS,XXX,YYY,ZZZ,AAA,BBB,CCC,FDA,X,HFLS,NODE,XUSIEN
26 S HLFS="^",IDX98=0
27 F S IDX98=$O(^TMP("XUMF ARRAY",$J,IDX98)) Q:'IDX98 D
28 .S NODE=$G(^TMP("XUMF ARRAY",$J,IDX98)),NODE=$P(NODE,"^",2,99)
29 .S NAME=$P(NODE,HLFS,1)
30 . I $L(NAME)>8 Q
31 .S XXX=$P(NODE,HLFS,2)
32 . I XXX'="National - report" Q
33 .S YYY=$P(NODE,HLFS,3)
34 .S ZZZ=$P(NODE,HLFS,4)
35 . I +$E(ZZZ,2,10)'>0 Q
36 .S AAA=$P(NODE,HLFS,5)
37 .S BBB=$P(NODE,HLFS,6)
38 .S CCC=$P(NODE,HLFS,7)
39 .S FDA(1,9.8,"?+1,",.01)=NAME
40 .S FDA(1,9.8,"?+1,",1)="R"
41 .;S FDA(1,9.8,"?+1,",6)=2
42 .S FDA(1,9.8,"?+1,",7.1)=YYY
43 .S FDA(1,9.8,"?+1,",7.2)=ZZZ
44 .S FDA(1,9.8,"?+1,",7.3)=CCC
45 .S FDA(1,9.818,"+2,?+1,",.01)=AAA
46 .S FDA(1,9.818,"+2,?+1,",2)=BBB
47 .D UPDATE^DIE("","FDA(1)")
48 .D SETFLD6(NAME)
49 ;
50 K ^TMP("XUMF ARRAY",$J)
51 Q
52 ;
53SETFLD6(NAME) ;
54 N XUIEN S XUIEN=0
55 S XUIEN=$$FIND1^DIC(9.8,"","MX",NAME,"","","ERR")
56 I XUIEN'>0 Q
57 I $P($G(^DIC(9.8,XUIEN,6)),"^")="" S $P(^DIC(9.8,XUIEN,6),"^")=2
58 Q
59 ; -------------------- FOR XUGOT1-------------------------------
60PACK(RTN,SL) ; get package name
61 N XUS,XUS1,XUS2 S (XUS,XUS1,XUS2)=""
62 S XUS=$$RT(RTN) I XUS'>0 Q ""
63 S XUS2=$P(XUS,"^",2)
64 S XUS1=$$SL(SL) I XUS1'="" S XUS2=XUS1
65 Q XUS2_"*"_+$P(XUS,"^",3)_"*"
66 ;
67XUN4(XUS) ;
68 N XUN4,XUA,XUB,XUC
69 I $G(XUS)="" Q ""
70 S XUN4=+$P(XUS,"*",2) ;Last Version number from the last patch name
71 I XUN4>0 Q XUN4
72 S XUA=$L(XUS)
73 F XUB=1:1:XUA S XUN4=+$E(XUS,XUB,XUA) I XUN4>0 Q
74 Q XUN4
75NPL2(IEN) ; get Package name from Patch multiple
76 I '$D(^DIC(9.8,IEN,8,0)) Q ""
77 N XUIEN,XUPK,XUPK1,XUPK2 S (XUPK2,XUPK1,XUPK)="",XUIEN=0
78 F S XUIEN=$O(^DIC(9.8,IEN,8,XUIEN)) Q:XUIEN'>0 D
79 . S XUA=$G(^DIC(9.8,IEN,8,XUIEN,0)),XUPK2=$P(XUA,"^"),XUPK=$P(XUPK2,"*"),XUPK2=$P(XUPK2,"*",2)
80 . I XUPK'="",$D(^DIC(9.4,"C",XUPK)) S XUPK1=XUPK_"*"_XUPK2
81 Q XUPK1
82 ;
83LSLPN(SL) ; return package name from the second line (piece 3rd of the second line)
84 Q $$TRIM^XLFSTR($P(SL,";",4))
85 ;
86SL(SL) ; get Prefix_Package from the second line
87 N PCK,XUST,XUIEN,Y,X
88 S (PCK,XUIEN)="",XUST=$$LSLPN(SL)
89 S X=XUST X ^%ZOSF("UPPERCASE") I Y'="" S XUIEN=$O(^DIC(9.4,"B",Y,0))
90 I XUIEN S PCK=$P($G(^DIC(9.4,XUIEN,0)),"^",2)
91 Q PCK
92 ;
93 ;-----------------------CHECK PACKAGE NAME AND VERSION---------------------------
94RT(RTN) ; get Package and Version base on routine name
95 I $G(RTN)="" Q ""
96 N XUST,VERSION,XUIEN,XUI,PCK,PCKNAME,XUQUIT S (PCK,PCKNAME,XUST,VERSION)="",XUIEN=""
97 F XUI=4,3,2 I $D(^DIC(9.4,"C",$E(RTN,1,XUI))) D Q:XUIEN>0
98 . S XUIEN=$O(^DIC(9.4,"C",$E(RTN,1,XUI),0)) ;IEN FOR PACKAGE
99 . I XUIEN="" S XUIEN=-1 Q ;no package found (yet)
100 . I $D(^DIC(9.4,XUIEN,0)) S XUST=$G(^DIC(9.4,XUIEN,0)),VERSION=$G(^DIC(9.4,XUIEN,"VERSION")),PCKNAME=$P(XUST,"^",1),PCK=$P(XUST,"^",2)
101 Q XUIEN_"^"_PCK_"^"_VERSION_"^"_PCKNAME
102 ;
103GETSL(RTN) ;
104 N XUSL
105 N DIF,XCNP K ^TMP($J,369)
106 S DIF="^TMP($J,369,",XCNP=0 X ^%ZOSF("LOAD")
107 Q $G(^TMP($J,369,2,0))
Note: See TracBrowser for help on using the repository browser.