Changeset 439 for ccr/trunk/p
- Timestamp:
- May 2, 2009, 3:06:25 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ccr/trunk/p/C0CBAT.m
r437 r439 37 37 S C0CBH=$NA(@C0CBB@("HOTLIST")) ; BASE FOR HOT LIST 38 38 S C0CBS=$NA(^C0CS("B")) ; SUBSCRIPTION LIST BASE 39 ;I $D(^C0CB("B",C0CDT)) D ; BATCH RECORD EXISTS 40 ;. H 10 ; HANG 10 SECONDS 41 ;. S C0CBDT=$$NOW^XLFDT ; NEW DATE FOR THIS RUN 42 ;. I $D(^C0CB("B",C0CDT)) B ;DIDN'T WORK 39 43 D BLDHOT(C0CBH) ; BUILD THE HOT LIST 40 44 S C0CHN=$$COUNT(C0CBH) ;COUNT NUMBER IN HOT LIST … … 58 62 . S C0CFDA(C0CBF,C0CIEN_",",2.1)=C0CNH ; UPDATE HOT LIST PROGRESS 59 63 . S C0CNOW=$$NOW^XLFDT 60 . S C0CFDA(C0CBF,C0CIEN_",",4)=C0CNOW 64 . S C0CFDA(C0CBF,C0CIEN_",",4)=C0CNOW ; LAST UPDATED FIELD 61 65 . S C0CELPS=$$FMDIFF^XLFDT(C0CNOW,C0CBDT,2) ; DIFFERENCE IN SECONDS 62 66 . S C0CAVG=C0CELPS/C0CN ; AVERAGE ELAPSED TIME 63 . S C0CFDA(C0CBF,C0CIEN_",",4.1)=C0CAVG 67 . S C0CFDA(C0CBF,C0CIEN_",",4.1)=C0CAVG ; AVERAGE ELAPSED TIME 64 68 . S C0CETOT=C0CAVG*C0CSN ; EST TOT ELASPSED TIME 65 69 . S C0CEST=$$FMADD^XLFDT(C0CBDT,0,0,0,C0CETOT) ; ADD SECONDS TO BATCH START 66 70 . S C0CFDA(C0CBF,C0CIEN_",",4.2)=C0CEST ;ESTIMATED COMPLETION TIME 67 . D UPDIE ; 71 . D UPDIE ; 72 . H 1 ; GIVE OTHERS A CHANCE 68 73 F S C0CBCUR=$O(@C0CBS@(C0CBCUR)) Q:C0CBCUR="" D ; REMAINING SUBSCRIPTION LIST 69 74 . I $D(@C0CBH@(C0CBCUR)) Q ; SKIP IF IN HOT LIST - ALREADY DONE … … 74 79 . S C0CFDA(C0CBF,C0CIEN_",",1.1)=C0CN ;UPDATE TOTAL PROGRESS 75 80 . S C0CNOW=$$NOW^XLFDT 76 . S C0CFDA(C0CBF,C0CIEN_",",4)=C0CNOW 81 . S C0CFDA(C0CBF,C0CIEN_",",4)=C0CNOW ; LAST UPDATED FIELD 77 82 . S C0CELPS=$$FMDIFF^XLFDT(C0CNOW,C0CBDT,2) ; DIFFERENCE IN SECONDS 78 83 . S C0CAVG=C0CELPS/C0CN ; AVERAGE ELAPSED TIME 79 . S C0CFDA(C0CBF,C0CIEN_",",4.1)=C0CAVG 84 . S C0CFDA(C0CBF,C0CIEN_",",4.1)=C0CAVG ; AVERAGE ELAPSED TIME 80 85 . S C0CETOT=C0CAVG*C0CSN ; EST TOT ELASPSED TIME 81 86 . S C0CEST=$$FMADD^XLFDT(C0CBDT,0,0,0,C0CETOT) ; ADD SECONDS TO BATCH START 82 87 . S C0CFDA(C0CBF,C0CIEN_",",4.2)=C0CEST ;ESTIMATED COMPLETION TIME 83 88 . D UPDIE ; 89 . H 1 ; GIVE IT A BREAK 84 90 Q 85 91 ;
Note:
See TracChangeset
for help on using the changeset viewer.