XUS11 ;SFISC/RWF - READ AND STORE DA FROM TERMINALS ;3/11/93 07:48
;;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
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HXUS11 1084 printed Oct 16, 2024@18:12:39 Page 2
XUS11 ;SFISC/RWF - READ AND STORE DA FROM TERMINALS ;3/11/93 07:48
+1 ;;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