Suppose I have a program RPG1, I have attached binding directory DIR1, DIR2 and DIR3 to it during compilation. These are not specified in the HSpec of the program.
The program is now compiled.
Now how do I get the complete list of binding directory attached to this program.
It seems to me that it doesn't. BNDDIR is just an indication to the compiler where to look for those procedures that are not directly in the program text (external procedures). No more. There is no need to keep a list of them after compilation. Strictly speaking, BNDDIR stores only an indication of where this or that external procedure is located. And instead of BNDDIR, the compiler can be explicitly told to use SRVPGM to search for such procedures. So in the program it is rather necessary to look for which SRVPGMs are used there. This can be done with the DSPPGMREF command