DSExecute

Use the DSExecute function to run a DOS, UNIX, or engine command from a before-stage subroutine or an after-stage subroutine.

Syntax


Call DSExecute (ShellType, Command, Output, SystemReturnCode)

ShellType (input) specifies the type of command that you want to execute and is NT, UNIX, or UV (for engine).

Command (input) is the command to execute. Command should not prompt for input when it is executed.

Output (output) is any output from the command. Each line of output is separated by a field mark, @FM. Output is added to the job log file as an information message.

SystemReturnCode (output) is a code indicating the success of the command. A value of 0 means the command executed successfully. A value of 1 (for a DOS or UNIX command) indicates that the command was not found. Any other value is a specific exit code from the command.

Remarks

Do not use DSExecute from a transform; the overhead of running a command for each row processed by a stage will degrade performance of the job.