Status file format  

 

This file records the current command being processed by the shell program

 

The status file is created by V12Shell if it does not already exist.

 

The file has three lines:

 

Line 1: Current / final status code (numeric)

Line 2: Additional status information

Line 3: Additional status text

 

Line1: Current / final status code (numeric)

 

Single numeric value. Possible values:

 

0 = In progress

1 = Completed (no errors)

2 = Completed (with warnings - see error file)

3 = Terminated with errors

4 = Terminated by calling process (status file deleted)

 

The final status code is also returned to the caller in V12Shell’s exit code.

 

Lines 2 & 3: Additional status information

 

The content of the additional status lines depends on whether the script is still in progress or has terminated / completed (see previous section).

Script In progress

 

The status file is updated every time a new command is executed in the script file.

The content of the status file is as follows:

 

   Line 1: 0       - in progress

   Line 2: n       - line number in original script file

   Line 3: cmd  - command currently executing

 

The command (cmd) is the actual command (after arguments and environments have been substituted). This line starts with the date & time that the command was executed and it contains the full path to the exe.

 

Example script:

 

HDR1=UserProfiles\%2

HDR2=Errors\%1.err

HDR3=Status\%1.sts

IMPORT.EXE %INPUT% /AUTO /PARTS /FORMAT:8 /NOWRTBRD /OVERWRITE

BATCH.EXE %INPUT% /AUTO /OPTIMISE

SAWLINK.EXE /AUTO /SAWPATH=C:\Temp\ /TRANSMODE=11 /CADMATIC=CAD5 

SAWLINK.EXE /AUTO /SAWPATH=C:\Temp\ /TRANSMODE=6 /CADMATIC=CAD5

OUTPUT.exe /EXPORT /REPORTS=J /EXPORTPATH=C:\Temp\

 

When executing the line in bold, the status file might be:

 

0

4

20-Jan-20, 17:21:46 (506), c:\v12Shell\programs\IMPORT.EXE "Parts PTX import" /AUTO /PARTS /FORMAT:8 /NOWRTBRD /OVERWRITE

 

Script completed / terminated

 

Lines 2 & 3 act as a further explanation of an error condition (i.e code 3 in status line 1).

 

Line 2: Single numeric value

Line 3: Content depends upon line 2

 

Ranges for values in line 2 are:

       0 - 99 V12Shell initialisation errors / script errors

   100+ Child application errors

 

Status line 2

Error

Status line 3 (optional)

0

Key not found

 

1

Key not supported

 

2

No network key licences available

 

3

Script file not specified (must be 1st argument)

 

4

Script file does not exist

 

5

Bad argument ARGn (e.g n > 99, blank value)

Argument text

6

Bad script header HDRn (e.g n > 5, blank value)

Header text

7

No user profile specified (HDR1)

 

8

User profile not valid / does not exist (HDR1)

User profile path

9

User profile is already in use (HDR1)

User profile path [User name]

10

Status file not specified (HDR3)

 

11

Status file cannot be created (HDR3)

Status path

12

Status file has been deleted

Status path

13

Error file not specified (HDR2)

 

14

Error file path not valid / cannot be created (HDR2)

Error file path

15

User defined argument used in script has not been passed

[Line]:%n

16

Undefined environment variable used in script

[Line]:%NAME%

17

Invalid program timeout interval (HDR4) - must be 1-999

 

18

Invalid network licence timeout (HDR5) - must be 2-99

 

19

Child program not found

[Line]:<contents>

20

Another instance of stand alone shell is already running (cloud licence)

 

100

Child program terminated with error

[Line]:<contents>

101

Child program timeout

[Line]:<contents>

102

Key not found by child program

[Line]:<contents>

103

Key / modules not accepted by child program

[Line]:<contents>

104

Initialisation failure (child program)

[Line]:<contents> [extra error code]

 

 

 

 

[Line] = Line number in script file

<contents> = Contents of script line