Include - call another script file

Return to Introduction  Previous page  Next page

include filename

Where:

 

filenameis the full filename, including drive letter and path name, of a script file. Enclose the script filename in double quotation marks ("") if it contains embedded spaces or commas. This parameter may be a variable containing a script filename.        

 

 

The include command calls another script file. All the commands in the called script file are executed, and then processing continues in the calling script. An included script file may include additional script files. There is no limitation on how deeply script files can be nested.

If you have a group of commands that are used in many different scripts, put the group of commands into a separate script file and include that script file in place of the actual commands. Variables defined in the calling script are not available to the included script unless they are defined using the global script command.

Examples

includec:script.txt
includec:\scripts\script.txt
include$FILENAME

 

The following script calls scripts to logon 2 users.

 

include"c:\scripts\logon user 1.txt"
include"c:\scripts\logon user 2.txt"

exit

 

See Also:

 

Script Command Summary

Script Variables

Using the Scripting Language


TN3270 Plus is continually being improved. To learn more about the latest enhancements, please review our Version History web page.