source: WorldVistAEHR/trunk/r/ZZREGIONAL-A1C-A5C-CRHD-RGED-RGUT-RGWB-RG/RGUTRRC.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: 1.6 KB
Line 
1RGUTRRC ;CAIRO/DKM - Remote routine checksum utility;04-Sep-1998 11:26;DKM
2 ;;2.1;RUN TIME LIBRARY;;Mar 22, 1999
3 ;=================================================================
4 ; Performs a routine checksum on selected routines across all CPUs.
5 ;=================================================================
6 N RGX,RGY,RGRTN,RGCPU,RGUCI,RGCS,RGPID,RGZ,RGZ1,X
7 S RGPID=$J
8 D HOME^%ZIS
9 D TITLE^RGUT("Remote Routine Checksum","1.0")
10RSEL X ^%ZOSF("RSEL")
11 W !!
12 Q:'$D(^UTILITY(RGPID))
13 K %IS,%ZIS
14 D ^%ZIS
15 G:POP RSEL
16 U IO
17 S RGUCI=$P($ZU(0),","),RGCPU=$P($ZU(0),",",2),RGRTN=$C(1)
18NXT S RGRTN=$O(^UTILITY(RGPID,RGRTN))
19 I RGRTN="" W !! Q
20 W RGRTN,"..."
21 K RGX,^RGUTL("RRC",RGPID)
22 F RGY="CSA","CSB","CSC","PSA","PSB" D:RGY'=RGCPU JOBIT
23 S RGCS=$$CHKSUM(RGRTN),RGCNT=0
24 W ?15,RGCPU," ",RGCS,!
25AGAIN I '$D(RGX) W ! G NXT
26 S RGZ="",RGCNT=RGCNT+1
27 I RGCNT>20 D FAIL G NXT
28 H:RGCNT>1 1
29NXT2 S RGZ=$O(RGX(RGZ))
30 G:RGZ="" AGAIN
31 G:'$D(^RGUTL("RRC",RGPID,RGZ)) NXT2
32 S RGZ1=^(RGZ)
33 K ^(RGZ),RGX(RGZ)
34 I RGCS=RGZ1 W ?15,RGZ," same",!
35 E W ?15,RGZ," different: ",RGZ1," ************",!
36 G NXT2
37FAIL S RGZ=$O(RGX(RGZ))
38 Q:RGZ=""
39 W ?15,RGZ," failed to report",!
40 G FAIL
41JOBIT Q:RGY=RGCPU
42 S @$$TRAP^RGZOSF("NOCPU^RGUTRRC")
43 J JOB^RGUTRRC(RGPID,RGRTN)[RGUCI,RGY]::1
44 I '$ZB W "Failed to start remote job on "_RGUCI_","_RGY,!
45 E S RGX(RGY)=""
46NOCPU Q
47JOB(RGJ,RGRTN) ;
48 H 1
49 S RGCPU=$P($ZU(0),",",2),@$$TRAP^RGZOSF("JERR^RGUTRRC")
50 I $$TEST^RGZOSF(RGRTN) S ^RGUTL("RRC",RGJ,RGCPU)=$$CHKSUM(RGRTN)
51 E S ^RGUTL("RRC",RGJ,RGCPU)=0
52 Q
53JERR S ^RGUTL("RRC",RGJ,RGCPU)=$$EC^%ZOSV
54 Q
55CHKSUM(X) ;
56 N Y
57 X ^%ZOSF("RSUM")
58 Q Y
Note: See TracBrowser for help on using the repository browser.