source: WorldVistAEHR/trunk/r/SAGG_PROJECT-A1B5-KMPS/KMPSUTL.m@ 841

Last change on this file since 841 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 3.0 KB
Line 
1KMPSUTL ;OAK/KAK - SAGG Utilities ;5/1/07 10:30
2 ;;2.0;SAGG;;Jul 02, 2007
3 ;
4CURSTAT(STAT) ;-- current status
5 ;---------------------------------------------------------------------
6 ; input: STAT (optional) = data from $$TSKSTAT^KMPSUTL1
7 ; output: See codes below
8 ;---------------------------------------------------------------------
9 ;
10 N RESULT,SITNUM,STRTDT
11 ;
12 S RESULT="",SITNUM=^DD("SITE",1),STRTDT=$G(^XTMP("KMPS",SITNUM,0))
13 ;
14 I $D(^XTMP("KMPS","ERROR")) Q "6^ERRORS RECORDED"
15 I $D(^XTMP("KMPS","STOP")) Q "7^STOPPING"
16 I $D(^XTMP("KMPS","START")) L +^XTMP("KMPS"):0 I $T L -^XTMP("KMPS") Q "5^DID NOT COMPLETE"
17 I +STRTDT I +$H-STRTDT>2 Q "5^DID NOT COMPLETE"
18 I +STRTDT I +$H-STRTDT>1 Q "4^RUNNING TOO LONG"
19 I $D(^XTMP("KMPS","START")) Q "0^RUNNING"
20 I $D(STAT) Q $P(STAT,U,1,2)
21 E Q "3^NOT RUNNING"
22 Q "9^UNKNOWN"
23 ;
24STOP ;-- stop SAGG collection routines
25 ;
26 N DIR,X,Y
27 ;
28 I '$D(^XTMP("KMPS","START")) D Q
29 .W !!,?5,"The SAGG Project collection routines are not running.",!
30 E W !!,"Current status of SAGG is ",$P($$CURSTAT(),U,2),!
31 S DIR("A")="Do you wish to manually STOP the SAGG Project collection routines (Y/N)",DIR("B")="N",DIR(0)="Y"
32 D ^DIR W !
33 I Y D
34 .S ^XTMP("KMPS","STOP")=1
35 .W !,?5,"The SAGG Project collection routines have been notified to begin an"
36 .W !,?5,"orderly shut-down process.",!
37 Q
38 ;
39FILE ;-- modifies data in the SAGG PROJECT file #8970.1
40 ;
41 N DA,DIC,DIE,DLAYGO,DR,PLTFRM,X
42 ;
43 S PLTFRM=$$MPLTF^KMPSUTL1
44 W !!,"Specify the Directories"
45 W " which hold your VistA production globals.",!!,"For example:",!!,?5
46 I PLTFRM="CWINNT" W "Cache for Windows NT => W:\VAA, W:\VBB, W:\VCC ... V:\Vxx"
47 I PLTFRM="CVMS" W "Cache for OpenVMS => _$1$DKAn:[CACHSYS.VAA] ... _$1$DKAx:[CACHSYS.Vxx]"
48 I PLTFRM="UNK" W "Specify all locations of VistA globals"
49 W !!,"Do NOT specify 'test/training' Directories, (i.e., UTL,TST, etc.).",!
50 S DIE="^KMPS(8970.1,",DA=1,DR=.03
51 S:PLTFRM'="DSM" DR(2,8970.11)=.01
52 D ^DIE
53 ;
54 Q
55 ;
56HELP ;-- extended help for SAGG PROJECT file VOLUME SET TO MONITOR (.01) field
57 ;
58 N PLTFRM
59 ;
60 S PLTFRM=$$MPLTF^KMPSUTL1 Q:PLTFRM="UNK"
61 W !," This field will contain the name of the Directories that the site wants"
62 W !," to monitor with the SAGG Project collection routines. The site should"
63 W !," specify only the Directories which hold their VistA production globals:"
64 W !!
65 W " For example:",!!
66 I PLTFRM="CWINNT" W " Cache for Windows NT => W:\VAA, W:\VBB, W:\VCC ... V:\Vxx",!!
67 I PLTFRM="CVMS" W " Cache for OpenVMS => _$1$DKAn:[CACHSYS.VAA] ... _$1$DKAx:[CACHSYS.Vxx]",!!
68 W " Do NOT specify 'test/training' Directories (e.g., UTL, TST, etc.).",!
69 Q
70 ;
71VERSION() ;-- extrinsic - return current version.
72 Q $P($T(+2^KMPSUTL),";",3)_"^"_$P($T(+2^KMPSUTL),";",5)
73 ;
74PTCHINFO ; -- patch information: routine name ^ current version ^ current patch(es) ^ package namespace
75 ;;KMPSGE^2.0^^KMPS
76 ;;KMPSLK^2.0^^KMPS
77 ;;KMPSUTL^2.0^^KMPS
78 ;;KMPSUTL1^2.0^^KMPS
79 ;;%ZOSVKSD^8.0^**121,197,268,456**^XU
80 ;;%ZOSVKSE^8.0^**90,94,197,268,456**^XU
81 ;;%ZOSVKSS^8.0^**90,94,197,268,456**^XU
Note: See TracBrowser for help on using the repository browser.