DB-Library’s DBCURCMD returns the number of the current logical command.
In Client-Library, ct_res_info(CS_CMD_NUMBER) returns the number of the current logical command.
The following Client-Library code fragment demonstrates the use of ct_res_info to get the current command number:
CS_INT cur_cmdnum; ... ret = ct_res_info(cmd, CS_CMD_NUMBER, &cur_cmdnum, CS_UNUSED, NULL); EXIT_ON_FAIL(context, ret, "ct_res_info(CMD_NUMBER) failed.");