ACGSDCI1 ;IHS/OIRM/DSD/THL,AEF - CONTROL CIS FIELDS AND EXPORT VARIABLES CON'T; [ 03/27/2000 2:22 PM ]
;;2.0t1;CONTRACT INFORMATION SYSTEM;;FEB 16, 2000
;;CONTROL CIS FIELDS AND EXPORT VARIABLES - CON'T
13 S X=$E($P(ACGDT2,U,18),1,4),X=$S(X]"":X,1:" ")
D Y
18 S X=$E($P(ACGDT2,U,16)),X=$S(X]"":X,1:"2")
D Y
19 S X=$E($P(ACGDT2,U,17)),X=$S("ABC"[$P(ACGDT3,U,7):" ",X]"":X,1:" ")
D Y
23 S X=$E($P(ACGDT2,U,10)),X=$S(X]"":X,1:" ")
D Y
25 S X=$E($P(ACGDT3,U,7)),X=$S(X]"":X,1:" ")
D Y
33 S X=$E($P(ACGDT3,U,1)),X=$S(X]"":X,1:" ")
D Y
37 S X=$E($P(ACGDT2,U,19),1,30)
S:$L(X)<30 X=X_$J(" ",30-$L(X))
D Y
38 S X=$E($P(ACGDT2,U,20),1,12)
S:X]"" X=$S($L(X)=9:X,$L(X)=12:$E(X,2,10),1:"")
S:X="" X=" "
D Y
42 S X=$E($P(ACGDT3,U,8)),X=$S(X]"":X,1:" ")
D Y
43 S X=$E($P(ACGDT3,U,9)),X=$S(X]"":X,1:" ")
D Y
44 S X=$E($P(ACGDT3,U,10)),X=$S(X]"":X,1:" ")
D Y
45 S X=$P(ACGDT3,U,11),X=$S('X:" ",$D(^AUTTSOB(X,0)):$P(^(0),U),1:" ")
D Y
57 S X=$P(ACGDT2,U,12),ACGSIGN=$S($E(X)="-":"-",1:""),ACGX=""
S:ACGSIGN="-" X=$P(X,"-",2)
S:10-$L(ACGSIGN)-$L(X) $P(ACGX,"0",10-$L(ACGSIGN)-$L(X))="" S X=ACGSIGN_ACGX_X
D Y
58 S X=$P(ACGDT2,U,13),ACGSIGN=$S($E(X)="-":"-",1:""),ACGX=""
S:ACGSIGN="-" X=$P(X,"-",2)
S:10-$L(ACGSIGN)-$L(X) $P(ACGX,"0",10-$L(ACGSIGN)-$L(X))="" S X=ACGSIGN_ACGX_X
D Y
59 S X=$P(ACGDT2,U,14),ACGSIGN=$S($E(X)="-":"-",1:""),ACGX=""
S:ACGSIGN="-" X=$P(X,"-",2)
S:10-$L(ACGSIGN)-$L(X) $P(ACGX,"0",10-$L(ACGSIGN)-$L(X))="" S X=ACGSIGN_ACGX_X
D Y
61 S X=$E($P(ACGDT3,U,12),1,10),ACGSIGN=$S($E(X)="-":"-",1:""),ACGX=""
S:ACGSIGN="-" X=$P(X,"-",2)
S:10-$L(ACGSIGN)-$L(X) $P(ACGX,"0",10-$L(ACGSIGN)-$L(X))="" S X=ACGSIGN_ACGX_X
D Y
K ACGX
62 S X=$E($P(ACGDT3,U,13),1,10),ACGSIGN=$S($E(X)="-":"-",1:""),ACGX=""
S:ACGSIGN="-" X=$P(X,"-",2)
S:10-$L(ACGSIGN)-$L(X) $P(ACGX,"0",10-$L(ACGSIGN)-$L(X))="" S X=ACGSIGN_ACGX_X
D Y
K ACGX
36 S X=$E($P(ACGDT2,U),1,10),ACGSIGN=$S($E(X)="-":"-",1:""),ACGX=""
S:ACGSIGN="-" X=$P(X,"-",2)
S:10-$L(ACGSIGN)-$L(X) $P(ACGX,"0",10-$L(ACGSIGN)-$L(X))="" S X=ACGSIGN_ACGX_X
D Y
K ACGX
137 S ACGFY=$E($P(ACGDT3,U,16),2)
I ACGFY="" S ACGFY=$P(ACGDT1,U,3),ACGFY=$S($E(ACGFY,4,5)>9:$E(ACGFY,3)+1,1:$E(ACGFY,3)) S:$L(ACGFY)=2 ACGFY=$E(ACGFY,2) S $P(ACGIHS,U,4)=9_ACGFY
S X=$E($P(ACGDT2,U,2),1,7),X=$S($L(X)=7:ACGFY_X,1:" ")
D Y
138 S X=$P(ACGDT2,U,3),ACGSIGN=$S($E(X)="-":"-",1:""),ACGX=""
S:ACGSIGN="-" X=$P(X,"-",2)
S:10-$L(ACGSIGN)-$L(X) $P(ACGX,"0",10-$L(ACGSIGN)-$L(X))="" S X=ACGSIGN_ACGX_X
D Y
K ACGX
39 S ACGFY=$E($P(ACGDT3,U,17),2)
I ACGFY="" S ACGFY=$P(ACGDT1,U,3),ACGFY=$S($E(ACGFY,4,5)>9:$E(ACGFY,3)+1,1:$E(ACGFY,3)) S:$L(ACGFY)=2 ACGFY=$E(ACGFY,2) S $P(ACGIHS,U,4)=9_ACGFY
S X=$E($P(ACGDT2,U,4),1,7),X=$S($L(X)=7:ACGFY_X,1:" ")
D Y
40 S X=$P(ACGDT2,U,5),ACGSIGN=$S($E(X)="-":"-",1:""),ACGX=""
S:ACGSIGN="-" X=$P(X,"-",2)
S:10-$L(ACGSIGN)-$L(X) $P(ACGX,"0",10-$L(ACGSIGN)-$L(X))="" S X=ACGSIGN_ACGX_X
D Y
41 S ACGFY=$E($P(ACGDT3,U,18),2)
I ACGFY="" S ACGFY=$P(ACGDT1,U,3),ACGFY=$S($E(ACGFY,4,5)>9:$E(ACGFY,3)+1,1:$E(ACGFY,3)) S:$L(ACGFY)=2 ACGFY=$E(ACGFY,2) S $P(ACGIHS,U,4)=9_ACGFY
S X=$E($P(ACGDT2,U,6),1,7),X=$S($L(X)=7:ACGFY_X,1:" ")
D Y
142 S X=$P(ACGDT2,U,7),ACGSIGN=$S($E(X)="-":"-",1:""),ACGX=""
S:ACGSIGN="-" X=$P(X,"-",2)
S:10-$L(ACGSIGN)-$L(X) $P(ACGX,"0",10-$L(ACGSIGN)-$L(X))="" S X=ACGSIGN_ACGX_X
D Y
143 S X=$P(ACGDT2,U,8),ACGSIGN=$S($E(X)="-":"-",1:""),ACGX=""
S:ACGSIGN="-" X=$P(X,"-",2)
S:10-$L(ACGSIGN)-$L(X) $P(ACGX,"0",10-$L(ACGSIGN)-$L(X))="" S X=ACGSIGN_ACGX_X
D Y
144 S X=$P(ACGDT2,U,9),ACGSIGN=$S($E(X)="-":"-",1:""),ACGX=""
S:ACGSIGN="-" X=$P(X,"-",2)
S:10-$L(ACGSIGN)-$L(X) $P(ACGX,"0",10-$L(ACGSIGN)-$L(X))="" S X=ACGSIGN_ACGX_X
D Y
46 S X=$P(ACGDT2,U,11),ACGSIGN=$S($E(X)="-":"-",1:""),ACGX=""
S:ACGSIGN="-" X=$P(X,"-",2)
S:10-$L(ACGSIGN)-$L(X) $P(ACGX,"0",10-$L(ACGSIGN)-$L(X))="" S X=ACGSIGN_ACGX_X
D Y
50 S X=$P(ACGDT2,U,15),ACGSIGN=$S($E(X)="-":"-",1:""),ACGX=""
S:ACGSIGN="-" X=$P(X,"-",2)
S:11-$L(ACGSIGN)-$L(X) $P(ACGX,"0",11-$L(ACGSIGN)-$L(X))="" S X=ACGSIGN_ACGX_X
D Y
157 S X=$E($P(ACGDT3,U,2)),X=$S(X]"":X,1:" ")
D Y
158 S X=$E($P(ACGDT3,U,3)),X=$S(X]"":X,1:" ")
D Y
159 S X=$P(ACGDT3,U,4),ACGSIGN=$S($E(X)="-":"-",1:""),ACGX=""
S:ACGSIGN="-" X=$P(X,"-",2)
S:10-$L(ACGSIGN)-$L(X) $P(ACGX,"0",10-$L(ACGSIGN)-$L(X))="" S X=ACGSIGN_ACGX_X
D Y
60 S X=$E($P(ACGDT3,U,5)),X=$S(X]"":X,1:" ")
D Y
161 S X=$E($P(ACGDT3,U,6),1,4),X=$S(X]"":"MULT",1:" ")
D Y
69 S X=$E($P(ACGDT3,U,14),1,12)
S:$L(X)<12 X=X_$J(" ",12-$L(X))
D Y
70 S X=" "
D Y
K ACGX
Q
Y S ACGY=ACGY_X
Q
ACGSDCI1 ;IHS/OIRM/DSD/THL,AEF - CONTROL CIS FIELDS AND EXPORT VARIABLES CON'T; [ 03/27/2000 2:22 PM ]
+1 ;;2.0t1;CONTRACT INFORMATION SYSTEM;;FEB 16, 2000
+2 ;;CONTROL CIS FIELDS AND EXPORT VARIABLES - CON'T
13 SET X=$EXTRACT($PIECE(ACGDT2,U,18),1,4)
SET X=$SELECT(X]"":X,1:" ")
+1 DO Y
18 SET X=$EXTRACT($PIECE(ACGDT2,U,16))
SET X=$SELECT(X]"":X,1:"2")
+1 DO Y
19 SET X=$EXTRACT($PIECE(ACGDT2,U,17))
SET X=$SELECT("ABC"[$PIECE(ACGDT3,U,7):" ",X]"":X,1:" ")
+1 DO Y
23 SET X=$EXTRACT($PIECE(ACGDT2,U,10))
SET X=$SELECT(X]"":X,1:" ")
+1 DO Y
25 SET X=$EXTRACT($PIECE(ACGDT3,U,7))
SET X=$SELECT(X]"":X,1:" ")
+1 DO Y
33 SET X=$EXTRACT($PIECE(ACGDT3,U,1))
SET X=$SELECT(X]"":X,1:" ")
+1 DO Y
37 SET X=$EXTRACT($PIECE(ACGDT2,U,19),1,30)
+1 IF $LENGTH(X)<30
SET X=X_$JUSTIFY(" ",30-$LENGTH(X))
+2 DO Y
38 SET X=$EXTRACT($PIECE(ACGDT2,U,20),1,12)
+1 IF X]""
SET X=$SELECT($LENGTH(X)=9:X,$LENGTH(X)=12:$EXTRACT(X,2,10),1:"")
+2 IF X=""
SET X=" "
+3 DO Y
42 SET X=$EXTRACT($PIECE(ACGDT3,U,8))
SET X=$SELECT(X]"":X,1:" ")
+1 DO Y
43 SET X=$EXTRACT($PIECE(ACGDT3,U,9))
SET X=$SELECT(X]"":X,1:" ")
+1 DO Y
44 SET X=$EXTRACT($PIECE(ACGDT3,U,10))
SET X=$SELECT(X]"":X,1:" ")
+1 DO Y
45 SET X=$PIECE(ACGDT3,U,11)
SET X=$SELECT('X:" ",$DATA(^AUTTSOB(X,0)):$PIECE(^(0),U),1:" ")
+1 DO Y
57 SET X=$PIECE(ACGDT2,U,12)
SET ACGSIGN=$SELECT($EXTRACT(X)="-":"-",1:"")
SET ACGX=""
+1 IF ACGSIGN="-"
SET X=$PIECE(X,"-",2)
+2 IF 10-$LENGTH(ACGSIGN)-$LENGTH(X)
SET $PIECE(ACGX,"0",10-$LENGTH(ACGSIGN)-$LENGTH(X))=""
SET X=ACGSIGN_ACGX_X
+3 DO Y
58 SET X=$PIECE(ACGDT2,U,13)
SET ACGSIGN=$SELECT($EXTRACT(X)="-":"-",1:"")
SET ACGX=""
+1 IF ACGSIGN="-"
SET X=$PIECE(X,"-",2)
+2 IF 10-$LENGTH(ACGSIGN)-$LENGTH(X)
SET $PIECE(ACGX,"0",10-$LENGTH(ACGSIGN)-$LENGTH(X))=""
SET X=ACGSIGN_ACGX_X
+3 DO Y
59 SET X=$PIECE(ACGDT2,U,14)
SET ACGSIGN=$SELECT($EXTRACT(X)="-":"-",1:"")
SET ACGX=""
+1 IF ACGSIGN="-"
SET X=$PIECE(X,"-",2)
+2 IF 10-$LENGTH(ACGSIGN)-$LENGTH(X)
SET $PIECE(ACGX,"0",10-$LENGTH(ACGSIGN)-$LENGTH(X))=""
SET X=ACGSIGN_ACGX_X
+3 DO Y
61 SET X=$EXTRACT($PIECE(ACGDT3,U,12),1,10)
SET ACGSIGN=$SELECT($EXTRACT(X)="-":"-",1:"")
SET ACGX=""
+1 IF ACGSIGN="-"
SET X=$PIECE(X,"-",2)
+2 IF 10-$LENGTH(ACGSIGN)-$LENGTH(X)
SET $PIECE(ACGX,"0",10-$LENGTH(ACGSIGN)-$LENGTH(X))=""
SET X=ACGSIGN_ACGX_X
+3 DO Y
+4 KILL ACGX
62 SET X=$EXTRACT($PIECE(ACGDT3,U,13),1,10)
SET ACGSIGN=$SELECT($EXTRACT(X)="-":"-",1:"")
SET ACGX=""
+1 IF ACGSIGN="-"
SET X=$PIECE(X,"-",2)
+2 IF 10-$LENGTH(ACGSIGN)-$LENGTH(X)
SET $PIECE(ACGX,"0",10-$LENGTH(ACGSIGN)-$LENGTH(X))=""
SET X=ACGSIGN_ACGX_X
+3 DO Y
+4 KILL ACGX
36 SET X=$EXTRACT($PIECE(ACGDT2,U),1,10)
SET ACGSIGN=$SELECT($EXTRACT(X)="-":"-",1:"")
SET ACGX=""
+1 IF ACGSIGN="-"
SET X=$PIECE(X,"-",2)
+2 IF 10-$LENGTH(ACGSIGN)-$LENGTH(X)
SET $PIECE(ACGX,"0",10-$LENGTH(ACGSIGN)-$LENGTH(X))=""
SET X=ACGSIGN_ACGX_X
+3 DO Y
+4 KILL ACGX
137 SET ACGFY=$EXTRACT($PIECE(ACGDT3,U,16),2)
+1 IF ACGFY=""
SET ACGFY=$PIECE(ACGDT1,U,3)
SET ACGFY=$SELECT($EXTRACT(ACGFY,4,5)>9:$EXTRACT(ACGFY,3)+1,1:$EXTRACT(ACGFY,3))
IF $LENGTH(ACGFY)=2
SET ACGFY=$EXTRACT(ACGFY,2)
SET $PIECE(ACGIHS,U,4)=9_ACGFY
+2 SET X=$EXTRACT($PIECE(ACGDT2,U,2),1,7)
SET X=$SELECT($LENGTH(X)=7:ACGFY_X,1:" ")
+3 DO Y
138 SET X=$PIECE(ACGDT2,U,3)
SET ACGSIGN=$SELECT($EXTRACT(X)="-":"-",1:"")
SET ACGX=""
+1 IF ACGSIGN="-"
SET X=$PIECE(X,"-",2)
+2 IF 10-$LENGTH(ACGSIGN)-$LENGTH(X)
SET $PIECE(ACGX,"0",10-$LENGTH(ACGSIGN)-$LENGTH(X))=""
SET X=ACGSIGN_ACGX_X
+3 DO Y
+4 KILL ACGX
39 SET ACGFY=$EXTRACT($PIECE(ACGDT3,U,17),2)
+1 IF ACGFY=""
SET ACGFY=$PIECE(ACGDT1,U,3)
SET ACGFY=$SELECT($EXTRACT(ACGFY,4,5)>9:$EXTRACT(ACGFY,3)+1,1:$EXTRACT(ACGFY,3))
IF $LENGTH(ACGFY)=2
SET ACGFY=$EXTRACT(ACGFY,2)
SET $PIECE(ACGIHS,U,4)=9_ACGFY
+2 SET X=$EXTRACT($PIECE(ACGDT2,U,4),1,7)
SET X=$SELECT($LENGTH(X)=7:ACGFY_X,1:" ")
+3 DO Y
40 SET X=$PIECE(ACGDT2,U,5)
SET ACGSIGN=$SELECT($EXTRACT(X)="-":"-",1:"")
SET ACGX=""
+1 IF ACGSIGN="-"
SET X=$PIECE(X,"-",2)
+2 IF 10-$LENGTH(ACGSIGN)-$LENGTH(X)
SET $PIECE(ACGX,"0",10-$LENGTH(ACGSIGN)-$LENGTH(X))=""
SET X=ACGSIGN_ACGX_X
+3 DO Y
41 SET ACGFY=$EXTRACT($PIECE(ACGDT3,U,18),2)
+1 IF ACGFY=""
SET ACGFY=$PIECE(ACGDT1,U,3)
SET ACGFY=$SELECT($EXTRACT(ACGFY,4,5)>9:$EXTRACT(ACGFY,3)+1,1:$EXTRACT(ACGFY,3))
IF $LENGTH(ACGFY)=2
SET ACGFY=$EXTRACT(ACGFY,2)
SET $PIECE(ACGIHS,U,4)=9_ACGFY
+2 SET X=$EXTRACT($PIECE(ACGDT2,U,6),1,7)
SET X=$SELECT($LENGTH(X)=7:ACGFY_X,1:" ")
+3 DO Y
142 SET X=$PIECE(ACGDT2,U,7)
SET ACGSIGN=$SELECT($EXTRACT(X)="-":"-",1:"")
SET ACGX=""
+1 IF ACGSIGN="-"
SET X=$PIECE(X,"-",2)
+2 IF 10-$LENGTH(ACGSIGN)-$LENGTH(X)
SET $PIECE(ACGX,"0",10-$LENGTH(ACGSIGN)-$LENGTH(X))=""
SET X=ACGSIGN_ACGX_X
+3 DO Y
143 SET X=$PIECE(ACGDT2,U,8)
SET ACGSIGN=$SELECT($EXTRACT(X)="-":"-",1:"")
SET ACGX=""
+1 IF ACGSIGN="-"
SET X=$PIECE(X,"-",2)
+2 IF 10-$LENGTH(ACGSIGN)-$LENGTH(X)
SET $PIECE(ACGX,"0",10-$LENGTH(ACGSIGN)-$LENGTH(X))=""
SET X=ACGSIGN_ACGX_X
+3 DO Y
144 SET X=$PIECE(ACGDT2,U,9)
SET ACGSIGN=$SELECT($EXTRACT(X)="-":"-",1:"")
SET ACGX=""
+1 IF ACGSIGN="-"
SET X=$PIECE(X,"-",2)
+2 IF 10-$LENGTH(ACGSIGN)-$LENGTH(X)
SET $PIECE(ACGX,"0",10-$LENGTH(ACGSIGN)-$LENGTH(X))=""
SET X=ACGSIGN_ACGX_X
+3 DO Y
46 SET X=$PIECE(ACGDT2,U,11)
SET ACGSIGN=$SELECT($EXTRACT(X)="-":"-",1:"")
SET ACGX=""
+1 IF ACGSIGN="-"
SET X=$PIECE(X,"-",2)
+2 IF 10-$LENGTH(ACGSIGN)-$LENGTH(X)
SET $PIECE(ACGX,"0",10-$LENGTH(ACGSIGN)-$LENGTH(X))=""
SET X=ACGSIGN_ACGX_X
+3 DO Y
50 SET X=$PIECE(ACGDT2,U,15)
SET ACGSIGN=$SELECT($EXTRACT(X)="-":"-",1:"")
SET ACGX=""
+1 IF ACGSIGN="-"
SET X=$PIECE(X,"-",2)
+2 IF 11-$LENGTH(ACGSIGN)-$LENGTH(X)
SET $PIECE(ACGX,"0",11-$LENGTH(ACGSIGN)-$LENGTH(X))=""
SET X=ACGSIGN_ACGX_X
+3 DO Y
157 SET X=$EXTRACT($PIECE(ACGDT3,U,2))
SET X=$SELECT(X]"":X,1:" ")
+1 DO Y
158 SET X=$EXTRACT($PIECE(ACGDT3,U,3))
SET X=$SELECT(X]"":X,1:" ")
+1 DO Y
159 SET X=$PIECE(ACGDT3,U,4)
SET ACGSIGN=$SELECT($EXTRACT(X)="-":"-",1:"")
SET ACGX=""
+1 IF ACGSIGN="-"
SET X=$PIECE(X,"-",2)
+2 IF 10-$LENGTH(ACGSIGN)-$LENGTH(X)
SET $PIECE(ACGX,"0",10-$LENGTH(ACGSIGN)-$LENGTH(X))=""
SET X=ACGSIGN_ACGX_X
+3 DO Y
60 SET X=$EXTRACT($PIECE(ACGDT3,U,5))
SET X=$SELECT(X]"":X,1:" ")
+1 DO Y
161 SET X=$EXTRACT($PIECE(ACGDT3,U,6),1,4)
SET X=$SELECT(X]"":"MULT",1:" ")
+1 DO Y
69 SET X=$EXTRACT($PIECE(ACGDT3,U,14),1,12)
+1 IF $LENGTH(X)<12
SET X=X_$JUSTIFY(" ",12-$LENGTH(X))
+2 DO Y
70 SET X=" "
+1 DO Y
+2 KILL ACGX
+3 QUIT
Y SET ACGY=ACGY_X
+1 QUIT