11.07.2015 Views

NetEx EFT213 Reference Manual Rel 5.4

NetEx EFT213 Reference Manual Rel 5.4

NetEx EFT213 Reference Manual Rel 5.4

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

and,eFT> text {days} are coming soon.eFT: Saturday and Sunday are coming soon.The braces around the variable name tell <strong>NetEx</strong>/eFT to replace it with its assigned value.Since local and global variables are stored differently within <strong>NetEx</strong>/eFT, it is possible to create a global variablewith the same name as a local variable. For example:eFT> set variable hostname alphaeFT> set global hostname omegaThe variable hostname has been defined twice, once as a local variable with a value of ‘alpha’ and again as aglobal variable with a value of ‘omega’. Because <strong>NetEx</strong>/eFT gives precedence to local variables, referencing{hostname} will result in the local value of ‘alpha’. A special syntax is used to reference the value of a globalvariable when a local variable of the same name exists. An example follows:eFT> text The local value is {hostname}.eFT: The local value is alpha.eFT> text The global value is {hostname:global}.eFT: The global value is omega.By default, when a variable is enclosed in braces (without the ‘:global’ syntax), <strong>NetEx</strong>/eFT looks for a localvariable by that name. If one is found, its value is returned. If one is not found, <strong>NetEx</strong>/eFT looks next for aglobal variable by the same name and uses its value if found. Appending the variable name with ‘:global’within the braces tells <strong>NetEx</strong>/eFT not to look for a local variable but instead look immediately for a globalvariable of that name.<strong>NetEx</strong>/eFT carries this special syntax one step further in allowing the substitution of <strong>NetEx</strong>/eFT commandqualifier values. These values can be used as variables as shown below. The syntax is:{qualifier:cmd}where qualifier is a valid qualifier (including informational qualifiers) for the specified command cmd. Forexample, if the current value of the SEND qualifier ‘CREATE’ was defined to be ‘new’, this could be referencedas:eFT> text SEND qualifier CREATE is {create:send}.eFT: SEND qualifier CREATE is new.The following example shows how the command qualifiers can be used to set the <strong>NetEx</strong>/eFT input prompt.Since the prompt is controlled by the INPUT command qualifier PROMPT, this can be modified to the usersliking. To change the prompt from the default of ‘eFT> ’ to the current name of the remote host (assume it’scalled STARMAN), the following command is used:eFT> set input prompt {} {host:remote}>STARMAN>The syntax {host:remote} says to extract the value of informational qualifier HOST from the REMOTEcommand defaults, and replace this value on the command line. (The empty {} is explained in the sectionentitled “Disabling String Substitution” on page 88.) The following command produces an equivalent result:eFT> set input prompt STARMAN>STARMAN>Although the result is equivalent, the second example above does not allow for flexibility within an alias orinput script, nor is it flexible enough to change for each connection made to a different remote host.REF-eFT213-R<strong>5.4</strong>-08 Advanced Local User’s Guide Page 65

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!