Title: How do I determine what properties are set?

To discover what property settings are being used during local execution of a program on Windows, you can set iscobol.tracelevel=1 (or 3, 7, 15, etc) and set iscobol.logfile to the path and name of a file. You will see a trace of places where the runtime found properties and also the resulting property settings:


Mar 23, 2012 15.06.11.529 INFO: [CONFIG] [isCobol] iscobol.properties.sources=
       /etc/iscobol.properties
       From class path: C:/Users/dlubin/workspace_abc/project1/resources/iscobol.properties
Mar 23, 2012 15.06.11.529 INFO: [CONFIG] [isCobol] iscobol.logfile=../logs/log.txt
Mar 23, 2012 15.06.11.529 INFO: [CONFIG] [isCobol] iscobol.tracelevel=15
Mar 23, 2012 15.06.11.530 INFO: [CONFIG] [isCobol] iscobol.file.prefix=../data
Mar 23, 2012 15.06.11.530 INFO: [CONFIG] [isCobol] iscobol.font.small=Microsoft Sans Serif-08
Mar 23, 2012 15.06.11.611 INFO: ENTER PROGRAM 'PROGRAM1' {
Mar 23, 2012 15.06.11.612 INFO: ENTER PARAGRAPH 'MAIN' [PROGRAM1]
Mar 23, 2012 15.06.11.613 INFO: EXIT PARAGRAPH 'MAIN' [PROGRAM1]
Mar 23, 2012 15.06.11.613 INFO: EXIT PROGRAM 'PROGRAM1' }

For example,

Outside the IDE you can add these settings with -J-D options as in the following:

iscrun -J-Discobol.tracelevel=15 -J-Discobol.logfile=log.txt PROGRAM

Or you can add them to the properties file you specify on the command line as in:

iscrun -c config.properties PROGRAM or iscrun -J-Discobol.conf=config.properties PROGRAM

Inside the IDE you can add these settings in the "Run configuration" you are executing. To do this, select Run > Run Configurations..., select your run configuration and type the following into the System properties field:

-Discobol.tracelevel=15 -Discobol.logfile=../logs/log.txt

Or if you are not executing with a "Run configuration" then you can add these to the project's resourcesiscobol.properties file or other iscobol.properties file in your class path, or a file you have specified in the Project Properties > Settings > Compile/Runtime options Runtime tab with -Discobol.conf=config.properties, or you can add the following directly to the System properties field:

-Discobol.tracelevel=15 -Discobol.logfile=../logs/log.txt

Note that the trace file log.txt will be created in the logs folder relative to the parent folder of the working directory during execution. If your working directory is set to "output" as is the default then ../logs/log.txt will appear in the project's logs folder. You may need to right-click on the logs folder and select Refresh to see the log.txt file appear in the File view.

The reason that the IDE uses the properties in resourcesiscobol.properties is that it adds ../resources to the class path by default whenever you run a program, and class path is one of the places that isCOBOL looks for properties files.

See also What is the recommended method for specifying isCOBOL framework properties?

Authored by: Veryant Support on Wed, Mar 28th, 2012 at 7:00 PM
This question has been viewed 9313 times so far.
Online URL: http://support.veryant.com/support/phpkb/question.php?ID=193

Powered by PHPKB Knowledge Base Software