Command-line arguments / script header files

 

The shell program runs from script files that contain the command line arguments

 

The first argument to the shell is the path of the script file:

 

v12shell <path of script file>

 

e.g.

 

v12shell c:\Scripts\00001.txt

 

Script header lines

 

Script header lines can be passed on the command line or stored in the script file. These have the form:

 

HDRn=<setting>

 

Where the <setting> field contains spaces, the command-line version must be enclosed in quotes.

(e.g “HDR1=C:\User Profiles\User 1”)

 

Command line settings take precedence over those in the script file.

 

Possible values are:

 

HDR1=<Path of a user profile to use>                    (Required)

HDR2=<Path of a unique error file to append to>         (Required)

HDR3=<Path of the unique status file>                   (Required)

HDR4=<Timeout interval for a V12 standalone app - mins> (Optional)

HDR5=<Timeout interval for network licence - mins>      (Optional)

 

The ‘Required’ script header lines generate a fatal error if they are not provided (see later table).

 

Script files may contain comment lines to annotate the script. A comment line begins with a semi-colon as the first (non space) character. Comments must occupy the whole line in the script file. It is not possible to append a comment to an existing line. Comments are omitted from the 'Script content' section in diagnostic mode (see later section).

 

Script user defined arguments (max 99)

 

Form:

 

ARGn=<setting>

 

Where the <setting> contains spaces, the command-line version must be enclosed in quotes.

(e.g “ARG1=Value with spaces”)

 

This argument is then referred to in the script by: %n.

 

Command line arguments for HDRn and ARGn can be in any order but the script name is always the first argument.

 

Program timeout

 

Default program timeout is 30 mins to allow for large optimisations.

This can be modified by setting a value in:

 

HDR4=nn   (values: 1 - 999 mins)

 

Network licence timeout

 

This is the time taken for a network licence to become re-available in the event that an application stops responding. The default for this is 5 minutes.

 

This can be modified by setting a value in:

 

HDR5=nn   (values: 2 - 99 mins)

 

Examples

 

Example 1: all information in script file (eg created at runtime)

 

v12shell c:\Scripts\00001.txt

 

[c:\Scripts\00001.txt]

 

;*** HDR1=<Path of a user profile to use>

HDR1=c:\V12\UserProfiles\UserProfile1

;*** HDR2=<Path of a unique error file to append to>

HDR2=c:\Errors\00001.err

;*** HDR3=<Path of the unique status file>

HDR3=c:\Status\00001.sts

batch.exe 00001 /AUTO /OPTIMISE

sawlink /AUTO /1

 

Example 2: all information passed on command line

 

v12shell c:\Scripts\00001.txt HDR1=… HDR2=… HDR3=…

 

[c:\Scripts\00001.txt]

 

batch.exe 00001 /AUTO /OPTIMISE

sawlink /AUTO /1

 

 

Example 3: User defined arguments

 

v12shell c:\Scripts\Template1.txt ARG1=Job00001 ARG2=Profile1

 

[c:\Scripts\Template1.txt]

 

HDR1=c:\V12\UserProfiles\%2

HDR2=c:\Errors\%1.err

HDR3=c:\Status\%1.sts

batch.exe %1 /AUTO /OPTIMISE

sawlink /AUTO /1

 

This is evaluated to:

 

HDR1:c:\V12\UserProfiles\Profile1

HDR2=c:\Errors\Job00001.err

HDR3=c:\Status\Job00001.sts

batch.exe Job00001 /AUTO /OPTIMISE

sawlink /AUTO /1