XUS11 ;SFISC/RWF - READ AND STORE DA FROM TERMINALS ;3/11/93 07:48 [ 04/02/2003 8:29 AM ]
;;8.0;KERNEL;**1002,1003,1004,1005,1007**;APR 1, 2003
;;8.0;KERNEL;;Jul 10, 1995
A W !!,"This routine will get the ANSI DA for your terminal.",!,"And allow you to save it."
W !,"First lets get the DA response from your terminal",!,">"
X ^%ZOSF("TYPE-AHEAD") S D1=""
W $C(27,91,99) R *X:2 I X=27 F R X#1:2 S D1=D1_X Q:'$T!(X="c")
I $E(D1,1)'="[" W !!,$C(7)," This doesn't start with a '[' like it should." G EXIT
S DIC="^%ZIS(3.22,",DIC(0)="MZ",X=D1 D ^DIC S DA=+Y
G B:DA'>0
W !,"This DA code is already assigned to terminal type: ",$P(Y(0),U,2)
S DIR(0)="Y",DIR("A")="Want to change this" D ^DIR G EXIT:$D(DIRUT)!(Y'=1)
B W !,"Now, What terminal type are you on?"
S DIC="^%ZIS(2,",DIC(0)="AEMQ" D ^DIC G EXIT:Y<1 S T1=$P(Y,U,2)
W !!,"ANSI DA response of ",D1,!?7," to set sign on to terminal type ",T1
S DIR(0)="Y",DIR("A")="OK to file this" D ^DIR G EXIT:$D(DIRUT)!(Y'=1)
S DIC="^%ZIS(3.22,",DIC(0)="MLZ",DLAYGO=3,X=D1 D ^DIC S DA=+Y
I $P(Y(0),U,2)'=T1 S DIE=DIC,DR="2///"_T1_";3" D ^DIE
W !,"Done"
;
EXIT K DIR,DIE,DIC,T1,D1,Y
Q
XUS11 ;SFISC/RWF - READ AND STORE DA FROM TERMINALS ;3/11/93 07:48 [ 04/02/2003 8:29 AM ]
+1 ;;8.0;KERNEL;**1002,1003,1004,1005,1007**;APR 1, 2003
+2 ;;8.0;KERNEL;;Jul 10, 1995
A WRITE !!,"This routine will get the ANSI DA for your terminal.",!,"And allow you to save it."
+1 WRITE !,"First lets get the DA response from your terminal",!,">"
+2 XECUTE ^%ZOSF("TYPE-AHEAD")
SET D1=""
+3 WRITE $CHAR(27,91,99)
READ *X:2
IF X=27
FOR
READ X#1:2
SET D1=D1_X
IF '$TEST!(X="c")
QUIT
+4 IF $EXTRACT(D1,1)'="["
WRITE !!,$CHAR(7)," This doesn't start with a '[' like it should."
GOTO EXIT
+5 SET DIC="^%ZIS(3.22,"
SET DIC(0)="MZ"
SET X=D1
DO ^DIC
SET DA=+Y
+6 IF DA'>0
GOTO B
+7 WRITE !,"This DA code is already assigned to terminal type: ",$PIECE(Y(0),U,2)
+8 SET DIR(0)="Y"
SET DIR("A")="Want to change this"
DO ^DIR
IF $DATA(DIRUT)!(Y'=1)
GOTO EXIT
B WRITE !,"Now, What terminal type are you on?"
+1 SET DIC="^%ZIS(2,"
SET DIC(0)="AEMQ"
DO ^DIC
IF Y<1
GOTO EXIT
SET T1=$PIECE(Y,U,2)
+2 WRITE !!,"ANSI DA response of ",D1,!?7," to set sign on to terminal type ",T1
+3 SET DIR(0)="Y"
SET DIR("A")="OK to file this"
DO ^DIR
IF $DATA(DIRUT)!(Y'=1)
GOTO EXIT
+4 SET DIC="^%ZIS(3.22,"
SET DIC(0)="MLZ"
SET DLAYGO=3
SET X=D1
DO ^DIC
SET DA=+Y
+5 IF $PIECE(Y(0),U,2)'=T1
SET DIE=DIC
SET DR="2///"_T1_";3"
DO ^DIE
+6 WRITE !,"Done"
+7 ;
EXIT KILL DIR,DIE,DIC,T1,D1,Y
+1 QUIT