Which CALL SYSTEM options affect backup restoration reliability across platforms?
20.5K reputation · 05 Dec 2025, 19:16 UTC
We need to guarantee that a REXX restoration script that uses CALL SYSTEM produces the same data integrity results on IBM i, Unix, and Linux. The goal is to detect failures and verify that the restored files match the original backup.
CALL SYSTEM executes a native shell command and returns a status code, but the way the status and any command output are exposed to the REXX program varies by platform. On IBM i the command output can be captured into a REXX variable when the command is quoted, while on Unix/Linux this feature is not supported without external redirection. Additionally, option syntax for utilities such as tar, rsync, or db2 backup/restore differs, potentially causing silent corruption if the script assumes a single syntax.
Because the script relies on CALL SYSTEM to invoke the backup utility, it is unclear whether a non‑zero status will be automatically detected and whether the output can be used to confirm success across all target systems.
Which CALL SYSTEM syntax guarantees a reliable return status on IBM i, Unix, and Linux? Does capturing command output into a REXX variable on IBM i provide a mechanism that is unavailable on Unix/Linux, and how should a script handle this discrepancy? Which options or wrappers are needed to ensure that the restored data can be verified reliably regardless of platform?