This topic describes items to be aware of when you use the REXEC command.
The REXEC server is restricted to running commands that are allowed in batch jobs. The command must have *BATCH as one of the Where allowed to run values.
The maximum length of a command that the REXEC server can process is 4000 bytes. Some REXEC clients limit the command to a smaller length.
For spawned paths, the program that runs in the child process must be either a program object in the QSYS.LIB file system (*PGM object) or a shell script. You must specify the path with the correct syntax for the file system in which the file exists.
For Qshell commands, you can put the same commands that you enter at an interactive command line into a noninteractive shell script.