support: Customer Portal
Focused on delivering choice, investment protection and flexibility to organizations with valuable COBOL assets
 

Veryant Knowledge Base
Home > All Categories > Debugging > Windows > What is the recommended method for specifying isCOBOL framework properties?
Question Title What is the recommended method for specifying isCOBOL framework properties?
Question:

From the documentation it seemed that the best or recommended practice is to put all property settings in c:/etc/iscobol.properties. However, with this method it is difficult to maintain different settings for different programs. I have to edit the c:/etc/iscobol.properties file every time I want to switch programs.
What is the recommended solution?

Answer:

Unless iscobol.conf.only is set (or the corresponding command line option -conly is used, where applicable), isCOBOL can use several configurations at the same time. They are loaded in the following order, and the properties they contain are set in the order in which they appear in the respective files:
  1. system environment variables
  2. /etc/iscobol.properties
  3. iscobol.properties located in the user home directory
  4. iscobol.properties located in the Java Classpath
  5. -Discobol.conf=ownconfigurationfile or, where applicable, -c ownconfiguration file set at the command line
  6. $ISCOBOL/iscobol.properties
  7. -Discobol.* at command line
  8. -Discobol.remote.conf=remoteconfigurationfile and -c remoteconfigurationfile (set at the client command line in Thin Client environment)
In addition, you can specify:

-Discobol.conf=class_name

In this case iscobol.properties is loaded from the same directory as class_name

or

-Discobol.conf=http://www.mydomain.com/iscobol.properties

If a property is set in multiple places, isCOBOL will use the last read value.

Veryant recommends putting only the global property settings in c:/etc/iscobol.properties. These are the properties you want all programs for all purposes to use on the machine. It is common practice to put only the iscobol.license property in c:/etc/iscobol.properties.

For other properties there are two methods for reducing confusion:
  1. The safest thing is to only have one iscobol.properties file on your machine, the one in c:etc. Then create property files with different names for different purposes and specify their names on the command line when you run the program (See below for an example).
  2. Have separate object directories for each application. Put the application specific properties in a file named iscobol.properties in the object directory for that application. When you run a program make sure that CLASSPATH does not contain object directories for more than one application program (otherwise only the iscobol.properties file for the first application would be read).
You can specify a properties file on the command line as follows where FILENAME is the name of the properties file and PROGRAM is the name of the program:

iscrun -J-Discobol.conf=FILENAME PROGRAM

or

java -Discobol.conf=FILENAME com.iscobol.rts.Isrun PROGRAM

or simply

java -Discobol.conf=FILENAME PROGRAM

When using the debugger, the properties must be specified after the -d or debugger class name (GraphDebugger).

iscrun -d -Discobol.conf=FILENAME PROGRAM

or

java com.iscobol.debugger.GraphDebugger -Discobol.conf=FILENAME PROGRAM

Notice that the properties file is specified as the value of the iscobol.conf property. You can also specify other properties and "environment" variables for the COBOL program directly on the command line.

For example, to setup your program for remote debugging you could set iscobol.rundebug=2 as follows:

iscrun -J-Discobol.rundebug=2 PROGRAM

or

java -Discobol.rundebug=2 com.iscobol.rts.Isrun PROGRAM

For another example, suppose your program has

ACCEPT ENV FROM ENVIRONMENT "env_var"

You could set env_var on the command line as follows:

iscrun -J-Discobol.env_var=VALUE PROGRAM

or

java -Discobol.env_var=VALUE com.iscobol.rts.Isrun PROGRAM
Authored by: Veryant Support This question has been viewed 11137 times so far.
Click Here to View all the questions in Windows category.
File Attachments File Attachments
There are no attachment file(s) related to this question.
How helpful was this article to you?
User Comments User Comments Add Comment
There are no user comments for this question. Be the first to post a comment. Click Here
Related Questions Related Questions
  1. How can I monitor I/O activity on a specific file or folder in Windows?
  2. How can I tell what process has a file opened on Windows?
Article Information Additional Information
Article Number: 3
Created: 2009-08-28 12:03 PM
Rating: No Rating
 
Article Options Article Options
Print Question Print this Question
Email Question Email Question to Friend
Export to Adobe PDF Export to PDF File
Export to MS Word Export to MS Word
Bookmark Article
Subscribe to Article Subscribe to Article
 
Search Knowledge Base Search Knowledge Base



 
 

© Veryant - All Rights Reserved
Veryant and isCOBOL are trademarks or registered marks of Veryant in the United States and other countries. All other marks are the property of their respective owners.