source: WorldVistAEHR/trunk/r/TOOLKIT-AWCM-XD-XIN-XPAR-XQAB-XT-XUC-XUR-ZIN-ZTED/XTZRUTL.m@ 1093

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

initial load of WorldVistAEHR

File size: 2.3 KB
RevLine 
[613]1XTZRUTL ;ISCSF/RWF - Developer Routine Utilities ;7/24/97 13:47 [3/22/00 4:16pm]
2 ;;7.3;TOOLKIT;**20,L02**;Apr 25, 1995
3 ;
4 Q ;No entry from the top.
5BUILD ;
6 K ^UTILITY($J) D HOME^%ZIS
7 N BLDA,DIC,IX,X
8 I '$D(^XPD(9.6,0)) W !,"No BUILD file to work from." Q
9 S Y=$$BUILD^XTRUTL1 G EXIT:Y'>0 S BLDA=+Y
10CALL D RTN^XTRUTL1(BLDA)
11 G EXIT:$O(^UTILITY($J,""))=""
12 D UCI^%ZOSV S AAQUCI=$P(Y,",",1) K Y S AAQDT=$$HTE^XLFDT($H,"1M")
13 W !!,"Post-Install Values from Build File "_AAQUCI_" Routines "_AAQDT
14 W !,"NOTE: Old and New values will be the same after XTRMON has run.",!,?6,"The Old value may look incorrect if a routine is patched more",!,?6,"than once in a day. See On-Line Documentation for more info."
15 S RN="" U IO W !!,?19,"Checksum",!,"Routine",?16,"Old",?26,"New",?35,"2nd Line Patches"
16 F S RN=$O(^UTILITY($J,RN)) Q:RN="" D
17 . S X=RN X ^%ZOSF("TEST") E W !,RN," is not on the system." Q
18 . S X=RN,XCNP=0,DIF="RTN(" K RTN X ^%ZOSF("LOAD") S LC=XCNP-1
19 . D RSUM S Y=$O(^DIC(9.8,"B",RN,0)) Q:Y'>0
20 . S OLDSUM=$P($G(^DIC(9.8,Y,0)),"^",5)
21 . S X=RTN(2,0) W !,RN,?13,$J(OLDSUM,8),?23,$J(RSUM,8),?35,$P(X,";",5)
22 . Q
23EXIT K %,%N,AAQDT,AAQUCI,C,DIF,LC,OLDSUM,RN,RSUM,RSUM2,RTN,XCNP,Y
24 D ^%ZISC
25 Q
26RSUM N Y,Y2,%,%1,%2,%3 S (Y,Y2)=0
27 F %=1,3:1:LC S %1=RTN(%,0),%3=$F(%1," "),%3=$S($E(%1,%3)'=";":$L(%1),$E(%1,%3+1)=";":$L(%1),1:%3-2) F %2=1:1:%3 S Y=$A(%1,%2)*%2+Y,Y2=$A(%1,%2)*(%2+%)+Y2
28 S RSUM=Y,RSUM2=Y2
29 Q
30OLDSUM(X) ;Get the OLD Checksum
31 N Y S Y=$O(^DIC(9.8,"B",X,0)) Q:Y'>0 ""
32 S X=$G(^DIC(9.8,Y,4))
33 Q $P(X,"^",2)
34UPDATE ;Update the ROUTINE file with current checksums
35 K ^UTILITY($J)
36 N BLDA,DIC,IX,X,NOW W !!,"This will update the ROUTINE file for the routines from a BUILD file."
37 I '$D(^XPD(9.6,0)) W !,"No BUILD file to work from." Q
38 S Y=$$BUILD^XTRUTL1 G EXIT:Y'>0 S BLDA=+Y
39 D RTN^XTRUTL1(BLDA)
40 S NOW=$$NOW^XLFDT()
41 G EXIT:$O(^UTILITY($J,""))=""
42 S RN=""
43 F S RN=$O(^UTILITY($J,RN)) Q:RN="" D UD1(RN)
44 W !,"Done"
45 Q
46UD1(RN) ;
47 N X,XCNP,DIF,LC,RSUM,RSUM2,Y S:'$D(NOW) NOW=$$NOW^XLFDT
48 S X=RN,XCNP=0,DIF="RTN(" K RTN X ^%ZOSF("LOAD") S LC=XCNP-1
49 D RSUM
50 S X=RTN(2,0)
51 S Y=$$GETDA(RN) Q:Y'>0
52 S ^DIC(9.8,+Y,4)=NOW_U_RSUM_"/"_RSUM2_U_$P(X,";",5)
53 Q
54SHOW(RN) ;Show current data
55 N Y,%0,%4 S Y=$$GETDA(RN) Q:Y'>0 S %0=^DIC(9.8,Y,0),%4=$G(^(4))
56 W !,$P(%0,U),?10,$P(%4,U),?28,$P(%4,U,2)
57 Q
58GETDA(X) ;Find a DA in file
59 Q $O(^DIC(9.8,"B",X,0))
Note: See TracBrowser for help on using the repository browser.