source: WorldVistAEHR/trunk/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGODDEL.m@ 1064

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

initial load of WorldVistAEHR

File size: 2.3 KB
RevLine 
[613]1DGODDEL ;ALB/EG - PURGE DISCRETIONARY WORKLOAD ; APR 24, 1989
2 ;;5.3;Registration;;Aug 13, 1993
3 W !!,*7,"DISCRETIONARY WORKLOAD OPTIONS ARE NO LONGER AVAILABLE!",!! Q
4 ;;V 4.5
5EN S DGDB=0,U="^" R !,"Purge single (M)onth or (A)ll or (^ to quit): MONTH// ",DGQQ:DTIME G:'$T END S DGQQ=$S(DGQQ'="":$E(DGQQ,1,1),1:"M") I DGQQ="?" D HLP G EN
6 Q:"Q^"[DGQQ I "MA"'[DGQQ W *7 G END
7 I DGQQ="A" D BG G:%=2 END W !,?1,"SITE",?10,"REPORT",?20,"MONTH/YR",?30,"RUN DATE",! D:%=1 DST
8 I DGQQ="M" D STH Q:Y<0 D BG G:%=2 END W !,?1,"SITE",?10,"REPORT",?20,"MONTH/YR",?30,"RUN DATE",! S DGDT=Y D:(%=1) D0
9END W:DGDB=0 !,"Nothing purged, all your data is current"
10 K DGA,DGDA,DGDB,DGDT,DGDV,DGI,DGJ,DGK,DGQQ,DGREP,DIC,DIC(0),DIC("S")
11 Q
12DST S DGDT="" F DGA=0:0 S DGDT=$O(^VAT(408,"AE",DGDT)) Q:DGDT="" D D0
13 Q
14D0 Q:$D(^VAT(408,"AD",1,DGDT))>0 S DGDV="" F DGI=0:0 S DGDV=$O(^VAT(408,"AE",DGDT,DGDV)) Q:DGDV="" D D1
15 Q
16D1 S DGREP="" F DGJ=0:0 S DGREP=$O(^VAT(408,"AE",DGDT,DGDV,DGREP)) Q:DGREP="" D D2
17 Q
18D2 S DGDA="" F DGK=0:0 S DGDA=$O(^VAT(408,"AE",DGDT,DGDV,DGREP,DGDA)) Q:DGDA="" I $O(^VAT(408,"AE",DGDT,DGDV,DGREP,DGDA))'="" D D3
19 Q
20D3 ;does deletion using ^DIK
21 W !,?1,DGDV,?10,DGREP,?20,DGDT,?30,DGDA
22 S DGDB=1,DIK="^VAT(408,",DA=DGDA D ^DIK K DIK,DA W ?50,"...deleted"
23 Q
24STH ;select entries to purge
25 S U="^",DIC="^VAT(408,",DIC(0)="AEM",D="C",DZ="?" D DQ^DICQ K DO
26 S %DT="PANE",%DT("A")="Select MONTH/YEAR to PURGE: " D ^%DT
27 Q:Y<0
28 I (+$E(Y,6,7)>0)!($D(^VAT(408,"C",Y))=0) W !!,*7,"SELECT ENTRY FROM LIST IN MONTH/YEAR FORMAT.",!,"IF JANUARY 1988 WAS LISTED YOU WOULD ENTER 01/88",! G STH
29 Q
30BG S %=2 W !,"ARE YOU SURE YOU WISH TO PURGE YOUR FILE " D YN^DICN S:(%<0)!(%=2) %=2
31 Q
32HLP ;
33 F I=0:1 Q:$F($T(HLPT+I),";;")=0 W !,$P($T(HLPT+I),";;",2)
34 Q
35HLPT ;;MONTHLY will allow you to select a specific MONTH/YR to purge
36 ;;ALL will purge your entire file, leaving only the most recent
37 ;;generation for each month.
38 ;;
39 ;;This option will allow you to purge entries in your file up to but
40 ;;not including your most recent. If you have generated OCT 88 in
41 ;;Nov, Dec, and Jan you will have 3 entries in your file corresponding
42 ;;to OCT workload. Say you generate OCT again in Feb 89 and purge
43 ;;by using this option, Nov through Jan will be purged and you will
44 ;;only have the most recent run remaining. We recommend the use of
45 ;;this option to keep your files small and tidy.
46 ;;
Note: See TracBrowser for help on using the repository browser.