When implementing the FDMERGE program we hit a bizarre error: the command runs successfully when I have 5 pages, but when I try a 150 page file I get a return code of 4. There is no trace of it in the log files on the PC server, but I can see the finished PDF in the RJSTEMP folder.
The process is timing out - you'll need to extend the timeout value:
Check the HTTP timeout. Default is 60 seconds.
Example for changing timeout to 10 minutes
CHGDTAARA DTAARA(WINSPOOL/FDTIMEOUT) VALUE(600)