Register Hereor login if you are already a member
What type of program are you trying to compile?
RPG, CL, other?
What is the error message you are getting when you get the failure?
A RUNSQLSTM will produce a SPLF. Did you look into that form more information? Did you use COMMIT(*NC)? you should.
Your job should produce a spool file. Look in there for a more specific message.
look here https://itknowledgeexchange.techtarget.com/itanswers/sql9010-error-when-using-runsqlstm/
Perhaps that will help.
Without the actual SQL statement and/or errors from the job log we can't help you find the issue.