Well, I think if your job script is more than couple of hundreds lines of code then there is something wrong with the job design. Try to not put everything in one script. If you have any common processing in your script which you use again and again, create a user-defined function and move that code there. If the script does a lot of different things try to partition it into multiple independent jobs. This way you can also create restarting point you can use if you want to rerun only certain parts of the processing. Regarding the error. I would like to suggest turning on the tracing option (Tools/Options menu; Log page, Trace enabled) and re-running the script with the trace enabled. You can find all script trace files in the Performance Data directory or your can check SCRIPT.LOG file which contains trace for the most recent run. This trace should clearly show all commands with all executed parameters and their values and this should help you figuring out what went wrong. : How would someone, me, know when they are reaching the 32K storage limit? : We are already using several @SCRIPT: to pull in common code into our jobs : The error we are getting is: BETA: Pathology Charge Import v1.0: Remote job : execution error. Exit code: -1. An error occurred while executing : automation script: Line 551: Could not connect to server . Service not : available. Extended error code: 4. : This occurs when we are testing our “onerror routine” We are expecting the : job to continue processing through a CASE statement. But, instead, the job : hurls on the first concatex: ConcatEx ("AUTOMATION ERROR Processing : Notification - Charge Import (", job_name, ") - File : \"", source_file_name, "\"", error_mail_subject) : The error message is correct the server is unavailable. But I need to : continue processing the job and let script send an e-mail with the error. : When I try to paste the Concatex line into the “Immediate” window and press : F6 to run the code, a “Bad number of arguments” error is returned. : Additional testing came up with a different error. When trying to delete a : Read Only file. I get a 24x7 dialog box on the same line, line 551 the : Concatex line. “Error Copying file \\path\E4\filename Error: 0 the : operation complete successfully. “ : What am I doing wrong here? : The is the actual code from the script: ERROR_HANDLING: GetLastError : (job_error) : ConcatEx ("AUTOMATION ERROR Processing Notification - Charge Import : (", job_name, ") - File \"", source_file_name, : "\"", error_mail_subject) : ChooseCase (job_progress, END_CHOOSE_CASE_JOB_PROGRESS) : //Failure occurs before any files were moved or copied. : Case 10 : ConcatEx ("AUTOMATION ERROR Processing Notification - Charge Import : (", job_name, ")", error_mail_subject) : ConcatEx ("The automation error occurred before any file was : processed.", error_mail_body) : //The source file has been determined to be invalid but it has not been moved : //to the error subdirectory. : Case 20 : …- : Thank you for your help. : ~Joe
|