I’m not aware of any command that tells you the binding directory used, the DSPPGM and DSPSRVPGM only tell you what’s bound to the program.
You could create a utility that determines what modules and service programs are currently bound to an existing program and create a temporary binding directory that could be used automatically.
Alternatively, you could do what I do which is to always have a binding directory with the same name as the program being created. I then have a home grown command which submits the compiles for *PGM and *SRVPGM objects with the appropriate name of the binding directory and entry procedure. It forces you to use standards, but that’s not a bad thing.
All the best