Connect

 View Only
  • 1.  Your scheduler retried the job. Connect ETL had already finished it with warnings.

    Employee
    Posted 10-06-2026 13:01
    What I noticed
    I had a Connect ETL job that completed, produced output, and exited with return code 100. The scheduler saw a non-zero exit code and marked the job as failed. It retried. The job ran again, wrote to the same target, and created duplicates. No one noticed until downstream reconciliation caught the double writes. The problem was not the job. The problem was that the scheduler had no idea return code 100 is not a failure.
    The dmexpress and dmxjob executables have documented return codes, which indicate success, completed execution but with warnings, and execution failed job or task aborted. If a Connect ETL job or task has been run from a script, the return code can be captured using the syntax of the type of shell that has been used, and used to determine whether there were exceptions or if there was a fatal error which caused the job or task to abort. For example, if a Connect ETL task has been run from a bash script:


    I had a Connect ETL job that completed, produced output, and exited with return code 100. The scheduler saw a non-zero exit code and marked the job as failed. It retried. The job ran again, wrote to the same target, and created duplicates. No one noticed until downstream reconciliation caught the double writes. The problem was not the job. The problem was that the scheduler had no idea return code 100 is not a failure.

    The dmexpress and dmxjob executables have documented return codes, which indicate success, completed execution but with warnings, and execution failed job or task aborted. If a Connect ETL job or task has been run from a script, the return code can be captured using the syntax of the type of shell that has been used, and used to determine whether there were exceptions or if there was a fatal error which caused the job or task to abort. For example, if a Connect ETL task has been run from a bash script:

    #!/bin/bash
    dmexpress /run MyTask1.dxt &>> logfile.txt
    rc1=$?

    dmexpress /run MyTask2.dxt &>> logfile.txt
    rc2=$?

    # if return code 1 does not equal either 0 or 100, we have a fatal return code for task 1
    # if return code 2 does not equal either 0 or 100, we have a fatal return code for task 2
    # if either of these conditions is true, we want the whole script execution to be recognized as failed
    if [[ ($rc1 -ne 0 && $rc1 -ne 100) || ($rc2 -ne 0 && $rc2 -ne 100) ]];
    then
      # "exit 111" will exit the whole script with a return code of 111
      exit 111
    fi

    The logic in that example is the key: `if rc -ne 0 AND rc -ne 100` then it is a fatal return code. Return codes 0 and 100 are both acceptable. Everything else is not.


    This maps directly to the severity model that Connect ETL uses at the subroutine level as well. A completion status of `DMX_SUCCESS` indicates that the call completed successfully or with minor exceptions. A minor exception does not preclude further calls to Connect ETL subroutines. You can determine if a minor exception occurred by invoking `dmx_get_error_number`.
    A zero return indicates success and a non-zero return is the error number for the last minor exception encountered.
    You can find the severity of a minor exception by invoking `dmx_get_highest_severity`.

    The severity level is as follows: 0 = success; 1 = warning minor exceptions occurred;
    2 = severe the target produced by Connect ETL may be incorrect or incomplete.

    A completion status of `DMX_FAILURE` indicates that the call failed. You should make no further calls to Connect ETL subroutines, including `dmx_clear`. You can find the cause of the failure by invoking `dmx_get_error_number`.


    The distinction between severity 1 (warning) and severity 2 (severe) is operationally important. A warning means the job completed output was produced but something noteworthy occurred. A severe means the output may be incorrect or incomplete. Neither is the same as an abort.

    Why this design works


    Predictability: The three-way distinction success, warning, abort is documented and stable. The same severity levels apply across `dmexpress` command-line jobs, `dmxjob` job files, and the API subroutine layer. The return code contract does not change between invocation methods.

    Reliability: The warning return code (100) preserves the ability for the calling process to make an informed decision. The job is finished. Data landed. Whether that is acceptable depends on what the warning was not on whether the return code is zero.

    Operational Safety: The abort return code definitively signals that the job did not complete. No output should be trusted. A retry of an aborted job is safe. A retry of a warning-completed job there output was already written requires understanding whether the target is idempotent before deciding.

    What's different for license errors / undefined environment variables:


    There is one extra step.

    The product will issue a `KEYEXP` error and abort if the key is expired no grace period. A `KEYEXPWARN` warning is issued when the key is nearly expiring (90 days for most key types). The warning message does **not** change the product return code.

    This is the trade-off: you get the warning in the log for 90 days, but the return code stays 0 during that window. Your scheduler will not alert you. You have to look at the log, or watch for the eventual abort when the key finally expires.
    Running a task or job that concatenated a text constant containing an undefined environment variable could cause the job to abort. The job stops with messages like: `Connect: (INERR) An internal error has occurred`.

    This is an abort not a warning. The return code will be non-zero and non-100. A scheduler that retries on any non-zero code will retry this repeatedly and find the same undefined variable every time, producing the same abort each time.

    For finding the specific cause of any message: when DMExpress issues error/warning messages in the log file, an explanation and recommended corrective action for the message can be found via the DMExpress Server dialog (Windows only) by clicking on the message mnemonic, or via the `syncmsg` command-line utility (Windows and UNIX), which provides detailed information on exceptions. All messages are listed in the Connect ETL Help topic "List of Connect ETL server messages".


    Why this matters in production

    Most enterprise schedulers Control-M, Autosys, cron, shell wrappers default to treating any non-zero exit code as failure. 
    Connect ETL returns 100 for a completed job with warnings. Unless the scheduler is explicitly configured to treat 100 as acceptable, it will:

    1. Mark the job as failed
    2. Trigger retry or downstream failure alerting
    3. Potentially re-run a job that already wrote output


    The bash example above is the correct pattern for any wrapper script: check explicitly for return codes 0 and 100 as acceptable, then translate all other return codes into a single failure signal that the scheduler understands. The specific failure code chosen (111 in the example) can be whatever the scheduler framework interprets as a non-retriable failure versus a retriable one that decision belongs to the orchestration layer, not to Connect ETL.


    If you ever see a job that ran twice when it should have run once, and the log shows return code 100 for the first run, the scheduler is the place to look not Connect ETL.

    What changed for me:

    I used to add `|| exit 1` at the end of wrapper scripts to propagate any non-zero code. After the duplicate-write incident, I changed to the pattern above — check explicitly for 0 and 100, exit with a custom failure code only for everything else. I also started logging the actual `dmexpress` return code to a separate audit file, separate from the task log. That way the scheduler's retry logic and the actual job return code are both visible without having to parse the full log to understand what happened.

    Takeaway

    Connect ETL returns three distinct states from a job or task: success (0), completed with warnings (100), and aborted (anything else). Schedulers that treat all non-zero codes as failure will incorrectly classify warning completions as aborts and retry jobs that already produced output. The fix is a wrapper script that explicitly allows 0 and 100 as acceptable, translates all other codes into a single scheduler-understood failure signal, and logs the actual return code separately for visibility.

    Have you encountered a Connect ETL job that was retried by the scheduler due to return code 100, and what wrapper logic did you put in place to prevent it from happening again?



    ------------------------------
    Adhitya Maya
    *Precisely Software Inc.
    ------------------------------


  • 2.  RE: Your scheduler retried the job. Connect ETL had already finished it with warnings.

    Employee
    Posted 10-08-2026 01:35
    This is an important reminder that a Connect ETL return code of 100 means "completed with warnings," not "failed." Treating all non-zero return codes as failures can lead to unnecessary retries, duplicate writes, and downstream data quality issues. Explicitly handling both 0 and 100 as acceptable outcomes in wrapper scripts is a simple but effective operational safeguard.
    Thanks for sharing this practical lesson learned.


    ------------------------------
    Neha Goel
    *Precisely Software Inc.
    ------------------------------



  • 3.  RE: Your scheduler retried the job. Connect ETL had already finished it with warnings.

    Employee
    Posted 10-08-2026 08:58

    That's a useful reminder. Understanding how application return codes are interpreted by the scheduling framework is just as important as understanding the job itself. Aligning those expectations can help avoid unnecessary retries.



    ------------------------------
    Sathya LJK
    *Precisely Software Inc.
    ------------------------------