Menu

EsqlOC en GnuCobol

Anonymous
2023-06-17
2023-06-18
  • Anonymous

    Anonymous - 2023-06-17

    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?

     
  • Simon Sobisch

    Simon Sobisch - 2023-06-18

    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:

    1. provide an own log implementation (that possibly uses syslog on GNU/Linux) -DEXTERNAL_LOG yourlog.o
    2. go with the default logging implementation
    3. disable logging completely (not suggested) -DEXTERNAL_LOG

    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).

     

Anonymous
Anonymous

Add attachments
Cancel