Is it necessary to compile. p where the respective .i file has new changes? but it will not impact program running.
In this case just copy the latest .i file to respective directory is fine?
If you want a compiled (dot-r) program to incorporate the coding changes in a dot-i that the source dot-p references then, yes, you must recompile the dot-p.
Take these two files for example:
/* test.p
*/
message "dot-p, first statement".
{include.i}
/* include.i
*/
message "some code in include include.i"
When you compile test.p it incorporates include.i as it exists at that moment. I.e.:
compile test.p save.
run test.p. /* you can run either the .p or the .r, if a .r exists it will be used */
If you then later change include.i, none of the changes are known to the dot-r until you recompile. So, after compiling as shown above, modify include.i. Then just RUN test.p again without recompiling. Your changes are not incorporated. Now both COMPILE and RUN again and your changes are seen.