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.

within the input level, or input file, in which it was initially defined. If an input file is nested, it cannot referencelocal variables defined by its caller. A local variable defined within an input file is no longer valid afterthat input file is exited.A global variable can be defined from any input level, or input file, and referenced by any other one. That is,once a global variable is defined within a <strong>NetEx</strong>/eFT session, that variable is known throughout the session,regardless of the current input level. Generally it is better to use local variables whenever possible since thesedo not get left around from input file to input file. Global variables, on the other hand, take up <strong>NetEx</strong>/eFTinternal storage and can eventually lead to an “Environment overflow” condition. This condition may be relievedby undefining some previously defined global variables as described later in this section. This will recoverinternal storage space, even though the undefined variable will still be displayed with a null value.Variables can be defined in a couple of ways. The most obvious is with the SET VARIABLE and SETGLOBAL commands. SET VARIABLE is used to define a local variable. SET GLOBAL defines a globalvariable. An example of each of these appears below:eFT> set variable username smithand,eFT> set global days Saturday and SundayIn the first case, local variable username was given the value ‘smith’. In the second case global variable dayswas assigned the value ‘Saturday and Sunday’. Keep in mind, all variables are defined as character strings.To show the current value of the variables defined above use the SHOW VARIABLE and SHOW GLOBALcommands respectively:eFT> show variable usernameeFT: USERNAME .......... smithand,eFT> show global dayseFT: DAYS .............. Saturday and SundayTo undefine a local or global variable, use the SET command with the variable name and no value. For example,to undefine the two variables described above, use the following commands:eFT> set variable usernameand,eFT> set global daysAn undefined variable will appear in a SHOW VARIABLE or SHOW GLOBAL display as a variable withouta definition. If an undefined variable is referenced within a <strong>NetEx</strong>/eFT command, a null string is substitutedin its place.The second way to define a local variable is with the ASK command. The example below defines the variableusername again, but using ASK:eFT> ask -prompt “Enter Username: ” usernameEnter Username: smithThe real significance of string variables is the ability to use them within <strong>NetEx</strong>/eFT aliases and input scripts.To reference the value of a variable, enclose the variable name in braces {} within a <strong>NetEx</strong>/eFT commandline (this invokes string substitution). Refer back to the variables username and days above. Their values canbe used in the TEXT command as:eFT> text The value of variable username is {username}.eFT: The value of variable username is smith.Page 64 Advanced Local User’s Guide REF-eFT213-R<strong>5.4</strong>-08

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

Saved successfully!

Ooh no, something went wrong!