LRARCMR2 ;DALISC/CKA - ARCHIVED WKLD STATS REPORT - COMMENTS PRINT ; 5/22/95
;;5.2;LAB SERVICE;**59**;Aug 31, 1995
;same as LRCAPMR2 except archived wkld file
;
ASKCOM ;lrcm
R !!,"PRINT THE COMMENT PAGES? NO//",LRCM:DTIME
I '$T!(LRCM=U) S LREND=1 Q
I LRCM["?" W !,"Do you want to print comments? YES or NO.",! G ASKCOM
S LRCM=$S($E(LRCM,1)="Y"!($E(LRCM,1)="y"):1,1:0) W !
Q
COMM ;Called from LRARCMA2,LRARCML2,LRRP8C
Q:'+$G(LRCM)
N LRDAT,LRCC,LRGCN,LRCCN,LRDCN,LRCONT
D GENCOM Q:LREND
D CAPCOM Q:LREND
D DATCOM
Q
GENCOM ;
N LRHDR,LRHDR3
S LRGCN=0
S LRGCN=$O(^TMP("LRAR",$J,"GCOM",LRGCN))
Q:'LRGCN ;no general comments
S LRHDR="GENERAL WORKLOAD COMMENTS"
S LRHDR3="[Includes all archived workload data in date range]"
D HDR^LRARCU
S LRGCN=0
F S LRGCN=$O(^TMP("LRAR",$J,"GCOM",LRGCN)) Q:('LRGCN)!(LREND) D
. S LRCOMM=$G(^TMP("LRAR",$J,"GCOM",LRGCN))
. I $Y+6'<IOSL D NPG^LRARCU Q:LREND
. W !,LRCOMM,!
D:$E(IOST,1,2)="C-" PAUSE^LRARCU Q:LREND W @IOF
Q
CAPCOM ;
N LRHDR,LRHDR3
S LRCAPNAM=""
S LRCAPNAM=$O(^TMP("LRAR",$J,"CCOM",LRCAPNAM))
Q:LRCAPNAM="" ;no wkld code comments
S LRHDR="WORKLOAD COMMENTS by WKLD CODE"
S LRHDR3="[Includes all archived workload data in date range]"
D HDR^LRARCU
S LRCAPNAM=""
F S LRCAPNAM=$O(^TMP("LRAR",$J,"CCOM",LRCAPNAM)) Q:(LRCAPNAM="")!(LREND) D
. S LRCAPNUM=$G(^TMP("LRAR",$J,"CCOM",LRCAPNAM,0))
. W !!,LRCAPNUM,?15,LRCAPNAM,!
. S LRCCN=0
. F S LRCCN=$O(^TMP("LRAR",$J,"CCOM",LRCAPNAM,LRCCN)) Q:('LRCCN)!(LREND) D
. . S LRCOMM=$G(^TMP("LRAR",$J,"CCOM",LRCAPNAM,LRCCN))
. . I $Y+6'<IOSL D
. . . D NPG^LRARCU
. . . Q:LREND
. . . W !!,LRCAPNUM,?15,LRCAPNAM," (cont.)",!
. . Q:LREND
. . W LRCOMM,!
. W $E(LRDSHS,1,80),!
D:$E(IOST,1,2)="C-" PAUSE^LRARCU Q:LREND W @IOF
Q
DATCOM ;
N LRDATE,LRHDR,LRHDR3
S LRDAT=0
S LRDAT=$O(^TMP("LRAR",$J,"DCOM",LRDAT))
Q:'LRDAT ;no date comments
S LRHDR="WORKLOAD COMMENTS by DATE"
S LRHDR3="[Includes all archived workload data in date range]"
D HDR^LRARCU
S LRDAT=0
F S LRDAT=$O(^TMP("LRAR",$J,"DCOM",LRDAT)) Q:('LRDAT)!(LREND) D
. S Y=LRDAT D DD^%DT S LRDATE=Y
. W !!,LRDATE,!
. S LRDCN=0
. F S LRDCN=$O(^TMP("LRAR",$J,"DCOM",LRDAT,LRDCN)) Q:('LRDCN)!(LREND) D
. . S LRCOMM=$G(^TMP("LRAR",$J,"DCOM",LRDAT,LRDCN))
. . I $Y+6'<IOSL D
. . . D NPG^LRARCU
. . . Q:LREND
. . . W !!,LRDATE," (cont.)",!
. . Q:LREND
. . W LRCOMM,!
. W $E(LRDSHS,1,80),!
D:$E(IOST,1,2)="C-" PAUSE^LRARCU Q:LREND W @IOF
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HLRARCMR2 2533 printed Dec 13, 2024@02:09:14 Page 2
LRARCMR2 ;DALISC/CKA - ARCHIVED WKLD STATS REPORT - COMMENTS PRINT ; 5/22/95
+1 ;;5.2;LAB SERVICE;**59**;Aug 31, 1995
+2 ;same as LRCAPMR2 except archived wkld file
+3 ;
ASKCOM ;lrcm
+1 READ !!,"PRINT THE COMMENT PAGES? NO//",LRCM:DTIME
+2 IF '$TEST!(LRCM=U)
SET LREND=1
QUIT
+3 IF LRCM["?"
WRITE !,"Do you want to print comments? YES or NO.",!
GOTO ASKCOM
+4 SET LRCM=$SELECT($EXTRACT(LRCM,1)="Y"!($EXTRACT(LRCM,1)="y"):1,1:0)
WRITE !
+5 QUIT
COMM ;Called from LRARCMA2,LRARCML2,LRRP8C
+1 if '+$GET(LRCM)
QUIT
+2 NEW LRDAT,LRCC,LRGCN,LRCCN,LRDCN,LRCONT
+3 DO GENCOM
if LREND
QUIT
+4 DO CAPCOM
if LREND
QUIT
+5 DO DATCOM
+6 QUIT
GENCOM ;
+1 NEW LRHDR,LRHDR3
+2 SET LRGCN=0
+3 SET LRGCN=$ORDER(^TMP("LRAR",$JOB,"GCOM",LRGCN))
+4 ;no general comments
if 'LRGCN
QUIT
+5 SET LRHDR="GENERAL WORKLOAD COMMENTS"
+6 SET LRHDR3="[Includes all archived workload data in date range]"
+7 DO HDR^LRARCU
+8 SET LRGCN=0
+9 FOR
SET LRGCN=$ORDER(^TMP("LRAR",$JOB,"GCOM",LRGCN))
if ('LRGCN)!(LREND)
QUIT
Begin DoDot:1
+10 SET LRCOMM=$GET(^TMP("LRAR",$JOB,"GCOM",LRGCN))
+11 IF $Y+6'<IOSL
DO NPG^LRARCU
if LREND
QUIT
+12 WRITE !,LRCOMM,!
End DoDot:1
+13 if $EXTRACT(IOST,1,2)="C-"
DO PAUSE^LRARCU
if LREND
QUIT
WRITE @IOF
+14 QUIT
CAPCOM ;
+1 NEW LRHDR,LRHDR3
+2 SET LRCAPNAM=""
+3 SET LRCAPNAM=$ORDER(^TMP("LRAR",$JOB,"CCOM",LRCAPNAM))
+4 ;no wkld code comments
if LRCAPNAM=""
QUIT
+5 SET LRHDR="WORKLOAD COMMENTS by WKLD CODE"
+6 SET LRHDR3="[Includes all archived workload data in date range]"
+7 DO HDR^LRARCU
+8 SET LRCAPNAM=""
+9 FOR
SET LRCAPNAM=$ORDER(^TMP("LRAR",$JOB,"CCOM",LRCAPNAM))
if (LRCAPNAM="")!(LREND)
QUIT
Begin DoDot:1
+10 SET LRCAPNUM=$GET(^TMP("LRAR",$JOB,"CCOM",LRCAPNAM,0))
+11 WRITE !!,LRCAPNUM,?15,LRCAPNAM,!
+12 SET LRCCN=0
+13 FOR
SET LRCCN=$ORDER(^TMP("LRAR",$JOB,"CCOM",LRCAPNAM,LRCCN))
if ('LRCCN)!(LREND)
QUIT
Begin DoDot:2
+14 SET LRCOMM=$GET(^TMP("LRAR",$JOB,"CCOM",LRCAPNAM,LRCCN))
+15 IF $Y+6'<IOSL
Begin DoDot:3
+16 DO NPG^LRARCU
+17 if LREND
QUIT
+18 WRITE !!,LRCAPNUM,?15,LRCAPNAM," (cont.)",!
End DoDot:3
+19 if LREND
QUIT
+20 WRITE LRCOMM,!
End DoDot:2
+21 WRITE $EXTRACT(LRDSHS,1,80),!
End DoDot:1
+22 if $EXTRACT(IOST,1,2)="C-"
DO PAUSE^LRARCU
if LREND
QUIT
WRITE @IOF
+23 QUIT
DATCOM ;
+1 NEW LRDATE,LRHDR,LRHDR3
+2 SET LRDAT=0
+3 SET LRDAT=$ORDER(^TMP("LRAR",$JOB,"DCOM",LRDAT))
+4 ;no date comments
if 'LRDAT
QUIT
+5 SET LRHDR="WORKLOAD COMMENTS by DATE"
+6 SET LRHDR3="[Includes all archived workload data in date range]"
+7 DO HDR^LRARCU
+8 SET LRDAT=0
+9 FOR
SET LRDAT=$ORDER(^TMP("LRAR",$JOB,"DCOM",LRDAT))
if ('LRDAT)!(LREND)
QUIT
Begin DoDot:1
+10 SET Y=LRDAT
DO DD^%DT
SET LRDATE=Y
+11 WRITE !!,LRDATE,!
+12 SET LRDCN=0
+13 FOR
SET LRDCN=$ORDER(^TMP("LRAR",$JOB,"DCOM",LRDAT,LRDCN))
if ('LRDCN)!(LREND)
QUIT
Begin DoDot:2
+14 SET LRCOMM=$GET(^TMP("LRAR",$JOB,"DCOM",LRDAT,LRDCN))
+15 IF $Y+6'<IOSL
Begin DoDot:3
+16 DO NPG^LRARCU
+17 if LREND
QUIT
+18 WRITE !!,LRDATE," (cont.)",!
End DoDot:3
+19 if LREND
QUIT
+20 WRITE LRCOMM,!
End DoDot:2
+21 WRITE $EXTRACT(LRDSHS,1,80),!
End DoDot:1
+22 if $EXTRACT(IOST,1,2)="C-"
DO PAUSE^LRARCU
if LREND
QUIT
WRITE @IOF
+23 QUIT