How to list the Autosys jobs thats in failure status using Shell Script

hello There,
I am pretty much new to Shell Scripting and also to AutoSys. I would like to know how to list the Autosys jobs in FA status using shell scripting. I would like to get an email alert as and when any Autosys job fails. Also, it should give the path of the Log file.

Could you please respond to this query at the earliest.

Thanks,
Supragna