PC-Files

Solution for the Oracle and C-Compiling Error

Just have a look on the *.pc Files in the same directories. You must not compile the *.c Files but the *.pc Files by using "make all". The CC-Compiler is part of Oracle, but Oracle is using a Precompiler (proC) to compile *.pc-Files (see a part of unregister.pc) with Oracle Syntax into compileable C-Code. Then this code is compiled to executeable binaries. That should work with the standardconfiguration after installation.

---------------------------------------------- BEGINPARTOF: UNREGISTER.PC -----------------------------------------------
#ifdef DEBUG
fprintf(fpdebug,"lvanr %d.\n",lvanr);
fprintf(fpdebug,"semester %s.\n",semester);
fprintf(fpdebug, "matnr %d.\n", matnr);
fflush(fpdebug);
#endif

EXEC SQL CALL datamgr.unregister(:lvanr, :semester, :matnr, :datum, :erfolg) INTO sqlerr;

if(sqlerr != 0) {
if(sqlerr == 100) {
SendAnswerFile(0,"You are not registered.");
} else {
snprintf(buffer, BUFFER_LENGTH, Internal Error, Please contact the admin. Errorcode: %d", sqlerr);
SendAnswerFile(0, buffer);
}
}

if (erfolg == 0) {
SendAnswerFile(0,"You are not registered.");
}

EXEC SQL COMMIT WORK RELEASE;

SendAnswerFile(0,"You are unregistered successfully.");
}
else
SendAnswerFile(0,"Wrong identification, Please check your number!");
}
---------------------------------------------- ENDPARTOF: UNREGISTER.PC -----------------------------------------------

Taggings:

Subscribe to PC-Files