The example below is taken from a script file for configuring a M3904 Terminal.
The main bit to remember is CLS "FLXA & VCE".
I hope it helps you.
TRANSMIT "NEW^M"
WAITFOR "TYPE"
TRANSMIT "3904"
TRANSMIT "^M"
WAITFOR "TN"
TRANSMIT OPDATA_A
TRANSMIT "^M"
WAITFOR "DES"
TRANSMIT "ATA"
TRANSMIT "^M"
; WAITFOR "CTYP"

ONLY FOR FIRST PORT ON CARD
; TRANSMIT "^M"
; WAITFOR "KBA"

; TRANSMIT "^M"

REQUIRED FOR 3904
; WAITFOR "DBA"
; transmit "^M"
WAITFOR "FDN"
transmit "^M"
WAITFOR "TGAR"
transmit "^M"
WAITFOR "LDN"
transmit "^M"
WAITFOR "NCOS"
transmit "^M"
WAITFOR "RNPG"
transmit "^M"
WAITFOR "SSU"
transmit "^M"
WAITFOR "SCPW"
transmit "^M"
WAITFOR "SGRP"
transmit "^M"
WAITFOR "SFLT"
transmit "^M"
WAITFOR "CAC_MFC"
transmit "^M"
WAITFOR "CLS"
transmit "FLXA VCE^M"
WAITFOR "HUNT"
transmit "^M"
WAITFOR "SCI"
transmit "^M"
WAITFOR "PLEV"
transmit "0^M"
WAITFOR "AST"
transmit "^M"
WAITFOR "IAPG"
transmit "^M"
WAITFOR "MLWU_LANG"
transmit "^M"
; WAITFOR "MLNG" ; USED FOR RELEASE 25.40 +
; transmit "^M"
WAITFOR "DNDR"
transmit "^M"
WAITFOR "DTMK"
transmit "^M"
; WAITFOR "CAC_MFC"
; transmit "^M"
WAITFOR "KEY"
transmit "00 SCR XXXX"
WAITFOR "CPND"
transmit "^M"
WAITFOR "VMB"
transmit "^M"
WAITFOR "KEY"
TRANSMIT "^M"
waitfor "REQ"
All the best
Firebird Scrambler
Meridian Programmer in the UK