Connect Terminal

Declaration

<AMCONNECTTERM TYPE="text [options]" SESSION="text" PROMPT="text" EMULATION="text [options]" HOST="text" PORT="text" USERNAME="text" PASSWORD="1/tkzl3CuO7c=" PROMPTTIMEOUT="text" SHOWTERMINALWINDOW="YES" WAITFORPROMPT="YES" PROMPTISRE="YES">

See Also

Connect Terminal, Disconnect Terminal, Send Terminal Text, Get Terminal Text, Wait Terminal, Control Terminal

Description

Connects to a terminal using the specified emulation type and establishes a new Terminal Session name which can be used in subsequent Terminal actions.

Practical Usage

Used to begin a transaction with a terminal. This action is used in conjunction with the other terminal actions such as Get Terminal Text and Send Terminal Text. The terminal actions are used in leu of terminal emulation software. Using the terminal actions, legacy systems can be automated in the background without the use of 3rd party software.

Parameters

General Tab

Server Connection Type

Options, optional default tcp/ip
MARKUP: TYPE="SSH"

Specifies the type of connection to make. If unsure which to use, check with the administrator of the terminal.

The available options are:

TCP/IP: Connect using TCP/IP .

SSH: Connect using a secure socket.

Hostname

Text, Required
MARKUP: HOST="ftp.networkautomation.com"

Specifies the host server to connect to. This can be an IP address (i.e. xxx.xxx.xxx.xxx) or a server and domain name (i.e. server.domain.com).

User Name

Text, Required
MARKUP: USERNAME="Anonymous"

Specifies the username that should be used when logging on to the SSH server. The Username should be pre-configured at the server level. This parameter is only valid if TYPE= is set to SSH.

Password

Text, Required
MARKUP: PASSWORD="password here"

Specifies the password that should be used when logging on to the SSH server. The Username should be pre-configured at the server level. When the step is created using the Task Builder it is written to the task encrypted .This parameter is only valid if TYPE= is set to SSH.

Port

Number, Optional - Default - 23
MARKUP: PORT="7777"

Specifies the port that should be used to connect to the TCP/IP or SSH server. Usually this takes place on port 23 for TCP/IP and 22 for SSH, however it is possible to customize this setting on the server.

Session Name

Text, Optional - Default "TermSess1"
MARKUP: SESSION="terminalsession2"

Specifies the session name to identify this connect request in subsequent terminal steps. This allows several connections to be active simultaneously. If you are only using one connection at a time, do not specify a value other than the default.

Show Terminal Window

Yes/No, Optional - Default NO
MARKUP: SHOWTERMINALWINDOW="YES"

Specifies that a window will be displayed at runtime showing the results of the terminal transaction. This option is normally enabled while debugging the task so that the developer can see what is occurring in the session. It is normally disabled during production use so that the transaction occurs in the background and does not interfere with other tasks.

Advanced Tab

Emulation

Text [options], Optional - Default "ANSI"
MARKUP: EMULATION="TTY"

Specifies the emulation type that should be used.  If you are unsure of the value to use in this parameter, contact the server administrator or developer of the system.

The available options are:

NOTE: Check with Network Automation for software updates if the terminal type you need is not listed here. New terminal types are added regularly.

Resource Name

text, Optional - Default (none)
MARKUP: RESOURCENAME="Text>"

Specifies a resource name (LU name, device name or device pool name) for a session. This parameter is available only when TN3270 or TN5250 is selected from the Emulation Type parameter.

Default Prompt

text, Optional - Default (none)
MARKUP: PROMPT="READY>"

Specifies the prompt that is utilized on the target terminal system. This allows the terminal actions to Wait until a certain prompt appears before moving on to the next step. For example, on some terminal systems the prompt is the text "READY>". By specifying this value here, AutoMate will know to wait until that text appears before moving on.

Regular Expression

Yes/No, Optional - Default No
MARKUP: PROMPTISRE="YES"

Specifies that the text specified in Default Prompt (PROMPT=) is a regular expression and not literal text. This is useful in cases where the prompt may not always be the same but some portion of it is.

User Name (Proxy)

Text, Optional - Default (none)
MARKUP: PROXYUSERNAME="username"

Specifies the username that should be used to authenticate when connecting through the proxy server. This option is only valid when Socks 5 is specified in the Proxy type as it is the only version that supports authentication.

Wait for Prompt

Yes/No, Optional - Default No
MARKUP: WAITFORPROMPT="YES"

Specifies the password that should be used to authenticate when connecting through the proxy server. When the step is created using the Task Builder it is written to the task encrypted. This option is only valid when Socks 5 is specified in the Proxy type as it is the only version that supports authentication.

Notes

Custom Description

This action includes the Description tab for entering a custom step description.

More on setting custom step description

Standard Error Handling Options

This action also includes the standard Error Causes and On Error failure handling options/tabs.

More on Error Handling Options

Variables and Expressions

All text fields allow the use of expressions, which can be entered by surrounding the expression in percentage signs (example: %MYVARIABLE%, %Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by pressing F2.

More on variables
More on expressions

More on the expression builder

Example

NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.

<AMCONNECTTERM EMULATION="VT220" HOST="nethack.alt.org" SHOWTERMINALWINDOW="YES" />