ACGSTATE ;IHS/OIRM/DSD/THL,AEF - CON'T OF ACGSIMP1 SETS LOCAL VARIABLES; [ 03/27/2000 2:22 PM ]
;;2.0t1;CONTRACT INFORMATION SYSTEM;;FEB 16, 2000
STATE S (ACGSTNAM,ACGSTCD,ACGSTDA)=""
I $L(ACGSTATE)>2 S ACGSTDA=$O(^DIC(5,"B",ACGSTATE,0)) I ACGSTDA,$D(^DIC(5,ACGSTDA,0)) S ACGSTNAM=ACGSTATE,ACGSTCD=$P(^(0),U,3) Q
I $L(ACGSTATE)=2 S ACGSTDA=0 F S ACGSTDA=$O(^DIC(5,ACGSTDA)) Q:'ACGSTDA I ACGSTATE=$P(^DIC(5,ACGSTDA,0),U,3) S ACGSTNAM=$P(^(0),U),ACGSTCD=ACGSTATE Q
Q
ACGSTATE ;IHS/OIRM/DSD/THL,AEF - CON'T OF ACGSIMP1 SETS LOCAL VARIABLES; [ 03/27/2000 2:22 PM ]
+1 ;;2.0t1;CONTRACT INFORMATION SYSTEM;;FEB 16, 2000
STATE SET (ACGSTNAM,ACGSTCD,ACGSTDA)=""
+1 IF $LENGTH(ACGSTATE)>2
SET ACGSTDA=$ORDER(^DIC(5,"B",ACGSTATE,0))
IF ACGSTDA
IF $DATA(^DIC(5,ACGSTDA,0))
SET ACGSTNAM=ACGSTATE
SET ACGSTCD=$PIECE(^(0),U,3)
QUIT
+2 IF $LENGTH(ACGSTATE)=2
SET ACGSTDA=0
FOR
SET ACGSTDA=$ORDER(^DIC(5,ACGSTDA))
IF 'ACGSTDA
QUIT
IF ACGSTATE=$PIECE(^DIC(5,ACGSTDA,0),U,3)
SET ACGSTNAM=$PIECE(^(0),U)
SET ACGSTCD=ACGSTATE
QUIT
+3 QUIT