isCOBOL supports a library routine named "C$WRITELOG".
This routine will add custom information to an isCOBOL log file.
When running with the configuration iscobol.tracelevel set to a value greater than 0, the parameter that is sent to C$WRITELOG will be written in the log file.
Code example:
string "before apply-discount, w-price=" w-price into logline perform CALL-WRITELOG CALL-WRITELOG. call "C$WRITELOG" using logline initialize logline
These are some lines of isCOBOL logfile created with iscobol.tracelevel=15:
Info: ENTER PARAGRAPH 'CALL-WRITELOG' [MYPROG] Info: before apply-discount, w-price= 0000061.31 Info: EXIT PARAGRAPH 'CALL-WRITELOG' [MYPROG] Info: ENTER PARAGRAPH 'APPLY-DISCOUNT' [MYPROG] Info: EXIT PARAGRAPH 'APPLY-DISCOUNT' [MYPROG] Info: ENTER PARAGRAPH 'CALL-WRITELOG' [MYPROG] Info: after apply-discount, w-price= 0000055.17 Info: EXIT PARAGRAPH 'CALL-WRITELOG' [MYPROG] Info: EXIT PROGRAM 'MYPROG' }
Article ID: 270
Created: April 29, 2016
Last Updated: December 21, 2022
Author: Support KB Author
Online URL: https://support.veryant.com/phpkb/article.php?id=270