Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: XOBUZAP0

XOBUZAP0.m

Go to the documentation of this file.
  1. XOBUZAP0 ;; mjk/alb - Terminate Jobs Utility ; 08/4/2005 13:00
  1. ;;1.6;Foundations;;May 08, 2009;Build 15
  1. ;Per VHA directive 2004-038, this routine should not be modified.
  1. QUIT
  1. ;
  1. ; ------------------- ^XTMP Related Utilities -------------------------
  1. ;
  1. GETREF(SUB,XOBJOB) ; -- get ^XTMP reference of $JOB or passed in job #
  1. QUIT $NAME(^XTMP(SUB_" "_$$BOXVOL^XOBUZAP()_" "_$GET(XOBJOB,$JOB)))
  1. ;
  1. KILL(XOBREF) ; -- kill @ ref
  1. KILL @XOBREF
  1. QUIT
  1. ;
  1. SETVI(XOBREF,XOBDUZ,XOBIP,XOBDESC) ; -- Set VistA Info node
  1. NEW XOBDT
  1. SET XOBDT=$$DT^XLFDT()
  1. SET @XOBREF@(0)=$$FMADD^XLFDT(XOBDT,7)_U_XOBDT_U_XOBDESC_" [$JOB ="_$JOB_"]"
  1. SET @XOBREF@(1)=$GET(XOBDUZ)_U_$GET(XOBIP)
  1. QUIT
  1. ;
  1. GETDUZ(XOBREF) ; -- Get DUZ from VistA Info node
  1. QUIT +$GET(@XOBREF@(1))
  1. ;
  1. GETIP(XOBREF) ; -- Get Client IP from VistA Info node
  1. QUIT $PIECE($GET(@XOBREF@(1)),U,2)
  1. ;
  1. ; --------------------------------------------------------------------
  1. ;
  1. GETSTATE(CODE) ; -- get state
  1. QUIT $TEXT(STATE+CODE)
  1. ;
  1. ; Note: 'State' table below derived from Cache documentation on $ZUTIL(67,4) function.
  1. ; Codes 19-21 are present in Cache v5+ but not applicable to version 4.1.
  1. STATE ; -- get process STATE text
  1. ;;1;LOCK :: Job is in the lock code.
  1. ;;2;OPEN :: Job is opening a device.
  1. ;;3;CLOS :: Job is closing a device.
  1. ;;4;USE :: Job is in the USE command.
  1. ;;5;READ :: Job is reading from a device.
  1. ;;6;WRT :: Job is writing to a device.
  1. ;;7;GGET :: Job is in gget.
  1. ;;8;GSET :: Job is in gset.
  1. ;;9;GKILL :: Job is in gkill.
  1. ;;10;GORD :: Job is in gorder for $ORDER.
  1. ;;11;GQRY :: Job is in gorder for $QUERY.
  1. ;;12;GDEF :: Job is in gdefval.
  1. ;;13;ZF :: Job is in a $ZF function call.
  1. ;;14;HANG :: Job is in the HANG command.
  1. ;;15;JOB :: Job is jobbing a job.
  1. ;;16;EXAM :: Job is doing ^JOBEXAM.
  1. ;;17;BRD :: Job is in $ZUTIL(9) or $ZUTIL(94), broadcasting a message.
  1. ;;18;SUSP :: Job is suspended.
  1. ;;19;INCR :: Job is in a $INCREMENT function call.
  1. ;;20;BSET :: Job is setting a bit using the $BIT functions.
  1. ;;21;BGET :: Job is getting a bit using the $BIT functions.