ENPRP ;(WIRMFO)/DH/SAB-Project Progress Reports ;6/11/97
;;7.0;ENGINEERING;**18,28**;Aug 17, 1993
SINGLE ; Print one project (current reports only)
S DIC="^ENG(""PROJ"",",DIC(0)="AEQM" D ^DIC K DIC G:Y'>0 SINGLEX
S ENDA=+Y
S DIR(0)="S^1:FIRST PAGE;2:SECOND PAGE;B:BOTH PAGES"
S DIR("A")="PRINT WHICH PAGES:",DIR("B")="B"
D ^DIR K DIR G:$D(DIRUT) SINGLEX
S ENOPT=Y
S %ZIS="QM" D ^%ZIS G:POP SINGLEX
I $D(IO("Q")) D G SINGLEX
. S ZTDESC="Print Project Report (10-0051)",ZTRTN="SINGLEQ^ENPRP"
. S ZTSAVE("ENDA")="",ZTSAVE("ENOPT")=""
. D ^%ZTLOAD,HOME^%ZIS K ZTSK
SINGLEQ ; Queued entry point for Display one project
U IO
S X="IOINLOW;IOINHI;IOINORM" D ENDR^%ZISS
S (END,ENPG)=0 S ENDT=$$FMTE^XLFDT($$NOW^XLFDT)
D ^ENPRP1
W IOINORM
D ^%ZISC
D KILL^%ZISS
I $D(ZTQUEUED) S ZTREQ="@" Q
I $E(IOST,1,2)="C-" G SINGLE
SINGLEX ; Exit for Display one project
K DIROUT,DIRUT,DTOUT,DUOUT,X,Y
K END,ENDA,ENDT,ENOPT,ENPG
Q
;
ALL ;Print all projects (current reports)
S DIR(0)="S^1:FIRST PAGE;2:SECOND PAGE;B:BOTH PAGES"
S DIR("A")="PRINT WHICH PAGES:",DIR("B")="B"
D ^DIR K DIR G:$D(DIRUT) ALLX
S ENOPT=Y
S %ZIS="QM" D ^%ZIS Q:POP
I $D(IO("Q")) D G ALLX
. S ZTDESC="Print All Project Reports (10-0051)",ZTRTN="ALLQ^ENPRP"
. S ZTSAVE("ENOPT")=""
. D ^%ZTLOAD,HOME^%ZIS K ZTSK Q
ALLQ ; Queued entry point for Display all projects
U IO
S X="IOINLOW;IOINHI;IOINORM" D ENDR^%ZISS
S (END,ENPG)=0 S ENDT=$$FMTE^XLFDT($$NOW^XLFDT)
S ENPN="" F S ENPN=$O(^ENG("PROJ","B",ENPN)) Q:ENPN="" D Q:END
. S ENDA=0 F S ENDA=$O(^ENG("PROJ","B",ENPN,ENDA)) Q:'ENDA D:$P($G(^ENG("PROJ",ENDA,0)),U,5)="Y" ^ENPRP1 Q:END
W IOINORM
I 'END,$E(IOST,1,2)="C-" S DIR(0)="E" D ^DIR K DIR
D ^%ZISC
D KILL^%ZISS
I $D(ZTQUEUED) S ZTREQ="@" Q
ALLX ; Exit for Display all projects
K DIROUT,DIRUT,DTOUT,DUOUT,X,Y
K END,ENDA,ENDT,ENOPT,ENPG
Q
;
;ENPRP
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HENPRP 1912 printed Dec 13, 2024@01:55:22 Page 2
ENPRP ;(WIRMFO)/DH/SAB-Project Progress Reports ;6/11/97
+1 ;;7.0;ENGINEERING;**18,28**;Aug 17, 1993
SINGLE ; Print one project (current reports only)
+1 SET DIC="^ENG(""PROJ"","
SET DIC(0)="AEQM"
DO ^DIC
KILL DIC
if Y'>0
GOTO SINGLEX
+2 SET ENDA=+Y
+3 SET DIR(0)="S^1:FIRST PAGE;2:SECOND PAGE;B:BOTH PAGES"
+4 SET DIR("A")="PRINT WHICH PAGES:"
SET DIR("B")="B"
+5 DO ^DIR
KILL DIR
if $DATA(DIRUT)
GOTO SINGLEX
+6 SET ENOPT=Y
+7 SET %ZIS="QM"
DO ^%ZIS
if POP
GOTO SINGLEX
+8 IF $DATA(IO("Q"))
Begin DoDot:1
+9 SET ZTDESC="Print Project Report (10-0051)"
SET ZTRTN="SINGLEQ^ENPRP"
+10 SET ZTSAVE("ENDA")=""
SET ZTSAVE("ENOPT")=""
+11 DO ^%ZTLOAD
DO HOME^%ZIS
KILL ZTSK
End DoDot:1
GOTO SINGLEX
SINGLEQ ; Queued entry point for Display one project
+1 USE IO
+2 SET X="IOINLOW;IOINHI;IOINORM"
DO ENDR^%ZISS
+3 SET (END,ENPG)=0
SET ENDT=$$FMTE^XLFDT($$NOW^XLFDT)
+4 DO ^ENPRP1
+5 WRITE IOINORM
+6 DO ^%ZISC
+7 DO KILL^%ZISS
+8 IF $DATA(ZTQUEUED)
SET ZTREQ="@"
QUIT
+9 IF $EXTRACT(IOST,1,2)="C-"
GOTO SINGLE
SINGLEX ; Exit for Display one project
+1 KILL DIROUT,DIRUT,DTOUT,DUOUT,X,Y
+2 KILL END,ENDA,ENDT,ENOPT,ENPG
+3 QUIT
+4 ;
ALL ;Print all projects (current reports)
+1 SET DIR(0)="S^1:FIRST PAGE;2:SECOND PAGE;B:BOTH PAGES"
+2 SET DIR("A")="PRINT WHICH PAGES:"
SET DIR("B")="B"
+3 DO ^DIR
KILL DIR
if $DATA(DIRUT)
GOTO ALLX
+4 SET ENOPT=Y
+5 SET %ZIS="QM"
DO ^%ZIS
if POP
QUIT
+6 IF $DATA(IO("Q"))
Begin DoDot:1
+7 SET ZTDESC="Print All Project Reports (10-0051)"
SET ZTRTN="ALLQ^ENPRP"
+8 SET ZTSAVE("ENOPT")=""
+9 DO ^%ZTLOAD
DO HOME^%ZIS
KILL ZTSK
QUIT
End DoDot:1
GOTO ALLX
ALLQ ; Queued entry point for Display all projects
+1 USE IO
+2 SET X="IOINLOW;IOINHI;IOINORM"
DO ENDR^%ZISS
+3 SET (END,ENPG)=0
SET ENDT=$$FMTE^XLFDT($$NOW^XLFDT)
+4 SET ENPN=""
FOR
SET ENPN=$ORDER(^ENG("PROJ","B",ENPN))
if ENPN=""
QUIT
Begin DoDot:1
+5 SET ENDA=0
FOR
SET ENDA=$ORDER(^ENG("PROJ","B",ENPN,ENDA))
if 'ENDA
QUIT
if $PIECE($GET(^ENG("PROJ",ENDA,0)),U,5)="Y"
DO ^ENPRP1
if END
QUIT
End DoDot:1
if END
QUIT
+6 WRITE IOINORM
+7 IF 'END
IF $EXTRACT(IOST,1,2)="C-"
SET DIR(0)="E"
DO ^DIR
KILL DIR
+8 DO ^%ZISC
+9 DO KILL^%ZISS
+10 IF $DATA(ZTQUEUED)
SET ZTREQ="@"
QUIT
ALLX ; Exit for Display all projects
+1 KILL DIROUT,DIRUT,DTOUT,DUOUT,X,Y
+2 KILL END,ENDA,ENDT,ENOPT,ENPG
+3 QUIT
+4 ;
+5 ;ENPRP