source: WorldVistAEHR/trunk/r/MENTAL_HEALTH-YS-RUCL-YI-YT/YSJOBK.m@ 724

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

initial load of WorldVistAEHR

File size: 900 bytes
Line 
1YSJOBK ;SLC/TGA-DELETES OLD JOBS FROM JOB BANK ; 12/2/88 09:15 ;
2 ;;5.01;MENTAL HEALTH;;Dec 30, 1994
3 ;
4 ; Called from the top by MENU option YSJOBKILL
5 ;
61 ;
7 S C=0 W !!,$C(7),"This option will PURGE old entries.",!,"Are you usre you wish to use this option now" S %=2 D YN^DICN I %=2!(%<0) G END
8 I '% G 1
92 ;
10 S %DT("A")="DELETE JOBS THROUGH WHICH LISTING DATE: ",%DT="AEPX" D ^%DT G:Y<1 1 S D=Y
113 ;
12 W !,"I WILL DELETE ALL JOBS LISTED THROUGH " S Y=D D DD^%DT W Y R " OK? N// ",X:DTIME S YSTOUT='$T,YSUOUT=X["^" G:YSTOUT!YSUOUT END G:"Nn^"[$E(X) 1 I "Yy"'[$E(X) W $C(7) G 3
13 S I=0 F S I=$O(^YSG("JOB","AC",I)) Q:'I!(I>D) S J=0 F S J=$O(^YSG("JOB","AC",I,J)) Q:'J S N=$P($G(^YSG("JOB",J,0)),U) K ^YSG("JOB",J),^YSG("JOB","B",N,J),^YSG("JOB","AC",I,J) S C=C+1
14 I C>0 S X=$P(^YSG("JOB",0),U,4),X=$S(X-C>0:X-C,1:0),^(0)=$P(^(0),U,1,3)_"^"_X
15END ;
16 W !!,C," JOBS DELETED" K %DT,C,D,I,J,N,X,Y Q
Note: See TracBrowser for help on using the repository browser.