Hope you did a search for your query on the forum and Google, prior posting; there are numerous solutions available readily for this query.
Refer this recent post
, it explains how
you can send emails using SMTP (with and without attachments, you'll be required to tweak your JCL a li'l bit though).
Once you understand how an email can be sent, then you have multiple choices:
a. If the job in question is scheduler driven, then look at the scheduler email-ing mechanism, for example TWS can trigger emails depending on specific job return codes (check the manuals or speak to your site's job scheduling team on how this can be done)
b. If the job in question is non-scheduler driven, then look at the mechanism which is expected to trigger you next job - add an SMTP step to the same by testing earlier job's return code. Note - the job completion code is set to the highest return code of any step, or if the job's execution fails because of an ABEND, the job completion code is set to the last ABEND code. So you NEED
to build a mechanism that can test this completion code. If you have z/OS 1.13 or higher you can use JOBRC parameter to set condition codes for a JOB and then refer them back (word of caution - be very careful before using this setup).
Lastly, prior to designing anything on the lines of your requirement, you need to clarify what is meant by - 'successful completion of the job'; for some JCLs, a RC - 4 is acceptable, for some only RC - 0 is acceptable; and so on and so forth. Once you have this clarity and you know how the next job is to be triggered, then you can choose any of the above options and rig up a solution.