| 1 | SCMCRU ;ALB/REW - PCMM Report Utilities ; 9 Feb 1996
|
---|
| 2 | ;;5.3;Scheduling;**41**;AUG 13, 1993
|
---|
| 3 | ;FORM FEED & STOPPING UTILITIES
|
---|
| 4 | FIRST() ;First heading of report
|
---|
| 5 | ; RETURNS STOP; 0=GO,1=STOP
|
---|
| 6 | N STOP
|
---|
| 7 | D STOPCHK
|
---|
| 8 | D:$G(STOP) STOPPED
|
---|
| 9 | I '$G(STOP),$E($G(IOST),1,2)="C-" W @IOF
|
---|
| 10 | Q $G(STOP)
|
---|
| 11 | ;
|
---|
| 12 | SUBSEQ() ;enter for further headings of report
|
---|
| 13 | ; RETURNS STOP; 0=GO,1=STOP
|
---|
| 14 | N STOP,DIR,X,Y
|
---|
| 15 | D STOPCHK
|
---|
| 16 | I $E($G(IOST),1,2)="C-" S DIR(0)="E" D ^DIR S:$D(DIRUT) STOP=1
|
---|
| 17 | D:$G(STOP) STOPPED
|
---|
| 18 | I '$G(STOP) W @IOF
|
---|
| 19 | Q $G(STOP)
|
---|
| 20 | ;
|
---|
| 21 | STOPCHK I $D(ZTQUEUED),$$S^%ZTLOAD S (ZTSTOP,STOP)=1
|
---|
| 22 | Q
|
---|
| 23 | STOPPED ;
|
---|
| 24 | W !?5,"------------- Report stopped at user's request ------------"
|
---|
| 25 | K ZTREQ
|
---|
| 26 | Q
|
---|
| 27 | ENDREP I $E(IOST,1,2)'["C-" W:$Y&'$D(IONOFF) @IOF Q
|
---|
| 28 | ;
|
---|
| 29 | FOOTER ;
|
---|
| 30 | ; print SCFOOT
|
---|
| 31 | ;RETURNS SCSTOP=1 IF STOP CALLED FOR
|
---|
| 32 | S SCPAGE=$G(SCPAGE)+1
|
---|
| 33 | F I=$Y:1:$S($D(IOSL):(IOSL-5),1:61) W !
|
---|
| 34 | W !,$G(SCFOOT),?66,"PAGE: ",SCPAGE
|
---|
| 35 | S SCSTOP=$$SUBSEQ
|
---|
| 36 | I SCSTOP D STOPPED
|
---|
| 37 | Q
|
---|
| 38 | HEADER ;
|
---|
| 39 | ; prints SCHEAD
|
---|
| 40 | W !,$G(SCHEAD)
|
---|
| 41 | Q
|
---|
| 42 | WAIT I $E(IOST)="C" S DIR(0)="E" D ^DIR S:'Y SCSTOP=1
|
---|
| 43 | Q
|
---|
| 44 | ;
|
---|
| 45 | OUT(LINE,FORMAT) ;
|
---|
| 46 | W:$D(FORMAT) @FORMAT
|
---|
| 47 | W $G(LINE)
|
---|
| 48 | I $Y>(IOSL-4) D FOOTER D HEADER
|
---|
| 49 | QTOUT Q
|
---|
| 50 | ;
|
---|
| 51 | DDNAME(FILE,FIELD) ;return the fieldname
|
---|
| 52 | N SCX
|
---|
| 53 | D FIELD^DID(FILE,FIELD,"","LABEL","SCX")
|
---|
| 54 | Q $G(SCX("LABEL"))
|
---|
| 55 | ;
|
---|