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

KMPSUTL.m

Go to the documentation of this file.
  1. KMPSUTL ;OAK/KAK/JML - SAGG Utilities ;9/1/2015
  1. ;;2.0;SAGG PROJECT;**1**;Jul 02, 2007;Build 67
  1. ;
  1. CURSTAT(STAT) ;-- current status
  1. ;---------------------------------------------------------------------
  1. ; input: STAT (optional) = data from $$TSKSTAT^KMPSUTL1
  1. ; output: See codes below
  1. ;---------------------------------------------------------------------
  1. ;
  1. N RESULT,SITNUM,STRTDT
  1. ;
  1. S RESULT="",SITNUM=^DD("SITE",1),STRTDT=$G(^XTMP("KMPS",SITNUM,0))
  1. ;
  1. I $D(^XTMP("KMPS","ERROR")) Q "6^ERRORS RECORDED"
  1. I $D(^XTMP("KMPS","STOP")) Q "7^STOPPING"
  1. I $D(^XTMP("KMPS","START")) L +^XTMP("KMPS"):0 I $T L -^XTMP("KMPS") Q "5^DID NOT COMPLETE"
  1. I +STRTDT I +$H-STRTDT>2 Q "5^DID NOT COMPLETE"
  1. I +STRTDT I +$H-STRTDT>1 Q "4^RUNNING TOO LONG"
  1. I $D(^XTMP("KMPS","START")) Q "0^RUNNING"
  1. I $D(STAT) Q $P(STAT,U,1,2)
  1. E Q "3^NOT RUNNING"
  1. Q "9^UNKNOWN"
  1. ;
  1. STOP ;-- stop SAGG collection routines
  1. ;
  1. N DIR,X,Y
  1. ;
  1. I '$D(^XTMP("KMPS","START")) D Q
  1. .W !!,?5,"The SAGG Project collection routines are not running.",!
  1. E W !!,"Current status of SAGG is ",$P($$CURSTAT(),U,2),!
  1. S DIR("A")="Do you wish to manually STOP the SAGG Project collection routines (Y/N)",DIR("B")="N",DIR(0)="Y"
  1. D ^DIR W !
  1. I Y D
  1. .S ^XTMP("KMPS","STOP")=1
  1. .W !,?5,"The SAGG Project collection routines have been notified to begin an"
  1. .W !,?5,"orderly shut-down process.",!
  1. Q
  1. ;
  1. FILE ;-- modifies data in the SAGG PROJECT file #8970.1
  1. ;
  1. N DA,DIC,DIE,DLAYGO,DR,PLTFRM,X
  1. ;
  1. S PLTFRM=$$MPLTF^KMPSUTL1
  1. W !!,"Specify the Directories"
  1. W " which hold your VistA production globals.",!!,"For example:",!!,?5
  1. I PLTFRM="CWINNT" W "Cache for Windows NT => W:\VAA, W:\VBB, W:\VCC ... V:\Vxx"
  1. I PLTFRM="CVMS" W "Cache for OpenVMS => _$1$DKAn:[CACHSYS.VAA] ... _$1$DKAx:[CACHSYS.Vxx]"
  1. I PLTFRM="UNK" W "Specify all locations of VistA globals"
  1. W !!,"Do NOT specify 'test/training' Directories, (i.e., UTL,TST, etc.).",!
  1. S DIE="^KMPS(8970.1,",DA=1,DR=.03
  1. S:PLTFRM'="DSM" DR(2,8970.11)=.01
  1. D ^DIE
  1. ;
  1. Q
  1. ;
  1. HELP ;-- extended help for SAGG PROJECT file VOLUME SET TO MONITOR (.01) field
  1. ;
  1. N PLTFRM
  1. ;
  1. S PLTFRM=$$MPLTF^KMPSUTL1 Q:PLTFRM="UNK"
  1. W !," This field will contain the name of the Directories that the site wants"
  1. W !," to monitor with the SAGG Project collection routines. The site should"
  1. W !," specify only the Directories which hold their VistA production globals:"
  1. W !!
  1. W " For example:",!!
  1. I PLTFRM="CWINNT" W " Cache for Windows NT => W:\VAA, W:\VBB, W:\VCC ... V:\Vxx",!!
  1. I PLTFRM="CVMS" W " Cache for OpenVMS => _$1$DKAn:[CACHSYS.VAA] ... _$1$DKAx:[CACHSYS.Vxx]",!!
  1. W " Do NOT specify 'test/training' Directories (e.g., UTL, TST, etc.).",!
  1. Q
  1. ;
  1. VERSION() ;-- extrinsic - return current version.
  1. Q $P($T(+2^KMPSUTL),";",3)_"^"_$P($T(+2^KMPSUTL),";",5)
  1. ;
  1. PTCHINFO ; -- patch information: routine name ^ current version ^ current patch(es) ^ package namespace
  1. ;;KMPSGE^2.0^**1**^KMPS
  1. ;;KMPSLK^2.0^**1**^KMPS
  1. ;;KMPSUTL^2.0^**1**^KMPS
  1. ;;KMPSUTL1^2.0^**1**^KMPS
  1. ;;%ZOSVKSD^8.0^**121,197,268,456,568**^XU
  1. ;;%ZOSVKSE^8.0^**90,94,197,268,456,568**^XU
  1. ;;%ZOSVKSS^8.0^**90,94,197,268,456**^XU