Can any one tell me how to store the return code of particular job step into a PS file

Thanks
As a beginner, you will probably not be able to do this. There is no "standard" jcl that will capture some previous return code and store it in a file.Can any one tell me how to store the return code of particular job step into a PS file