source: FOIAVistA/tag/r/IFCAP-PRC-PRX--PRCA--PRCN/PRCFQ.m@ 1742

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

initial load of FOIAVistA 6/30/08 version

File size: 3.1 KB
Line 
1PRCFQ ;WISC@ALTOONA/CTB/ID/RSD/BOISE/TKW/DL-QUE PRINTOUTS ;1/23/98 1400
2V ;;5.1;IFCAP;;Oct 20, 2000
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;IF PRCFQ("FORCEQ") IS DEFINED ROUTINE WILL FORCE %ZTLOAD
5 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
6 S (PRIOP,IOP)=ION_";"_IOST_";"_IOM_";"_IOSL I IO=IO(0),'$D(PRCFQ("FORCEQ")),'$D(IO("Q")) D ^%ZIS,HILO,@ZTRTN,CLOSE G EXIT
7TIME I '$D(ZTDTH) D DQTIME I '% D CLOSE W:(IOM-$X)<20 ! W " <Nothing Queued>",$C(7) S NODEV="" G EXIT
8 D HILO S (ZTSAVE("DUZ"),ZTSAVE("PRIOP"),ZTSAVE("IOIN*"))="" D ^%ZTLOAD,CLOSE W:(IOM-$X)<20 ! W " <Request Queued>",$C(7),!
9EXIT K %ZIS,I,IO("Q"),IOP,K,N,PRIOP,PRCFL,PRCFQ G ZTKILL
10CLOSE D ^%ZISC Q
11DQTIME 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
12 S:X="" X="NOW" S %DT="ER" D ^%DT S %=0 I Y<0 G DQTIME
13 S X=Y D H^%DTC S Y=Y_"000",ZTDTH=%H_","_($E(Y,9,10)*60+$E(Y,11,12)*60),%=1
14 K %DT,%H,%Y,X,Y Q
15MSG ;;PRINTS MESSAGE CONTAINED IN X. IF IT DOESNT FIT ON ONE LINE, X IS PRINTED ON THE NEXT LINE.
16 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
17 I ($L($P(X,"*"))+4+$X)>IOM W !,?(IOM-($L($P(X,"*"))+4))
18 F ZX=1:1 D BRK:($L(X)+6)>IOM W " ",$P(X,"*"),! Q:'$D(X1) S X=X1 K X1
19 W:X["*" $C(7)
20 Q
21BRK N I
22 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)
23 S X2=$P(X," ",I,999),X=X1,X1=X2 K X2 Q
24PAUSE ; MAKES TERMINAL PAUSE WHEN DISPLAYING DATA ONLINE
25 S %=1 W !!,"Press RETURN to continue or '^' to quit: " R X:DTIME S:'$T!(X["^") %=0 Q
26ENCON W !," ** Press RETURN to Continue **" R X:DTIME Q
27DIKILL ; KILL STANDARD FILE MANAGER VARIABLES
28 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
29DIWKILL ; KILL FILE MANAGER WORD PROCESSING VARIABLES
30 K DIW,DIWF,DIWI,DIWL,DIWR,DIWT,DIWTC,DIWX,DWLW,X1 Q
31ZTKILL ; KILL VARIABLES USED BY UNIVERSAL TASK MANAGER
32 K %ZIS,POP,ZTRTN,ZTUCI,ZTDTH,ZTSAVE,ZTDESC,ZTIO,ZTSK,ZTSKT Q
33CNVD ; CONVERTS DATE FROM INTERNAL (YYYMMDD) STORAGE FORMAT TO MM/DD/YY
34 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:"")
35 Q
36NOW S %=$$NOW^XLFDT,%X=$$FMTE^XLFDT(%),X=%\1,Y=$P(%X,"@") Q
37 ; Original code from NOW:
38 ;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
39TT ;D 7 S %I(1)=%M,%I(2)=%D,%I(3)=%Y Q
407 ;S %=%H>21608+%H-.1,%Y=%\365.25+141,%=%#365.25\1
41 ;S %D=%+306#(%Y#4=0+365)#153#61#31+1,%M=%-%D\29+1
42 ;S X=%Y_"00"+%M_"00"+%D Q
43 Q
44D ;CONVERTS FILEMAN INTERNAL DATE TO EXTERNAL FORMAT
45 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[".")
46 Q
47HILO I $D(IOST)["0" S IOP=$S($D(ION):ION,1:IO(0)) D ^%ZIS K IOP,POP
48 S X="IOINHI;IOINLOW;IOINORM" D ENDR^%ZISS
49 Q
50 ;
Note: See TracBrowser for help on using the repository browser.