I have custom created command to convert spool file into PDF. It is used in RPG programm using ' QCMDEXC'. This works fine if I call this command from Green Screen. When I call the same programm from remotely i.e through FTP ( qoute rcmd call pgm(lib/pgm_name) then QCMDEXC gives problem.In it's formated dump it shows that (spool) file not found.
To solve this I added the library when programm called but still the problem persist.