Action syntax

Action syntax is used to specify an action to invoke, along with its parameters. This syntax is used in x3270 keymaps, c3270 keymaps, wc3270 keymaps, macros, scripts and at the x3270 prompt.

There are two forms of action syntax, formal and informal.

Formal syntax
The basic form of formal syntax is:

action-name([parameter[,parameter...]])

Note that the parentheses and commas between the parameters are required.

If nothing is specified between a parenthesis and a comma, or between two commas, it is interpreted as a zero-length parameter.

The basic advantage of formal syntax is that is allows multiple actions to be specified on a single line.

Informal syntax
The basic form of informal syntax is:

action-name [parameter...]

Note: Informal syntax cannot be used in x3270 keymaps.

Quoting
Double-quote characters (") are used to in both forms to surround a parameter that contains a space. In formal syntax, double quotes must also surround parameters that include commas or parentheses.

To include a double-quote in a parameter, put a backslash (\) before it. To end a parameter with a backslash, double the backslash. Backslashes have no other special significance.

Examples
Invoke the String action with the parameter. String(hello) String hello Invoke the Wait action with the parameters  and. Wait(1,Seconds) Wait 1 Seconds Invoke the String action with the parameter  ('hello' followed by a space). String("hello ") String "hello " Invoke the String action with the parameter. String("hello\n") String "hello\n" Invoke the String action with the parameter. String("my \"real\" cat") string "my \"real\" cat" Invoke the String action with the parameter. String("say \"hi\\") string "say \"hi\\" Invoke the String action with two parameters: an empty string and. String(,xxx) string "" xxx Invoke the String action and then the Enter action. String(xxx) Enter