How to get exit code in CDM

Categories: Scripts; Tagged with: ; @ January 14th, 2013 15:18


Need to catch the exit code, handle the Error based on the exit code.


Use %ErrorLevel% – Almost all applications will set an exit code when complete (by conversion, 0 means successful).


Example 1:
copy file1.txt file3.txt
ECHO ...%ErrorLevel%

copy fileNotExisting.txt f.txt
ECHO %ErrorLevel%


“1 file(s) copied”

“The system cannot find the file specified.”


Example 2:

copy "%PKG_PATH%\Logs\….dtsx.log" ..



How to check the exit code of the last command in batch file?

AutoSys Job multiple dependencies issue: s(1) & s(2) & s(3) job triggered multiple time

Categories: Development Notes; Tagged with: ; @ January 4th, 2013 19:15


I got 4 jobs: 1, 2, 3, 4.

2’s condition: s(1); 3’s condition: s(2); 4’s condition: s(1) & s(2) & s(3)

all these jobs are daily jobs

the first day is ok. the second day, the 4th job triggered mutilple times:

I think when 1 success, because the status of 2 and 3 are still ‘success'(the last days status), so the job 4 triggered,

then 2 success, 4 triggered again…

but I only want these jobs run in the same period.


1. the first solution I can found is using ‘Look-Back Dependencies’:

Example: Define Starting Conditions Based on Job Success in a Given Duration
This example (specified in the job definition for JobA) runs JobA if JobB has completed successfully in the last 12 hours:
condition: success(JobB,12)
Example: Define Starting Conditions Based on the Status of Multiple Jobs in a Given Duration
This example (specified in the job definition of JobA) runs JobA if JobB has failed in the last 30 minutes and JobC has completed successfully on external instance XYZ in the last 90 minutes:
condition: failure(JobA,00.30) AND success(JobC^XYZ,01.30)

This should can work, but I based on my test, seems still cannot fix my issue.

2.  Using Box.

Put all these jobs in one Box, and when the Box is triggered, all the jobs’s status  in this box will be reset. 

AutoSys can get the failure in Java application

Categories: Java; Tagged with: ; @ January 4th, 2013 19:07

Problem:  Java application invoke SSIS package using ‘Process’, when the package failed, Auto-sys treat as success.

Solution: When ‘Process’ exit with a non-zero status code:

System.exit(10); // by convention, a nonzero status code indicates abnormal termination.

(Actually, we can config this status in Auto-Sys)


Auto-sys Reference Guide:

// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.