What determines the return codes that triggers off the next job to run.

For instance 'On Success' where does the system pick up the return code that tells it that the prior step completed successfull?

I am submitting os/390 jobs but I have jcls that are abending but still the next jobs are submitted even thogh I specified that these should run after the first job has completed successfully.