51 lines
3.1 KiB
Mathematica
51 lines
3.1 KiB
Mathematica
|
PRCFQ ;WISC@ALTOONA/CTB/ID/RSD/BOISE/TKW/DL-QUE PRINTOUTS ;1/23/98 1400
|
||
|
V ;;5.1;IFCAP;;Oct 20, 2000
|
||
|
;Per VHA Directive 10-93-142, this routine should not be modified.
|
||
|
;IF PRCFQ("FORCEQ") IS DEFINED ROUTINE WILL FORCE %ZTLOAD
|
||
|
K IOP,ZTSK G:$D(ZTIO) TIME W:$D(PRCFQ("FORCEQ")) !,"QUEUE TO PRINT ON:" S %ZIS("B")="",%ZIS="NQ" D ^%ZIS I POP W " <No Device Selected>",$C(7),! R X:2 S NODEV="" G EXIT
|
||
|
S (PRIOP,IOP)=ION_";"_IOST_";"_IOM_";"_IOSL I IO=IO(0),'$D(PRCFQ("FORCEQ")),'$D(IO("Q")) D ^%ZIS,HILO,@ZTRTN,CLOSE G EXIT
|
||
|
TIME I '$D(ZTDTH) D DQTIME I '% D CLOSE W:(IOM-$X)<20 ! W " <Nothing Queued>",$C(7) S NODEV="" G EXIT
|
||
|
D HILO S (ZTSAVE("DUZ"),ZTSAVE("PRIOP"),ZTSAVE("IOIN*"))="" D ^%ZTLOAD,CLOSE W:(IOM-$X)<20 ! W " <Request Queued>",$C(7),!
|
||
|
EXIT K %ZIS,I,IO("Q"),IOP,K,N,PRIOP,PRCFL,PRCFQ G ZTKILL
|
||
|
CLOSE D ^%ZISC Q
|
||
|
DQTIME S U="^",%=1 K ZTDTH W !,"Enter DATE & TIME to ",$S('$D(ZTIO):"print",ZTIO]"":"print",1:"run"),". NOW// " R X:$S($D(DTIME):DTIME,1:30) I X[U!('$T) S %=0 K X Q
|
||
|
S:X="" X="NOW" S %DT="ER" D ^%DT S %=0 I Y<0 G DQTIME
|
||
|
S X=Y D H^%DTC S Y=Y_"000",ZTDTH=%H_","_($E(Y,9,10)*60+$E(Y,11,12)*60),%=1
|
||
|
K %DT,%H,%Y,X,Y Q
|
||
|
MSG ;;PRINTS MESSAGE CONTAINED IN X. IF IT DOESNT FIT ON ONE LINE, X IS PRINTED ON THE NEXT LINE.
|
||
|
N X1,X2,ZX Q:'$D(X) I $S('$D(IOM):1,IOM="":1,1:0) W $P(X,"*") R X:2 K X Q
|
||
|
I ($L($P(X,"*"))+4+$X)>IOM W !,?(IOM-($L($P(X,"*"))+4))
|
||
|
F ZX=1:1 D BRK:($L(X)+6)>IOM W " ",$P(X,"*"),! Q:'$D(X1) S X=X1 K X1
|
||
|
W:X["*" $C(7)
|
||
|
Q
|
||
|
BRK N I
|
||
|
S X1=X F I=1:1 Q:$L($P(X," ",1,I))>(IOM-6)!($L(X)<(IOM-6)) S X1=$P(X," ",1,I)
|
||
|
S X2=$P(X," ",I,999),X=X1,X1=X2 K X2 Q
|
||
|
PAUSE ; MAKES TERMINAL PAUSE WHEN DISPLAYING DATA ONLINE
|
||
|
S %=1 W !!,"Press RETURN to continue or '^' to quit: " R X:DTIME S:'$T!(X["^") %=0 Q
|
||
|
ENCON W !," ** Press RETURN to Continue **" R X:DTIME Q
|
||
|
DIKILL ; KILL STANDARD FILE MANAGER VARIABLES
|
||
|
K %,%DT,%X,%Y,BY,D,DA,DCC,DIC,DIE,DIJ,DIPT,DP,DR,D0,D1,D2,DQ,DHD,DLAYGO,F,FLDS,FR,I,IOX,IOY,J,K,L,O,P,POP,W,X,Y,Z,ZTSK Q
|
||
|
DIWKILL ; KILL FILE MANAGER WORD PROCESSING VARIABLES
|
||
|
K DIW,DIWF,DIWI,DIWL,DIWR,DIWT,DIWTC,DIWX,DWLW,X1 Q
|
||
|
ZTKILL ; KILL VARIABLES USED BY UNIVERSAL TASK MANAGER
|
||
|
K %ZIS,POP,ZTRTN,ZTUCI,ZTDTH,ZTSAVE,ZTDESC,ZTIO,ZTSK,ZTSKT Q
|
||
|
CNVD ; CONVERTS DATE FROM INTERNAL (YYYMMDD) STORAGE FORMAT TO MM/DD/YY
|
||
|
S (Y,%X)="" I X]"" S Y=$E(X,4,5)_"/"_$E(X,6,7)_"/"_$E(X,2,3) S %X=Y_$S(X[".":" "_$E($P(X,".",2)_"0000",1,2)_":"_$E($P(X,".",2)_"0000",3,4),1:"")
|
||
|
Q
|
||
|
NOW S %=$$NOW^XLFDT,%X=$$FMTE^XLFDT(%),X=%\1,Y=$P(%X,"@") Q
|
||
|
; Original code from NOW:
|
||
|
;N %H,%I,%M,%D,%Y S %H=$H D TT S %=$P($H,",",2),%=%#3600\60/100+(%\3600)/100,%=X_$S(%:%,1:"") S Y=% D D S %X=Y S Y=X D D Q
|
||
|
TT ;D 7 S %I(1)=%M,%I(2)=%D,%I(3)=%Y Q
|
||
|
7 ;S %=%H>21608+%H-.1,%Y=%\365.25+141,%=%#365.25\1
|
||
|
;S %D=%+306#(%Y#4=0+365)#153#61#31+1,%M=%-%D\29+1
|
||
|
;S X=%Y_"00"+%M_"00"+%D Q
|
||
|
Q
|
||
|
D ;CONVERTS FILEMAN INTERNAL DATE TO EXTERNAL FORMAT
|
||
|
S:Y Y=$S($E(Y,4,5):$P("JAN^FEB^MAR^APR^MAY^JUN^JUL^AUG^SEP^OCT^NOV^DEC","^",+$E(Y,4,5))_" ",1:"")_$S($E(Y,6,7):+$E(Y,6,7)_",",1:"")_($E(Y,1,3)+1700)_$P("@"_$E(Y_0,9,10)_":"_$E(Y_"000",11,12),"^",Y[".")
|
||
|
Q
|
||
|
HILO I $D(IOST)["0" S IOP=$S($D(ION):ION,1:IO(0)) D ^%ZIS K IOP,POP
|
||
|
S X="IOINHI;IOINLOW;IOINORM" D ENDR^%ZISS
|
||
|
Q
|
||
|
;
|