PRSATH ; HISC/FPT-Transmission History ;12/16/92 14:06
;;4.0;PAID;;Sep 21, 1995
;
; ACKNOW = Number of messages acknowledged by Austin
; PPIEN = Pay period internal entry number
; MSGIEN = MailMan message internal entry number
; TRANS = Number of messages transmitted to Austin
;
K DIC S DIC="^PRST(458,",DIC(0)="AEMQZ" S PPIEN=$P($G(^PRST(458,0)),U,3) I PPIEN<1 D KILL Q
S DIC("B")=$P(^PRST(458,PPIEN,0),U,1) D ^DIC K DIC I +Y<1 D KILL Q
S PPIEN=+Y
W:$Y>0 @IOF,!!?21,"Transmission History for Pay Period ",$P($P(^PRST(458,PPIEN,0),U),"-",2),!
S X=$G(^PRST(458,PPIEN,0))
W !,"Transmitting Clerk: ",?50 S Y=$P(X,"^",2) W $P($G(^VA(200,+Y,0)),U)
W !,"Transmitting Date/Time: ",?50 S Y=$P(X,"^",3) D DT
W !!,"Total Number of Employees Transmitted: ",?50,$P(X,"^",4)
W !,"Total Number of Records Transmitted: ",?50,$P(X,"^",5),!
MSGIEN ; count messages transmitted to and acknowledged by Austin
S (ACKNOW,MSGIEN,TRANS)=0
F S MSGIEN=$O(^PRST(458,PPIEN,"X",MSGIEN)) Q:MSGIEN<1 S TRANS=TRANS+1 D
.S X=+$O(^XMB(3.9,MSGIEN,1,"C","XXX@Q-TAB.DOMAIN.EXT",0)) I X<1!('$D(^XMB(3.9,MSGIEN,1,X,0))) W !,"MESSAGE# ",MSGIEN," NO LONGER EXISTS",*7 Q
.S:$P(^XMB(3.9,MSGIEN,1,X,0),"^",4)'="" ACKNOW=ACKNOW+1
W !!,"Total Number of Messages for Transmission: ",?50,TRANS
W !,"Number of Messages Acknowledged by Austin: ",?50,ACKNOW
W ! K DIR S DIR(0)="E",DIR("A")="Press RETURN to Continue" D ^DIR
KILL K %,DIR,DIROUT,DIRUT,DTOUT,DUOUT,ACKNOW,MSGIEN,PPIEN,TRANS,X,Y Q
;
DT ; Date/time converter
I Y W $P("JAN^FEB^MAR^APR^MAY^JUN^JUL^AUG^SEP^OCT^NOV^DEC",U,$E(Y,4,5))_" " W:Y#100 $J(Y#100\1,2)_"," W Y\10000+1700 W:Y#1 " "_$E(Y_0,9,10)_":"_$E(Y_"000",11,12)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPRSATH 1706 printed Dec 13, 2024@02:24:34 Page 2
PRSATH ; HISC/FPT-Transmission History ;12/16/92 14:06
+1 ;;4.0;PAID;;Sep 21, 1995
+2 ;
+3 ; ACKNOW = Number of messages acknowledged by Austin
+4 ; PPIEN = Pay period internal entry number
+5 ; MSGIEN = MailMan message internal entry number
+6 ; TRANS = Number of messages transmitted to Austin
+7 ;
+8 KILL DIC
SET DIC="^PRST(458,"
SET DIC(0)="AEMQZ"
SET PPIEN=$PIECE($GET(^PRST(458,0)),U,3)
IF PPIEN<1
DO KILL
QUIT
+9 SET DIC("B")=$PIECE(^PRST(458,PPIEN,0),U,1)
DO ^DIC
KILL DIC
IF +Y<1
DO KILL
QUIT
+10 SET PPIEN=+Y
+11 if $Y>0
WRITE @IOF,!!?21,"Transmission History for Pay Period ",$PIECE($PIECE(^PRST(458,PPIEN,0),U),"-",2),!
+12 SET X=$GET(^PRST(458,PPIEN,0))
+13 WRITE !,"Transmitting Clerk: ",?50
SET Y=$PIECE(X,"^",2)
WRITE $PIECE($GET(^VA(200,+Y,0)),U)
+14 WRITE !,"Transmitting Date/Time: ",?50
SET Y=$PIECE(X,"^",3)
DO DT
+15 WRITE !!,"Total Number of Employees Transmitted: ",?50,$PIECE(X,"^",4)
+16 WRITE !,"Total Number of Records Transmitted: ",?50,$PIECE(X,"^",5),!
MSGIEN ; count messages transmitted to and acknowledged by Austin
+1 SET (ACKNOW,MSGIEN,TRANS)=0
+2 FOR
SET MSGIEN=$ORDER(^PRST(458,PPIEN,"X",MSGIEN))
if MSGIEN<1
QUIT
SET TRANS=TRANS+1
Begin DoDot:1
+3 SET X=+$ORDER(^XMB(3.9,MSGIEN,1,"C","XXX@Q-TAB.DOMAIN.EXT",0))
IF X<1!('$DATA(^XMB(3.9,MSGIEN,1,X,0)))
WRITE !,"MESSAGE# ",MSGIEN," NO LONGER EXISTS",*7
QUIT
+4 if $PIECE(^XMB(3.9,MSGIEN,1,X,0),"^",4)'=""
SET ACKNOW=ACKNOW+1
End DoDot:1
+5 WRITE !!,"Total Number of Messages for Transmission: ",?50,TRANS
+6 WRITE !,"Number of Messages Acknowledged by Austin: ",?50,ACKNOW
+7 WRITE !
KILL DIR
SET DIR(0)="E"
SET DIR("A")="Press RETURN to Continue"
DO ^DIR
KILL KILL %,DIR,DIROUT,DIRUT,DTOUT,DUOUT,ACKNOW,MSGIEN,PPIEN,TRANS,X,Y
QUIT
+1 ;
DT ; Date/time converter
+1 IF Y
WRITE $PIECE("JAN^FEB^MAR^APR^MAY^JUN^JUL^AUG^SEP^OCT^NOV^DEC",U,$EXTRACT(Y,4,5))_" "
if Y#100
WRITE $JUSTIFY(Y#100\1,2)_","
WRITE Y\10000+1700
if Y#1
WRITE " "_$EXTRACT(Y_0,9,10)_":"_$EXTRACT(Y_"000",11,12)
+2 QUIT