Dear Technical Support, Thanks! I have modified my code to generate an exit code upon failure that is detected by the Scheduler. Is there any way to kill the current job using the script besides exit? What I am trying to determine is if there is a JAL command to stop a process if an error is encountered? The situation right now is that my JAL script can detect the process exit code and exit the SCRIPT but it still detects the semaphore file that will run the subsequent child process. I would like the script to stop/suspend/kill/disable the current job (parent process) instead of just exiting the script so that the semaphore files will not be created? Is this possible? Lin : There is no way to determine if a VB program "logic" failed. If it : is not a poorly written program it should log errors to some file or : Windows NT event log or inform users by other means. If it is a poorly : written program then you are out of lack. : 1. There is only one exit code, this is an exit code of the process, it does : no matter how and which tool (VB/C/Perls/Java/etc...) was used to : implement that process. Every Windows process uses Windows API function : ExitProcess to stop running and return some exit code. That's it. : 2. See first paragraph in this post : 3. The scheduler evaluates all possible error conditions and processes them : accordingly. For example, if a semaphore cannot be deleted this causes the : job to be marked as failed. As for the RaiseError you can use this : statement to force job errors, see example below : Dim file_found : // Check file before loading it to the database : FileExists "c:\\load\\data.txt", file_found : If file_found, LOAD_IT : // File not found, raise error and terminate this job : RaiseError "File c:\\load\\data.txt not found, database load : aborted" : LOAD_IT: ... some commands here : ===================================================================
|