It exits after this. The table does exist, so that's not the problem.
Had the program defined the error handlers for the connection,
they would have told what's going wrong. In common Open
Client programs, the error handlers are defined first, so
they are called whenever an error or message is raised,
and then the handlers can report it.
Well, it looks like you borrowed most of the Open Client
code from the code generated by cpre, the Embedded
SQL/C precompiler. It should be clearer having a pure
Open Client code, but if you're trying to debug the program
without a full re-code, perhaps you may get a SQLCA
formatted with the error details if you run
after each Open Client command (as blk_alloc and blk_init).
After this, you may check SQLCA's sqlcode and its corresponding
error string sqlerrmc... but this is only a guess.