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.

Using <strong>NetEx</strong>/eFT Labels and GOTOsTo make <strong>NetEx</strong>/eFT scripts even more powerful, users can merge string functions with GOTO processing.The GOTO command instructs script processing to continue at the specified label, either backwards or forwards.The format is:CommandGOTOParameterslabelWhere:labelis an alphanumeric string from one to twenty characters (including underscores) in length.All labels are case sensitive and must appear somewhere within the current input level. That is, if the GOTOappears within an input script, the matching label must also be in that input script. If the GOTO appears in aninteractive input level, the matching label must also be found within that interactive level. The format of acommand line that contains a label is:label: [command]The colon immediately following the label is required. The label can appear on a line by itself, or it may befollowed by a valid <strong>NetEx</strong>/eFT command or alias. The following is an example of a simple loop alias:* Sample GOTO/Label script. Send 5 files* having the names FILE1 thru FILE5.*set variable count 1LOOP:send FILE{count}set variable count {inc(count)}{le(count, 5, "goto LOOP")}*text All files sent.The variable count is first initialized to 1. The next line simply declares a label called LOOP. The SENDcommand is then issued for a file named FILEx where x is the current value of count. Following that, the variablecount is reset to its value plus one (incremented by one). Finally, a check is made on the value of count.If it is less than or equal to 5, the GOTO LOOP command is substituted as the next <strong>NetEx</strong>/eFT command andprocessing branches up to label LOOP. If count exceeds 5, processing falls through to the next command outsideof the loop.It is important to remember that <strong>NetEx</strong>/eFT treats labels as case sensitive. Therefore, one must make sure thata label specified on a GOTO command matches the actual label’s case exactly. Duplicate labels (labels thathave the same name with identical case) are considered an error.Whenever a GOTO or a label is encountered during command line processing, all future commands get storedinternally within <strong>NetEx</strong>/eFT. The number of commands that can be stored is limited by the amount of availablememory allocated for the process which varies from machine to machine. The best practice is to avoidletting scripts that contain GOTOs become too large.Since scripting is really an interpretive command language, <strong>NetEx</strong>/eFT must parse each command as it executesit. Therefore, an error within a script will not be caught until the script is run and the erroneous conditionis encountered. A missing label, for example, will result in the entire script being read before an errormessage is given.GOTO and labels may also appear at the interactive session level. Refer to the GOTO command in“Command Descriptions” on page 115 of this manual for further information.Page 94 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!