EN windows funciona bien. Al terminar la ejecución envia a pantalla las intruccuines sql que se emplearon. Esto no es problema, porque ya termino la ejecución. En Linux tambien funciona, pero envia a pantalla las instrucciones sql a medida que se ejecutan, esto si es un problema porque interfiere con el programa. ¿Como hago para que en linux no envie a pantalla las intrucciones sql a medida que se ejecutan?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For the default implementation you can specify the default log level at compile time with -DLOGLEVEL=999 (that's the default) and set the log level for each process at runtime with OCSQL_LOGLEVEL=999 via environment. The higher the number the more is logged (statements look like level 901, so if you set it to 900 you'll not get any output).
The default implementation sents all its output to stderr, so you could do something like cobcrun PROG 2>ocesql_log_and_runtime_errors.log (the runtime errors from GnuCOBOL can be sent to a separate file - see its manual).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
EN windows funciona bien. Al terminar la ejecución envia a pantalla las intruccuines sql que se emplearon. Esto no es problema, porque ya termino la ejecución. En Linux tambien funciona, pero envia a pantalla las instrucciones sql a medida que se ejecutan, esto si es un problema porque interfiere con el programa. ¿Como hago para que en linux no envie a pantalla las intrucciones sql a medida que se ejecutan?
This is about the logging on the rutime part, which has its code here: https://sourceforge.net/p/gnucobol/contrib/HEAD/tree/trunk/esql/ocsql/ocsql2.cpp#l102 - In general you have three options for logging at compile time:
-DEXTERNAL_LOG yourlog.o-DEXTERNAL_LOGFor the default implementation you can specify the default log level at compile time with
-DLOGLEVEL=999(that's the default) and set the log level for each process at runtime withOCSQL_LOGLEVEL=999via environment. The higher the number the more is logged (statements look like level 901, so if you set it to 900 you'll not get any output).The default implementation sents all its output to stderr, so you could do something like
cobcrun PROG 2>ocesql_log_and_runtime_errors.log(the runtime errors from GnuCOBOL can be sent to a separate file - see its manual).