NSN scripts can be executed in three modes:
Start the NSN environment for executing the .bas scripts, by executing the following commands at the server console:
NSNINIT
This command loads the NSNINIT.NLM and should be typed only once.
NSN <scriptname>
Example: NSN hello.bas. This example executes the script created in Section 2.4, Creating NSN Scripts.
The NSN shell is similar to the DOS environment. NSN shell includes several commands (for example, COPY, CD, MD, RD and DIR) that are the same as DOS commands. These commands are also NSN scripts that can be used for reference and customized as needed. They are located in the SYS:\NSN\UTIL directory.
The general convention is that all the utility scripts should be stored under the UTIL directory and all the user-created scripts should be stored under the USER directory.
Start the NSN environment by typing the following commands at the server console:
NSNINIT
This command loads the NSNINIT.NLM and should be typed only once.
NSNSHELL
This command activates the NSN shell with SYS:\> prompt. Any number of shells can be opened by typing this command in the server console.
Test the configuration by typing dir at the NSN shell. This generates the directory listing of the root directory of the volume SYS.
Type script name inside the shell.
Syntax: scriptname
Example: Hello. This examples executes the script hello.bas created in Section 2.4, Creating NSN Scripts
NOTE:NSN\UTIL and NSN\USER directories are included in the search path. If the file is saved under a different directory then the working directory should be changed or the absolute file path should be used to execute the script.
Example: If the script is stored under SYS:\NSN\SCRIPT\SAMPLES the working directory or the absolute file path should be set to that path before executing the script by typing CD \NSN\SCRIPT\SAMPLES in the shell. Then the shell will be displayed as SYS:\NSN\SCRIPT\SAMPLES\.
To execute a script from the browser the script or the subdirectory containing the script should be in the SYS:\NSN\WEB directory.
Type the URL, of the form http://<Servername>/nsn/<Destinationfolder>/<scriptname>
Example: http://testserver/nsn/hello.bas
The URL should contain the full path of the script, when the script is present in a subdirectory under the folder WEB.
Example: http://testserver/nsn/test/hello.bas where test is a subdirectory created by the user under SYS:\NSN\WEB.