ASUTPIA ; IHS/ITSC/LMH - GENERATED FROM 'ASU3TPTA' PRINT TEMPLATE (#1594) ;
;;4.2T2;Supply Accounting Mgmt. System;;JUN 30, 2000
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 F X=0:0 S X=$O(^DIPT(1594,"DXS",X)) Q:'X S Y=$O(^(X,"")) F X=X:0 Q:Y="" S DXS(X,Y)=^(Y),Y=$O(^(Y))
D N:$X>0 Q:'DN W ?0 S DIP(1)=$S($D(^ASUT(3,D0,1)):^(1),1:"") S X=$P(DIP(1),U,2),X=X K DIP K:DN Y W $E(X,1,2)
S X=$G(^ASUT(3,D0,1)) D N:$X>3 Q:'DN W ?3,$E($P(X,U,3),1,2)
D N:$X>6 Q:'DN W ?6 S DIP(1)=$S($D(^ASUT(3,D0,1)):^(1),1:"") S X=$P(DIP(1),U,4),X=X K DIP K:DN Y W $E(X,1,1)
D N:$X>8 Q:'DN W ?8 S DIP(1)=$S($D(^ASUT(3,D0,1)):^(1),1:"") S X=$P(DIP(1),U,5),X=$E(X,1,5)_"."_$E(X,6,6) K DIP K:DN Y W $E(X,1,7)
D N:$X>16 Q:'DN W ?16 S DIP(1)=$S($D(^ASUT(3,D0,1)):^(1),1:"") S X=$P(DIP(1),U,1),X=X K DIP K:DN Y W $E(X,1,2) K Y(9002036.3,-1) S Y=X S:Y'?."*" N(1)=N(1)+1
D N:$X>19 Q:'DN W ?19 S DIP(1)=$S($D(^ASUT(3,D0,3)):^(3),1:"") S X=$P(DIP(1),U,1),X=X K DIP K:DN Y W $E(X,1,1)
D N:$X>21 Q:'DN W ?21 X DXS(1,9.2) S DIP(3)=X S X=1,DIP(4)=X S X=2,X=$E(DIP(3),DIP(4),X) K DIP K:DN Y W $E(X,1,2)
D N:$X>24 Q:'DN W ?24 X DXS(2,9) K DIP K:DN Y W $E(X,1,10)
D N:$X>35 Q:'DN W ?35 S DIP(2)=$S($D(^ASUT(3,D0,0)):^(0),1:""),DIP(1)=$S($D(^(1)):^(1),1:"") S X=$P(DIP(1),U,7)*$P(DIP(2),U,23) K DIP K:DN Y W:X'?."*" $J(X,7,2) K Y(9002036.3,-1) S Y=X,C=2 D A:Y'?."*"
S X=$G(^ASUT(3,D0,0)) D N:$X>43 Q:'DN W ?43 S Y=$P(X,U,20) W:Y]"" $S($D(DXS(3,Y)):DXS(3,Y),1:Y)
D N:$X>45 Q:'DN W ?45 S DIP(2)=$S($D(^ASUT(3,D0,0)):^(0),1:""),DIP(1)=$S($D(^(3)):^(3),1:"") S X=$P(DIP(1),U,6)*$P(DIP(2),U,23) K DIP K:DN Y W $J(X,5) K Y(9002036.3,-1) S Y=X,C=3 D A:Y'?."*"
D N:$X>51 Q:'DN W ?51 S DIP(2)=$S($D(^ASUT(3,D0,0)):^(0),1:""),DIP(1)=$S($D(^(1)):^(1),1:"") S X=$P(DIP(1),U,6)*$P(DIP(2),U,23) K DIP K:DN Y W $J(X,5) K Y(9002036.3,-1) S Y=X,C=4 D A:Y'?."*"
D N:$X>57 Q:'DN W ?57 S DIP(1)=$S($D(^ASUT(3,D0,1)):^(1),1:"") S X=$P(DIP(1),U,18),X=X K DIP K:DN Y W $E(X,1,1)
S X=$G(^ASUT(3,D0,3)) D N:$X>59 Q:'DN W ?59 S Y=$P(X,U,8) W:Y]"" $S($D(DXS(4,Y)):DXS(4,Y),1:Y)
D N:$X>61 Q:'DN W ?61 S Y=$P(X,U,7) W:Y]"" $S($D(DXS(5,Y)):DXS(5,Y),1:Y)
D N:$X>63 Q:'DN W ?63 S DIP(1)=$S($D(^ASUT(3,D0,1)):^(1),1:"") S X=$P(DIP(1),U,10) S:X X=$E(X,4,5)_"/"_$E(X,6,7)_"/"_$E(X,2,3) K DIP K:DN Y W $E(X,1,8)
S X=$G(^ASUT(3,D0,1)) D N:$X>72 Q:'DN W ?72,$E($P(X,U,15),1,7)
D N:$X>80 Q:'DN W ?80,$E($P(X,U,13),1,2)
D N:$X>83 Q:'DN W ?83,$E($P(X,U,14),1,3)
D N:$X>87 Q:'DN W ?87,$E($P(X,U,11),1,3)
S X=$G(^ASUT(3,D0,3)) D N:$X>91 Q:'DN W ?91,$E($P(X,U,4),1,7)
D N:$X>99 Q:'DN W ?99,$E($P(X,U,5),1,8)
S X=$G(^ASUT(3,D0,0)) W ?109,$E($P(X,U,25),1,10)
D N:$X>118 Q:'DN W ?118 S DIP(1)=$S($D(^ASUT(3,D0,0)):^(0),1:"") S X=$P(DIP(1),U,1),X=X S X=X,DIP(2)=X S X=2,DIP(3)=X S X=14,X=$E(DIP(2),DIP(3),X) K DIP K:DN Y W $E(X,1,13)
K Y
Q
HEAD ;
W !,?6,"A",?19,"P",?21,"TY",?43,"C",?57,"F",?59,"A",?61,"B",?87,"SUB"
W !,?0,"AR",?3,"ST",?6,"C",?8,"INDEX",?16,"TR",?19,"C",?21,"IS",?24,"VOUCHER",?43,"A",?47,"QTY",?53,"QTY",?57,"P",?59,"D",?61,"/",?63,"DATE OF",?80,"SS",?83,"USE",?87,"SUB",?91,"REQUEST"
W !,?0,"CD",?3,"CD",?6,"C",?8,"NUMBER",?16,"CD",?19,"D",?21,"RQ",?24,"NUMBER",?37,"VALUE",?43,"L",?47,"ISS",?53,"REQ",?57,"N",?59,"J",?61,"O",?63,"REQUEST",?72,"CAN",?80,"CD",?83,"CDE",?87,"ACT",?91,"NUMBER",?99,"CT/GT",?109,"REMARKS"
W !,?118,"KEY"
W !,"------------------------------------------------------------------------------------------------------------------------------------",!!
ASUTPIA ; IHS/ITSC/LMH - GENERATED FROM 'ASU3TPTA' PRINT TEMPLATE (#1594) ;
+1 ;;4.2T2;Supply Accounting Mgmt. System;;JUN 30, 2000
+2 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
FOR X=0:0
SET X=$ORDER(^DIPT(1594,"DXS",X))
IF 'X
QUIT
SET Y=$ORDER(^(X,""))
FOR X=X:0
IF Y=""
QUIT
SET DXS(X,Y)=^(Y)
SET Y=$ORDER(^(Y))
+3 IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
SET DIP(1)=$SELECT($DATA(^ASUT(3,D0,1)):^(1),1:"")
SET X=$PIECE(DIP(1),U,2)
SET X=X
KILL DIP
IF DN
KILL Y
WRITE $EXTRACT(X,1,2)
+4 SET X=$GET(^ASUT(3,D0,1))
IF $X>3
DO N
IF 'DN
QUIT
WRITE ?3,$EXTRACT($PIECE(X,U,3),1,2)
+5 IF $X>6
DO N
IF 'DN
QUIT
WRITE ?6
SET DIP(1)=$SELECT($DATA(^ASUT(3,D0,1)):^(1),1:"")
SET X=$PIECE(DIP(1),U,4)
SET X=X
KILL DIP
IF DN
KILL Y
WRITE $EXTRACT(X,1,1)
+6 IF $X>8
DO N
IF 'DN
QUIT
WRITE ?8
SET DIP(1)=$SELECT($DATA(^ASUT(3,D0,1)):^(1),1:"")
SET X=$PIECE(DIP(1),U,5)
SET X=$EXTRACT(X,1,5)_"."_$EXTRACT(X,6,6)
KILL DIP
IF DN
KILL Y
WRITE $EXTRACT(X,1,7)
+7 IF $X>16
DO N
IF 'DN
QUIT
WRITE ?16
SET DIP(1)=$SELECT($DATA(^ASUT(3,D0,1)):^(1),1:"")
SET X=$PIECE(DIP(1),U,1)
SET X=X
KILL DIP
IF DN
KILL Y
WRITE $EXTRACT(X,1,2)
KILL Y(9002036.3,-1)
SET Y=X
IF Y'?."*"
SET N(1)=N(1)+1
+8 IF $X>19
DO N
IF 'DN
QUIT
WRITE ?19
SET DIP(1)=$SELECT($DATA(^ASUT(3,D0,3)):^(3),1:"")
SET X=$PIECE(DIP(1),U,1)
SET X=X
KILL DIP
IF DN
KILL Y
WRITE $EXTRACT(X,1,1)
+9 IF $X>21
DO N
IF 'DN
QUIT
WRITE ?21
XECUTE DXS(1,9.2)
SET DIP(3)=X
SET X=1
SET DIP(4)=X
SET X=2
SET X=$EXTRACT(DIP(3),DIP(4),X)
KILL DIP
IF DN
KILL Y
WRITE $EXTRACT(X,1,2)
+10 IF $X>24
DO N
IF 'DN
QUIT
WRITE ?24
XECUTE DXS(2,9)
KILL DIP
IF DN
KILL Y
WRITE $EXTRACT(X,1,10)
+11 IF $X>35
DO N
IF 'DN
QUIT
WRITE ?35
SET DIP(2)=$SELECT($DATA(^ASUT(3,D0,0)):^(0),1:"")
SET DIP(1)=$SELECT($DATA(^(1)):^(1),1:"")
SET X=$PIECE(DIP(1),U,7)*$PIECE(DIP(2),U,23)
KILL DIP
IF DN
KILL Y
IF X'?."*"
WRITE $JUSTIFY(X,7,2)
KILL Y(9002036.3,-1)
SET Y=X
SET C=2
IF Y'?."*"
DO A
+12 SET X=$GET(^ASUT(3,D0,0))
IF $X>43
DO N
IF 'DN
QUIT
WRITE ?43
SET Y=$PIECE(X,U,20)
IF Y]""
WRITE $SELECT($DATA(DXS(3,Y)):DXS(3,Y),1:Y)
+13 IF $X>45
DO N
IF 'DN
QUIT
WRITE ?45
SET DIP(2)=$SELECT($DATA(^ASUT(3,D0,0)):^(0),1:"")
SET DIP(1)=$SELECT($DATA(^(3)):^(3),1:"")
SET X=$PIECE(DIP(1),U,6)*$PIECE(DIP(2),U,23)
KILL DIP
IF DN
KILL Y
WRITE $JUSTIFY(X,5)
KILL Y(9002036.3,-1)
SET Y=X
SET C=3
IF Y'?."*"
DO A
+14 IF $X>51
DO N
IF 'DN
QUIT
WRITE ?51
SET DIP(2)=$SELECT($DATA(^ASUT(3,D0,0)):^(0),1:"")
SET DIP(1)=$SELECT($DATA(^(1)):^(1),1:"")
SET X=$PIECE(DIP(1),U,6)*$PIECE(DIP(2),U,23)
KILL DIP
IF DN
KILL Y
WRITE $JUSTIFY(X,5)
KILL Y(9002036.3,-1)
SET Y=X
SET C=4
IF Y'?."*"
DO A
+15 IF $X>57
DO N
IF 'DN
QUIT
WRITE ?57
SET DIP(1)=$SELECT($DATA(^ASUT(3,D0,1)):^(1),1:"")
SET X=$PIECE(DIP(1),U,18)
SET X=X
KILL DIP
IF DN
KILL Y
WRITE $EXTRACT(X,1,1)
+16 SET X=$GET(^ASUT(3,D0,3))
IF $X>59
DO N
IF 'DN
QUIT
WRITE ?59
SET Y=$PIECE(X,U,8)
IF Y]""
WRITE $SELECT($DATA(DXS(4,Y)):DXS(4,Y),1:Y)
+17 IF $X>61
DO N
IF 'DN
QUIT
WRITE ?61
SET Y=$PIECE(X,U,7)
IF Y]""
WRITE $SELECT($DATA(DXS(5,Y)):DXS(5,Y),1:Y)
+18 IF $X>63
DO N
IF 'DN
QUIT
WRITE ?63
SET DIP(1)=$SELECT($DATA(^ASUT(3,D0,1)):^(1),1:"")
SET X=$PIECE(DIP(1),U,10)
IF X
SET X=$EXTRACT(X,4,5)_"/"_$EXTRACT(X,6,7)_"/"_$EXTRACT(X,2,3)
KILL DIP
IF DN
KILL Y
WRITE $EXTRACT(X,1,8)
+19 SET X=$GET(^ASUT(3,D0,1))
IF $X>72
DO N
IF 'DN
QUIT
WRITE ?72,$EXTRACT($PIECE(X,U,15),1,7)
+20 IF $X>80
DO N
IF 'DN
QUIT
WRITE ?80,$EXTRACT($PIECE(X,U,13),1,2)
+21 IF $X>83
DO N
IF 'DN
QUIT
WRITE ?83,$EXTRACT($PIECE(X,U,14),1,3)
+22 IF $X>87
DO N
IF 'DN
QUIT
WRITE ?87,$EXTRACT($PIECE(X,U,11),1,3)
+23 SET X=$GET(^ASUT(3,D0,3))
IF $X>91
DO N
IF 'DN
QUIT
WRITE ?91,$EXTRACT($PIECE(X,U,4),1,7)
+24 IF $X>99
DO N
IF 'DN
QUIT
WRITE ?99,$EXTRACT($PIECE(X,U,5),1,8)
+25 SET X=$GET(^ASUT(3,D0,0))
WRITE ?109,$EXTRACT($PIECE(X,U,25),1,10)
+26 IF $X>118
DO N
IF 'DN
QUIT
WRITE ?118
SET DIP(1)=$SELECT($DATA(^ASUT(3,D0,0)):^(0),1:"")
SET X=$PIECE(DIP(1),U,1)
SET X=X
SET X=X
SET DIP(2)=X
SET X=2
SET DIP(3)=X
SET X=14
SET X=$EXTRACT(DIP(2),DIP(3),X)
KILL DIP
IF DN
KILL Y
WRITE $EXTRACT(X,1,13)
+27 KILL Y
+28 QUIT
HEAD ;
+1 WRITE !,?6,"A",?19,"P",?21,"TY",?43,"C",?57,"F",?59,"A",?61,"B",?87,"SUB"
+2 WRITE !,?0,"AR",?3,"ST",?6,"C",?8,"INDEX",?16,"TR",?19,"C",?21,"IS",?24,"VOUCHER",?43,"A",?47,"QTY",?53,"QTY",?57,"P",?59,"D",?61,"/",?63,"DATE OF",?80,"SS",?83,"USE",?87,"SUB",?91,"REQUEST"
+3 WRITE !,?0,"CD",?3,"CD",?6,"C",?8,"NUMBER",?16,"CD",?19,"D",?21,"RQ",?24,"NUMBER",?37,"VALUE",?43,"L",?47,"ISS",?53,"REQ",?57,"N",?59,"J",?61,"O",?63,"REQUEST",?72,"CAN",?80,"CD",?83,"CDE",?87,"ACT",?91,"NUMBER",?99,"CT/GT",?109,"REMARKS"
+4 WRITE !,?118,"KEY"
+5 WRITE !,"------------------------------------------------------------------------------------------------------------------------------------",!!