Jmp exit code -2I have a JSL script I run on a server repeatedly every few minutes. The script runs fine most of the time (it returns exit code 0 995 times out of 1000). I run it like this: jmp.exe MyScript.jsl I cannot find any exit code documentation. Does anybody know what an exit code -2 vs exit code 0 means? Is there somewhere exit codes are documented?
Re: Jmp exit code -2Hi EHR,
I looked and I don't see JMP throwing a -2 error. Return codes in Windows are usually 8 digits, like 0x80010023. However, the few times I've seen -2 in the past in was usually a file contention issue, like the file was open in one application, and another application had access to the file blocked when it attempted to open the file.
Brian Corcoran
JMP Development
Re: Jmp exit code -2Hi Thanks for the reply. What would be a way to put in some error handling and / or logging to confirm or deny that this is the issue?Re: Jmp exit code -2I don't think I know enough about your situation to even make a recommendation. Are you starting this from a Windows Task Scheduler? Manually from a command prompt? The Task Scheduler has it's own log. You could emit information from the script to disk as to when you start and end processing with a time stamp. If you get a failure between the start and end markers in a Task Scheduler log, you can probably say the second task was blocked by another. If you are opening data files and trying to write them back out, it is not hard to imagine a case where a second task could not open the file successfully.
Brian
Re: Jmp exit code -2Hi Bryan
Thanks your reply. EHR and I work together. We run the JSL on Win 2012 server (many drones) using our own scheduler. In the end of the script we use the below:
wait(0);
Close All( Data Tables, No Save );
wait(0);
Exit(NoSave);
Exit(0);
Quit(0);
Intermittently we get the "-2" exit code. There is a possibility that the exit code number is truncated. We are looking into that.
We save the JMP log at the end of script execution and the exit code "0" and "-2" log looks identical. Both times we get the data that we need but get this bad exit code (non-zero).
Can you please share the guide to exit codes that JMP may return? Also, we are using JMP 12.
Re: Jmp exit code -2We see these 2 bad exit codes: -2 and -2146234327
So, the exit codes are not truncated
You help with the meaning for these would be greatly appreciated
Re: Jmp exit code -2Hi Girija,
Neither of these codes corresponds to codes that JMP issues. -2, like I said, typically means file contention between two processes trying to get write access to the same file. The other number, even when converted to hexadecimal, does not correspond to anything I know.
Brian
Re: Jmp exit code -2Thanks for the reply.
Re: Jmp exit code -2Hi Brian
Can you please also help us understand these exit codes?
-532462766
-1073741819
Thanks.
Cheers,
Girija
Re: Jmp exit code -2The first is hex 0xc0000005 , which is an access violation (crash) in Windows for any application. The second looks like a crash in the .NET runtime, perhaps from JMP but perhaps something else (hex 0xE0434352 ).
It would be helpful to know if there are steps to reproduce these results that could be run interactively, either through the UI or scripting.
Brian