File Input

You invoke the MaxL Shell to run scripts (instead of typing statements at the keyboard) in the following ways. See MaxL Invocation Summary for a complete description of login flags.

File Only

File Only

File Only

If you type essmsh followed by a file name or path, the shell takes input from the specified file.

Examples:

essmsh C:\Hyperion\products\Essbase\EssbaseClient\scripts\filename.msh

Entered at the command prompt, this starts the shell, tells it to read MaxL statements from a file, and terminates the session when it is finished.

essmsh filename

Starts the shell to read MaxL statements from filename, located in the current directory (the directory from which the MaxL Shell was invoked).

File with Arguments

If you type essmsh followed by a file name followed by an argument or list of space-separated arguments, essmsh remembers the command-line arguments, which can be referenced as $1, $2, etc. in the specified file. If spooling is turned on, all variables are expanded in the log file.

Example:

D:\Scripts>essmsh filename.msh Fiona sunflower localhost newuser

Starts the shell to read MaxL statements from filename.msh, located in the current directory.

Contents of script filename.msh:

spool on to $HOME\\output\\filename.out;
login $1 $2 on $3;
create user $4 identified by $2;
echo "Essbase is installed in $ESSBASEPATH";
spool off;
exit;

Contents of logfile filename.out:

MAXL> login Fiona sunflower on localhost;

      49 - User logged in: [Fiona].

MAXL> create user newuser identified by sunflower;

      20 - User created: ['newuser'].

Essbase is installed in C:\Hyperion\products\Essbase\EssbaseClient