ECDSSSNR ;ALB/DAN - DSS units set to send no records report ;10/15/15 15:56
;;2.0;EVENT CAPTURE;**131**;8 May 96;Build 13
;
START ;
N NAME,UNIT,CNT,DSS0
S CNT=1
S NAME="" F S NAME=$O(^ECD("B",NAME)) Q:NAME="" S UNIT=0 F S UNIT=$O(^ECD("B",NAME,UNIT)) Q:'+UNIT D
.S DSS0=$G(^ECD(UNIT,0))
.I $P(DSS0,U,6) Q ;Unit is inactive
.I $P(DSS0,U,14)'="N" Q ;Only report units with send to pce set to send no records ("N")
.S CNT=CNT+1
.S ^TMP($J,"ECRPT",CNT)=UNIT_U_NAME_U_$$GET1^DIQ(40.7,$P(DSS0,U,10)_",",1)_U_$$GET1^DIQ(40.7,$P(DSS0,U,13)_",",1)_U_$$GET1^DIQ(728.441,$P(DSS0,U,15),.01) ;Store DSS unit data
I $G(ECPTYP)="E" S ^TMP($J,"ECRPT",1)="DSS UNIT IEN^DSS UNIT NAME^STOP CODE^CREDIT STOP^CHAR4" Q ;If exporting, create header line
;
PRINT ; Display results
N RDATE,LINE,NUM,PAGE
U IO
S RDATE=$$FMTE^XLFDT($E($$NOW^XLFDT,1,12),"5P")
D HDR
I '$D(^TMP($J,"ECRPT")) W !,"No active DSS units are set to Send No Records." Q ;Nothing to report
S NUM=1
F S NUM=$O(^TMP($J,"ECRPT",NUM)) Q:'+NUM D
.S LINE=^TMP($J,"ECRPT",NUM)
.W !,$P(LINE,U,2)_" ("_$P(LINE,U)_")",?50,$P(LINE,U,3)_"/"_$P(LINE,U,4)_"/"_$P(LINE,U,5)
.I $Y>(IOSL-4) D HDR
Q
;
HDR ;Display header for report
W @IOF
S PAGE=$G(PAGE)+1
W "DSS UNITS SET TO SEND NO RECORDS TO PCE",?41,"Run date:",RDATE,?72,"Page:",PAGE
W !!,"DSS UNIT NAME (IEN)",?50,"STOP CODE/CREDIT STOP/CHAR4",!,$$REPEAT^XLFSTR("-",80),!
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HECDSSSNR 1434 printed Oct 16, 2024@17:57:58 Page 2
ECDSSSNR ;ALB/DAN - DSS units set to send no records report ;10/15/15 15:56
+1 ;;2.0;EVENT CAPTURE;**131**;8 May 96;Build 13
+2 ;
START ;
+1 NEW NAME,UNIT,CNT,DSS0
+2 SET CNT=1
+3 SET NAME=""
FOR
SET NAME=$ORDER(^ECD("B",NAME))
if NAME=""
QUIT
SET UNIT=0
FOR
SET UNIT=$ORDER(^ECD("B",NAME,UNIT))
if '+UNIT
QUIT
Begin DoDot:1
+4 SET DSS0=$GET(^ECD(UNIT,0))
+5 ;Unit is inactive
IF $PIECE(DSS0,U,6)
QUIT
+6 ;Only report units with send to pce set to send no records ("N")
IF $PIECE(DSS0,U,14)'="N"
QUIT
+7 SET CNT=CNT+1
+8 ;Store DSS unit data
SET ^TMP($JOB,"ECRPT",CNT)=UNIT_U_NAME_U_$$GET1^DIQ(40.7,$PIECE(DSS0,U,10)_",",1)_U_$$GET1^DIQ(40.7,$PIECE(DSS0,U,13)_",",1)_U_$$GET1^DIQ(728.441,$PIECE(DSS0,U,15),.01)
End DoDot:1
+9 ;If exporting, create header line
IF $GET(ECPTYP)="E"
SET ^TMP($JOB,"ECRPT",1)="DSS UNIT IEN^DSS UNIT NAME^STOP CODE^CREDIT STOP^CHAR4"
QUIT
+10 ;
PRINT ; Display results
+1 NEW RDATE,LINE,NUM,PAGE
+2 USE IO
+3 SET RDATE=$$FMTE^XLFDT($EXTRACT($$NOW^XLFDT,1,12),"5P")
+4 DO HDR
+5 ;Nothing to report
IF '$DATA(^TMP($JOB,"ECRPT"))
WRITE !,"No active DSS units are set to Send No Records."
QUIT
+6 SET NUM=1
+7 FOR
SET NUM=$ORDER(^TMP($JOB,"ECRPT",NUM))
if '+NUM
QUIT
Begin DoDot:1
+8 SET LINE=^TMP($JOB,"ECRPT",NUM)
+9 WRITE !,$PIECE(LINE,U,2)_" ("_$PIECE(LINE,U)_")",?50,$PIECE(LINE,U,3)_"/"_$PIECE(LINE,U,4)_"/"_$PIECE(LINE,U,5)
+10 IF $Y>(IOSL-4)
DO HDR
End DoDot:1
+11 QUIT
+12 ;
HDR ;Display header for report
+1 WRITE @IOF
+2 SET PAGE=$GET(PAGE)+1
+3 WRITE "DSS UNITS SET TO SEND NO RECORDS TO PCE",?41,"Run date:",RDATE,?72,"Page:",PAGE
+4 WRITE !!,"DSS UNIT NAME (IEN)",?50,"STOP CODE/CREDIT STOP/CHAR4",!,$$REPEAT^XLFSTR("-",80),!
+5 QUIT