In my c++ program, I called db2SelectDB2Copy() to select a non-default copy, then call sqlegins() to get the current instance name for that copy. db2SelectDB2Copy() returned 0, however, sqlegins() returned sqlcode 6031. SQL6031N Error in the db2nodes.cfg file at line number "0". Reason code "3".
Everything is fine if I do it from command line.
Is there any step I'm missing?