Changeset 439 for ccr/trunk/p


Ignore:
Timestamp:
May 2, 2009, 3:06:25 PM (16 years ago)
Author:
George Lilly
Message:

updated batch processing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ccr/trunk/p/C0CBAT.m

    r437 r439  
    3737 S C0CBH=$NA(@C0CBB@("HOTLIST")) ; BASE FOR HOT LIST
    3838 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
    3943 D BLDHOT(C0CBH) ; BUILD THE HOT LIST
    4044 S C0CHN=$$COUNT(C0CBH) ;COUNT NUMBER IN HOT LIST
     
    5862 . S C0CFDA(C0CBF,C0CIEN_",",2.1)=C0CNH ; UPDATE HOT LIST PROGRESS
    5963 . S C0CNOW=$$NOW^XLFDT
    60  . S C0CFDA(C0CBF,C0CIEN_",",4)=C0CNOW
     64 . S C0CFDA(C0CBF,C0CIEN_",",4)=C0CNOW ; LAST UPDATED FIELD
    6165 . S C0CELPS=$$FMDIFF^XLFDT(C0CNOW,C0CBDT,2) ; DIFFERENCE IN SECONDS
    6266 . 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
    6468 . S C0CETOT=C0CAVG*C0CSN ; EST TOT ELASPSED TIME
    6569 . S C0CEST=$$FMADD^XLFDT(C0CBDT,0,0,0,C0CETOT) ; ADD SECONDS TO BATCH START
    6670 . S C0CFDA(C0CBF,C0CIEN_",",4.2)=C0CEST ;ESTIMATED COMPLETION TIME
    67  . D UPDIE ;
     71 . D UPDIE ;
     72 . H 1 ; GIVE OTHERS A CHANCE
    6873 F  S C0CBCUR=$O(@C0CBS@(C0CBCUR)) Q:C0CBCUR=""  D  ; REMAINING SUBSCRIPTION LIST
    6974 . I $D(@C0CBH@(C0CBCUR)) Q  ; SKIP IF IN HOT LIST - ALREADY DONE
     
    7479 . S C0CFDA(C0CBF,C0CIEN_",",1.1)=C0CN ;UPDATE TOTAL PROGRESS
    7580 . S C0CNOW=$$NOW^XLFDT
    76  . S C0CFDA(C0CBF,C0CIEN_",",4)=C0CNOW
     81 . S C0CFDA(C0CBF,C0CIEN_",",4)=C0CNOW ; LAST UPDATED FIELD
    7782 . S C0CELPS=$$FMDIFF^XLFDT(C0CNOW,C0CBDT,2) ; DIFFERENCE IN SECONDS
    7883 . 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
    8085 . S C0CETOT=C0CAVG*C0CSN ; EST TOT ELASPSED TIME
    8186 . S C0CEST=$$FMADD^XLFDT(C0CBDT,0,0,0,C0CETOT) ; ADD SECONDS TO BATCH START
    8287 . S C0CFDA(C0CBF,C0CIEN_",",4.2)=C0CEST ;ESTIMATED COMPLETION TIME
    8388 . D UPDIE ;
     89 . H 1 ; GIVE IT A BREAK
    8490 Q
    8591 ;
Note: See TracChangeset for help on using the changeset viewer.