XUCT02 ; GENERATED FROM 'XU-ZISPL-USER' PRINT TEMPLATE (#18) ; 06/03/03 ; (FILE 3.51, MARGIN=80)
G BEGIN
CP G CP^DIO2
C S DQ(C)=Y
S S Q(C)=Y*Y+Q(C) S:L(C)>Y L(C)=Y S:H(C)<Y H(C)=Y
P S N(C)=N(C)+1
A S S(C)=S(C)+Y
Q
D I Y=DITTO(C) S Y="" Q
S DITTO(C)=Y
Q
N W !
T W:$X ! I '$D(DIOT(2)),DN,$D(IOSL),$S('$D(DIWF):1,$P(DIWF,"B",2):$P(DIWF,"B",2),1:1)+$Y'<IOSL,$D(^UTILITY($J,1))#2,^(1)?1U1P1E.E X ^(1)
S DISTP=DISTP+1,DILCT=DILCT+1 D:'(DISTP#100) CSTP^DIO2
Q
DT I $G(DUZ("LANG"))>1,Y W $$OUT^DIALOGU(Y,"DD") Q
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
W Y Q
M D @DIXX
Q
BEGIN ;
S:'$D(DN) DN=1 S DISTP=$G(DISTP),DILCT=$G(DILCT)
I $D(DXS)<9 M DXS=^DIPT(18,"DXS")
S I(0)="^XMB(3.51,",J(0)=3.51
S X=$G(^XMB(3.51,D0,0)) D T Q:'DN D N W ?0 S Y=$P(X,U,5),C=1 D D S Y=$S(Y="":Y,$D(^VA(200,Y,0))#2:$P(^(0),U),1:Y) W $E(Y,1,30)
W:$X>8 ! D N:$X>2 Q:'DN W ?2 S Y=$P(X,U,1) S:Y]"" N(2)=N(2)+1 W $E(Y,1,44)
D N:$X>48 Q:'DN W ?48 S Y=$P(X,U,3) W:Y]"" $S($D(DXS(2,Y)):DXS(2,Y),1:Y)
D N:$X>57 Q:'DN W ?57 S Y=$P(X,U,9),C=3 D A:Y]"" W:Y]"" $J(Y,8,0)
D N:$X>67 Q:'DN W ?67,$E($P(X,U,8),1,7)
D N:$X>75 Q:'DN W ?75 S DIP(2)=$S($D(^XMB(3.51,D0,0)):^(0),1:""),X=DT S X=X,DIP(1)=X S X=$P(DIP(2),U,6),Y=X,X=DIP(1),X=X,X1=X,X2=Y,X="" D:X2 ^%DTC:X1 K DIP K:DN Y W $J(X,4)
S I(1)=2,J(1)=3.5121 F D1=0:0 Q:$O(^XMB(3.51,D0,2,D1))'>0 X:$D(DSC(3.5121)) DSC(3.5121) S D1=$O(^(D1)) Q:D1'>0 D:$X>81 T Q:'DN D A1
G A1R
A1 ;
D N:$X>9 Q:'DN W ?9 X DXS(1,9.2) S X1=DIP(2) S:X]""&(X?.ANP)&(X1'[U)&(X1'["$C(94)") DIPA($E(X,1,30))=X1 S X="" K DIP K:DN Y W X
W ?9 S X="CNT",X=$S(X=""!(X'?.ANP):"",$D(DIPA($E(X,1,30))):DIPA($E(X,1,30)),1:"") K DIP K:DN Y W X
W $S(DIPA("CNT")>1:" copies",1:" copy")_" printed on " K DIP K:DN Y
S X=$G(^XMB(3.51,D0,2,D1,0)) W ?0,$E($P(X,U,1),1,30)
W " at "
S Y=$P(X,U,5) D DT
Q
A1R ;
K Y
Q
HEAD ;
W !,?0,"USER NAME"
W !,?2,"DOCUMENT NAME",?48,"STATUS",?60,"LINES",?67,"SIZE",?76,"AGE"
W !,"--------------------------------------------------------------------------------",!!
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HXUCT02 2169 printed Nov 22, 2024@17:19:20 Page 2
XUCT02 ; GENERATED FROM 'XU-ZISPL-USER' PRINT TEMPLATE (#18) ; 06/03/03 ; (FILE 3.51, MARGIN=80)
+1 GOTO BEGIN
CP GOTO CP^DIO2
C SET DQ(C)=Y
S SET Q(C)=Y*Y+Q(C)
if L(C)>Y
SET L(C)=Y
if H(C)<Y
SET H(C)=Y
P SET N(C)=N(C)+1
A SET S(C)=S(C)+Y
+1 QUIT
D IF Y=DITTO(C)
SET Y=""
QUIT
+1 SET DITTO(C)=Y
+2 QUIT
N WRITE !
T if $X
WRITE !
IF '$DATA(DIOT(2))
IF DN
IF $DATA(IOSL)
IF $SELECT('$DATA(DIWF):1,$PIECE(DIWF,"B",2):$PIECE(DIWF,"B",2),1:1)+$Y'<IOSL
IF $DATA(^UTILITY($JOB,1))#2
IF ^(1)?1U1P1E.E
XECUTE ^(1)
+1 SET DISTP=DISTP+1
SET DILCT=DILCT+1
if '(DISTP#100)
DO CSTP^DIO2
+2 QUIT
DT IF $GET(DUZ("LANG"))>1
IF Y
WRITE $$OUT^DIALOGU(Y,"DD")
QUIT
+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)
QUIT
+2 WRITE Y
QUIT
M DO @DIXX
+1 QUIT
BEGIN ;
+1 if '$DATA(DN)
SET DN=1
SET DISTP=$GET(DISTP)
SET DILCT=$GET(DILCT)
+2 IF $DATA(DXS)<9
MERGE DXS=^DIPT(18,"DXS")
+3 SET I(0)="^XMB(3.51,"
SET J(0)=3.51
+4 SET X=$GET(^XMB(3.51,D0,0))
DO T
if 'DN
QUIT
DO N
WRITE ?0
SET Y=$PIECE(X,U,5)
SET C=1
DO D
SET Y=$SELECT(Y="":Y,$DATA(^VA(200,Y,0))#2:$PIECE(^(0),U),1:Y)
WRITE $EXTRACT(Y,1,30)
+5 if $X>8
WRITE !
if $X>2
DO N
if 'DN
QUIT
WRITE ?2
SET Y=$PIECE(X,U,1)
if Y]""
SET N(2)=N(2)+1
WRITE $EXTRACT(Y,1,44)
+6 if $X>48
DO N
if 'DN
QUIT
WRITE ?48
SET Y=$PIECE(X,U,3)
if Y]""
WRITE $SELECT($DATA(DXS(2,Y)):DXS(2,Y),1:Y)
+7 if $X>57
DO N
if 'DN
QUIT
WRITE ?57
SET Y=$PIECE(X,U,9)
SET C=3
if Y]""
DO A
if Y]""
WRITE $JUSTIFY(Y,8,0)
+8 if $X>67
DO N
if 'DN
QUIT
WRITE ?67,$EXTRACT($PIECE(X,U,8),1,7)
+9 if $X>75
DO N
if 'DN
QUIT
WRITE ?75
SET DIP(2)=$SELECT($DATA(^XMB(3.51,D0,0)):^(0),1:"")
SET X=DT
SET X=X
SET DIP(1)=X
SET X=$PIECE(DIP(2),U,6)
SET Y=X
SET X=DIP(1)
SET X=X
SET X1=X
SET X2=Y
SET X=""
if X2
if X1
DO ^%DTC
KILL DIP
if DN
KILL Y
WRITE $JUSTIFY(X,4)
+10 SET I(1)=2
SET J(1)=3.5121
FOR D1=0:0
if $ORDER(^XMB(3.51,D0,2,D1))'>0
QUIT
if $DATA(DSC(3.5121))
XECUTE DSC(3.5121)
SET D1=$ORDER(^(D1))
if D1'>0
QUIT
if $X>81
DO T
if 'DN
QUIT
DO A1
+11 GOTO A1R
A1 ;
+1 if $X>9
DO N
if 'DN
QUIT
WRITE ?9
XECUTE DXS(1,9.2)
SET X1=DIP(2)
if X]""&(X?.ANP)&(X1'[U)&(X1'["$C(94)")
SET DIPA($EXTRACT(X,1,30))=X1
SET X=""
KILL DIP
if DN
KILL Y
WRITE X
+2 WRITE ?9
SET X="CNT"
SET X=$SELECT(X=""!(X'?.ANP):"",$DATA(DIPA($EXTRACT(X,1,30))):DIPA($EXTRACT(X,1,30)),1:"")
KILL DIP
if DN
KILL Y
WRITE X
+3 WRITE $SELECT(DIPA("CNT")>1:" copies",1:" copy")_" printed on "
KILL DIP
if DN
KILL Y
+4 SET X=$GET(^XMB(3.51,D0,2,D1,0))
WRITE ?0,$EXTRACT($PIECE(X,U,1),1,30)
+5 WRITE " at "
+6 SET Y=$PIECE(X,U,5)
DO DT
+7 QUIT
A1R ;
+1 KILL Y
+2 QUIT
HEAD ;
+1 WRITE !,?0,"USER NAME"
+2 WRITE !,?2,"DOCUMENT NAME",?48,"STATUS",?60,"LINES",?67,"SIZE",?76,"AGE"
+3 WRITE !,"--------------------------------------------------------------------------------",!!