Chapter Contents




Sends characters to the remote host as if they were typed at a terminal

All connections

Syntax Description
ASCII Control Character Mnemonics
3270 Key Mnemonics
3270 TYPE Statement Example


TYPE text;

Syntax Description

is the user-specified string of characters sent to the remote host.


The TYPE statement sends characters to the remote host as if they had been typed on a terminal that is attached to that system. For example, in a script that automatically logs on to the remote host, you use a TYPE statement to issue the remote host logon command.

text can be any combination of the following:

If you use TYPE statements in the script and some characters that are specified by the statement are not typed, try using the WAITFOR statement to establish a pause in script execution between TYPE statements.

To use a TYPE statement greater than 80 characters in a sign-on script, divide the TYPE statement into two or more TYPE statements. To divide the TYPE statement, insert a hyphen (-) at the division point. For example, to divide the following TYPE statement:

type "sas options ('dmr comamid=pclink')" 

change it to:

type "sas options ('dmr comamid=-" enter;
type "pclink')" enter;

Note:   Do not add any spaces around the hyphen.  [cautionend]

ASCII Control Character Mnemonics

To specify an ASCII control character in the TYPE statement, use a mnemonic representation of the character. The following table lists the ASCII control characters and corresponding mnemonics, decimal codes, and hex values.

Note:   As you use these control characters,


ASCII Character Mnemonics
ASCII Control Character Mnemonic Representation Decimal Value Hexadecimal Value
Null character NUL 0 00
Start of header SOH or CTL_A 1 01
Start of text STX or CTL_B 2 02
End of Text ETX or CTL_C 3 03
End of transmission EOT or CTL_D 4 04
Enquiry ENQ or CTL_E 5 05
Acknowledge positive ACK or CTL_F 6 06
Bell BEL or CTL_G 7 07
Backspace BS or CTL_H 8 08
Horizontal tabulation HT or CTL_I 9 09
Line feed LF or CTL_J 10 0A
Vertical tabulation VT or CTL_K 11 0B
Form feed FF or CTL_L 12 0C
Carriage return CR or CTL_M 13 0D
Shift out SO or CTL_N 14 0E
Shift in SI or CTL_O 15 0F
Data link escape DLE or CTL_P 16 10
Device control 1 (XON) DC1 or CTL_Q 17 11
Device control 2 DC2 or CTL_R 18 12
Device control 3 (XOFF) DC3 or CTL_S 19 13
Device control 4 DC4 or CTL_T 20 14
Negative acknowledge NAK or CTL_U 21 15
Synchronization SYN or CTL_V 22 16
End of text block ETB or CTL_W 23 17
Cancel CAN or CTL_X 24 18
End of medium EM or CTL_Y 25 19
Substitute SUB or CTL_Z 26 1A
Escape ESC 27 1B
File separator FS 28 1C
Group separator GS 29 1D
Record separator RS 30 1E
Unit separator US 31 1F
Blank space SP 32 20
Delete or rubout DEL 127 7F

3270 Key Mnemonics

Users with 3270 connections can specify certain 3270 keyboard keys in the TYPE statement by specifying a mnemonic representation of the key. One type of key that can be specified is an attention ID key (abbreviated AID key). An AID key requests the attention of the remote host so that the remote host receives input from the emulated 3270 terminal. The other type of key that can be specified is one that performs a local 3270 function, for example, cursor keys. Keys performing local functions do not solicit a response from the remote host.

The following list shows the mnemonics for AID keys. Note that the mnemonics correspond to the names of the keys on the 3270 keyboard.

PA1 PF1 PF9 PF17
PA2 PF2 PF10 PF18
PA3 PF3 PF11 PF19

AID keys cannot always be used in rapid succession, just as you cannot necessarily press them in succession on your keyboard. You may need to use a WAITFOR statement between TYPE statements that specify successive AID keys in order to wait for the appropriate response from the remote host. This is particularly true for CMS hosts.

The following figure shows the 3270 local function key mnemonics and the corresponding 3270 keys.

3270 Function Keys and Mnemonics


3270 TYPE Statement Example

The following example of the TYPE statement for 3270 connections combines a literal string with an AID key mnemonic:

type 'sas options(dmr comamid=pclink)' ENTER;

Chapter Contents



Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.