cancel
Showing results for 
Search instead for 
Did you mean: 

run_journal.exe control return codes (ERRORLEVEL)

Genius
Genius

All,

 

I'm using a batch script that executes a journal.

How can I steer the return codes for run_journal.exe from within my journal?

 

this way i can detect if my journal has run succesfully. Also if i catch an exception in the journal, I want to control the error handling in my Batch script.

 

thanks

Fred

 

 

2 REPLIES

Re: run_journal.exe control return codes (ERRORLEVEL)

Siemens Phenom Siemens Phenom
Siemens Phenom

 

Before you launch your journal with run_journal, set this environment variable:

 

UGII_TMP_DIR=C:\some\convenient\folder

 

Note that the folder must already exist!

 

Then set this one:

 

UGII_KEEP_SYSTEM_LOG=YES

 

That one will force NX to retain the log file that it generates while running your Journal.  It should show up in the folder you pointed to with UGII_TMP_DIR, and the extension should be ".syslog".

 

The log should contain information about anything that went wrong, and I think it should let you see whether the Journal executed successfully.

Re: run_journal.exe control return codes (ERRORLEVEL)

Genius
Genius

Hi Steve,

 

Your input gave me an other/simular idea.

I added an extra argument to the run_journal commandline. The argument specifies an errorlog-file.

When the journal is complete there are 2 posibilities in the batch file:

- The errorlog does not exist == All is OK

- The errorlog exists == send the logfile by email to the user by VBScript

 

Thanks

Fred