Hello Chaitnya and welcome to the forums,
Can any one tell me how to store the return code of particular job step into a PS file
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.
As was mentioned, you would need to use the system control info and this is typically not something a beginner would do.
Why do you want the rc in a file? If we understand your requirement, we may be able to offer suggestions.