source: WorldVistAEHR/trunk/r/NOIS-FSC/FSCRUDQ.m@ 931

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

initial load of WorldVistAEHR

File size: 3.1 KB
Line 
1FSCRUDQ ;SLC/STAFF-NOIS Report Utility Dequeued ;6/16/95 14:35
2 ;;1.1;NOIS;;Sep 06, 1998
3 ;
4DQPT ;
5 N CNT,HDR,LINE,OK,PAGE,TOTPAGE K HDR
6 D
7 .I $G(PAGEBRK) D PAGE Q
8 .D ALL
9 I $D(ZTQUEUED) D CLEANUP^FSCOPTU
10 Q
11 ;
12DQPS ;
13 N BG,CNT,LINE,LINECNT,LINES,OK,PAGE,TITLE,TOTPAGE
14 U IO I $D(ZTQUEUED) S ZTREQ="@"
15 S BG=$G(VALMBG,1),LINES=$G(VALM("LINES"),16),TITLE=$G(VALM("TITLE"),"NOIS")
16 S PAGE=(BG\LINES)+((BG#LINES)>0),LINECNT=+$P(@VALMAR,U,2),TOTPAGE=(LINECNT\LINES)+((LINECNT#LINES)>0)
17 S LINECNT=0 I IOST["C-" W @IOF
18 S LINECNT=LINECNT+1 W !,TITLE,?28,$$FMTE^XLFDT($$NOW^XLFDT)," Page: ",PAGE," of ",$J(TOTPAGE,6)
19 S LINE=0 F S LINE=$O(VALMHDR(LINE)) Q:LINE<1 S LINECNT=LINECNT+1 W !,VALMHDR(LINE)
20 S LINECNT=LINECNT+1 W !,VALMCAP
21 S LINECNT=LINECNT+1,LINE="",$P(LINE,"-",79)="" W !,LINE
22 S CNT=0,LINE=BG-1 F S LINE=$O(@VALMAR@(LINE)) Q:LINE<1 S CNT=CNT+1 Q:CNT>LINES S LINECNT=LINECNT+1 W !,$E(@VALMAR@(LINE,0),1,79)
23 I IOST["C-" D
24 .F S LINECNT=LINECNT+1 Q:LINECNT>25 W ! I $Y'<(IOSL-2) Q
25 .D PAUSE^FSCU(.OK)
26 I $D(ZTQUEUED) D CLEANUP^FSCOPTU
27 Q
28 ;
29DQ ;
30 D SETUP^FSCRPTS I $D(VALMQUIT) Q
31 N CNT,HDR,LINE,OK,PAGE,TOTPAGE K HDR
32 S LISTREF=VALMAR,LISTSEL="VVALUES" M FSCFMT=FSCSTYLE D ENTRY^FSCLMV,HEADER^FSCLMV
33 D
34 .I $G(PAGEBRK) D PAGE Q
35 .D ALL
36 I $D(ZTQUEUED) D CLEANUP^FSCOPTU
37 Q
38 ;
39ALL ;
40 D SETUP(+$P(@VALMAR,U,2),.HDR,.TOTPAGE)
41 U IO I $D(ZTQUEUED) S ZTREQ="@"
42 I '$O(@VALMAR@(0)) S (CNT,PAGE)=0 D HEADER(.PAGE,.HDR,.CNT,.OK) W !!,"No calls to view." Q
43 S OK=1,(CNT,PAGE,LINE)=0 F S LINE=$O(@VALMAR@(LINE)) Q:LINE<1 D I 'OK Q
44 .I CNT=0 D HEADER(.PAGE,.HDR,.CNT,.OK) I 'OK Q
45 .S CNT=CNT+1 W !,$E($G(@VALMAR@(LINE,0)),1,79)
46 .I $Y'<(IOSL-2) S CNT=0 I IOST["C-" D PAUSE^FSCU(.OK)
47 I CNT D
48 .F S CNT=CNT+1 Q:CNT>25 W ! I $Y'<(IOSL-2) Q
49 .I IOST["C-" D PAUSE^FSCU(.OK)
50 Q
51 ;
52PAGE ;
53 D SETUP(+$P(@VALMAR,U,2),.HDR,.TOTPAGE)
54 U IO I $D(ZTQUEUED) S ZTREQ="@"
55 I '$O(@VALMAR@(0)) S (CNT,PAGE)=0 D HEADER(.PAGE,.HDR,.CNT,.OK) W !!,"No calls to view." Q
56 N DIVIDER S DIVIDER="",$P(DIVIDER,"=",80)=""
57 S OK=1,(CNT,PAGE,LINE)=0 F S LINE=$O(@VALMAR@(LINE)) Q:LINE<1 D I 'OK Q
58 .I CNT=0 D HEADER(.PAGE,.HDR,.CNT,.OK) I 'OK Q
59 .S CNT=CNT+1 W !,$E($G(@VALMAR@(LINE,0)),1,79)
60 .I $G(@VALMAR@(LINE,0))=DIVIDER D Q
61 ..F S CNT=CNT+1 Q:CNT>25 W ! I $Y'<(IOSL-2) Q
62 ..S CNT=0 I IOST["C-" D PAUSE^FSCU(.OK)
63 .I $Y'<(IOSL-2) S CNT=0 I IOST["C-" D PAUSE^FSCU(.OK)
64 I CNT D
65 .F S CNT=CNT+1 Q:CNT>25 W ! I $Y'<(IOSL-2) Q
66 .I IOST["C-" D PAUSE^FSCU(.OK)
67 Q
68 ;
69SETUP(LINECNT,HDR,TOTPAGE) ;
70 N CNT,LINE K HDR
71 S CNT=1,LINE=0 F S LINE=$O(VALMHDR(LINE)) Q:LINE<1 S CNT=CNT+1,HDR(CNT)=VALMHDR(LINE)
72 I $L($G(VALMCAP)) S CNT=CNT+1,HDR(CNT)=VALMCAP
73 S CNT=CNT+1,HDR(CNT)="",$P(HDR(CNT),"-",79)=""
74 S TOTPAGE=(LINECNT\(IOSL-CNT-2))+((LINECNT#(IOSL-CNT-2))>0)
75 S HDR(1)=$$SETSTR^VALM1($$FMTE^XLFDT($$NOW^XLFDT)_" Page:@@@@@@"_$S('$G(PAGEBRK):" of "_$J(TOTPAGE,6),1:""),$G(VALM("TITLE"),"NOIS"),30,51)
76 Q
77 ;
78HEADER(PAGE,HDR,CNT,OK) ;
79 N LINE S OK=1,PAGE=PAGE+1
80 W:'(PAGE=1&(IOST'["C-")) @IOF W $$REPLACE^FSCRU(HDR(1),"@@@@@@",$J(PAGE,6))
81 S LINE=1 F S LINE=$O(HDR(LINE)) Q:LINE<1 S CNT=CNT+1 W !,HDR(LINE)
82 I $$S^%ZTLOAD S OK=0,ZTSTOP=1 W !!,"Report has been stopped.",!
83 Q
Note: See TracBrowser for help on using the repository browser.