Ignore:
Timestamp:
May 22, 2011, 9:30:52 AM (14 years ago)
Author:
Sam Habiel
Message:

BMXMON now gets the port number for GT.M in BMX CONNECT STATUS RPC
BMXRPC3 now correctly deals with zero divisions in
VISTA and fixes HTG bug in getting the last selected division from DISV

Location:
BMXNET_RPMS_dotNET_UTILITIES-BMX/branch/routines
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • BMXNET_RPMS_dotNET_UTILITIES-BMX/branch/routines/BMXMON.m

    r1181 r1192  
    1 BMXMON  ; IHS/OIT/HMW - BMXNet MONITOR ; 5/9/11 10:16am
     1BMXMON  ; IHS/OIT/HMW - BMXNet MONITOR ; 5/22/11 3:35pm
    22        ;;4.1000;BMX;;Apr 17, 2011
    33        ;
     
    1818    ; --> This reduces the need for custom error trap handling which is very difficult to do
    1919    ; --> in Mumps for new programmers. Mumps errors now are thrown on the client.
     20    ; - CHSTAT now has code to get the port for GT.M when using xinetd
    2021        ;
    2122        ;IHS/OIT/HMW Patch 1 added validity check for passed-in namespace
     
    368369        ;
    369370CKSTAT(OUT,IN)  ; EP - RPC: BMX CONNECT STATUS ; CONFIRMS THAT THAT A VALID PROCESS HAS BEEN SPAWNED BY BMXMON
    370         N PORT,STATUS,JOBID
    371         S PORT=+$P($P,"|",3)
     371        ; On GT.M on xinetd, get port from ZSHOW "D":^SAM -- thanks to Wally Fort in VistaLink for the Idea
     372    ;^SAM("D",1)="/dev/null OPEN "
     373    ;^SAM("D",2)="0 OPEN SOCKET TOTAL=1 CURRENT=0 "
     374    ;^SAM("D",3)="        SOCKET[0]=h13060671680 DESC=0 CONNECTED ACTIVE  TRAP  REMOTE=172.16.16.56@54531 LOCAL=172.16.16.142@9260 "
     375    ;^SAM("D",4)="                ZDELAY  ZBFSIZE=1024 ZIBFSIZE=0 NODELIMITER "
     376    ;
     377    N PORT,STATUS,JOBID
     378        S PORT=+$P($P,"|",3)                            ; On Cache, port would be the 3rd piece of $Principle
     379    I PORT=0,^%ZOSF("OS")["GT.M" DO                 ; if port is blank and we are on GT.M, then we must be using Xinetd
     380    . N BMXTMP                                      ; holds device data
     381    . X "ZSHOW ""D"":BMXTMP"                        ; dump data
     382    . N % S %=""                                    ; loop var
     383    . F  S %=$O(BMXTMP("D",%)) Q:'%  Q:BMXTMP("D",%)["LOCAL"   ; Cycle % to the right value
     384    . S PORT=+$P($P(BMXTMP("D",%),"LOCAL=",2),"@",2)            ; Get port
    372385        S JOBID=$P($J,":",1)
    373386        I $G(^BMXTMP("CONNECT STATUS",JOBID))="" HANG 1  ;Wait for job to spawn ZCHILD to be set in MON^
  • BMXNET_RPMS_dotNET_UTILITIES-BMX/branch/routines/BMXRPC3.m

    r1181 r1192  
    1 BMXRPC3 ; IHS/OIT/HMW - BMX REMOTE PROCEDURE CALLS ; 5/11/11 4:33pm
     1BMXRPC3 ; IHS/OIT/HMW - BMX REMOTE PROCEDURE CALLS ; 5/22/11 4:33pm
    22        ;;4.1000;BMX;;Apr 17, 2011
    33   ;
     
    143143        S BMXSUB="^VA(200,"_BMXDUZ_",2,"
    144144        S BMXFACS="T00030FACILITY_NAME^T00030FACILITY_IEN^T00002MOST_RECENT_LOOKUP"_$C(30)
    145         ;F BMXN=1:1 S BMXFN=$O(^VA(200,BMXDUZ,2,BMXFN)) Q:BMXFN=""  D
    146         S BMXRCNT=0  ;cmi/maw mod 10/17/2006
    147145        F BMXN=1:1 S BMXFN=$O(^VA(200,BMXDUZ,2,BMXFN)) Q:'BMXFN  D  ;IHS/ANMC/LJF 8/9/01
    148         . ;S BMXFACS=BMXFACS_$P(^DIC(4,BMXFN,0),U,1)_"^"_BMXFN_$C(30)
    149146        . S BMXFACS=BMXFACS_$P(^DIC(4,BMXFN,0),U,1)_"^"_BMXFN
    150         . ;S BMXRCNT=0  ;cmi/maw orig
    151         . ;I $D(^DISV(BMXDUZ,BMXSUB)),^DISV(BMXDUZ,BMXSUB)=BMXFN S BMXRCNT=1
    152         . ;I $G(DUZ(2))=BMXFN S BMXRCNT=1  ;cmi/maw orig
    153         . S BMXRCNT=BMXRCNT+1  ;cmi/maw mod
    154         . S BMXFACS=BMXFACS_"^"_BMXRCNT_$C(30)
    155         ;//smh I BMXN=1 S BMXFN=$P(^AUTTSITE(1,0),U,1) D
    156         ;//smh . S BMXFACS=BMXFACS_$P(^DIC(4,BMXFN,0),U,1)_"^"_BMXFN_"^"_1_$C(30)
     147        . ; S BMXRCNT=BMXRCNT+1  ;cmi/maw mod ; /smh WRONG WRONG WRONG WRONG. MOST RECENT LOOKUP is 1 or 0, not an increment
     148    . N BMXSUB S BMXSUB="^VA(200,"_DUZ_",2,"        ; ^DISV subscript
     149    . N BMXLAST S BMXLAST=(^DISV(DUZ,BMXSUB)=BMXFN) ; 1 or 0 if division is the same as the one in the subscript
     150        . S BMXFACS=BMXFACS_"^"_BMXLAST_$C(30)          ; append that and add eor
     151        ; IF RPMS, RUN THESE
     152    ;//smh I BMXN=1 S BMXFN=$P(^AUTTSITE(1,0),U,1) D                            ; rpms only!
     153        ;//smh . S BMXFACS=BMXFACS_$P(^DIC(4,BMXFN,0),U,1)_"^"_BMXFN_"^"_1_$C(30)   ; rpms only!
     154    ; ELSE IF VISTA, RUN THESE
     155    ; VISTA Only: If we have no results, use kernel's DUZ(2) set during sign-on
     156    ; Equivalent to the RPMS lines above...
     157    I BMXN=1 S BMXFACS=BMXFACS_$P(^DIC(4,DUZ(2),0),U,1)_U_DUZ(2)_U_1_$C(30)
    157158        S BMXFACS=BMXFACS_$C(31)
    158159        Q
Note: See TracChangeset for help on using the changeset viewer.