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

Veryant Knowledge Base
Home > All Categories > isCOBOL Compiler > I need to compile one of my programs with different compiler options than the rest of the programs in a project. How can I do this either inside the IDE or from the command line?
Question Title I need to compile one of my programs with different compiler options than the rest of the programs in a project. How can I do this either inside the IDE or from the command line?

Inside the IDE

From the IDE there are two possible solutions, using the program's specific properties, or using the IMP OPTION directive.

Using the program properties

Though each project has a set of properties, you can override these at the program level.
For instance, let's say that one program in a project needs to be compiled with the -big compiler option due to the size of the source code.
But the -big compile options should not be used by all the programs in a project, because it may cause a performance problem.

Right click that specific source program and select "Properties", go to "isCOBOL Settings", click on the "B" tab, then select "-big", apply and close the window.

You can do the same for your source program that needs different compile switches than the rest of the project.
The title bar of the properties window will have the name of your program, for example "Properties for MYPROG.cbl".
Modify the settings as you need to, and apply and close the properties window.
You will see an asterisk next to the program name in the structural area:

to denote that this program uses different properties settings than the rest of the project. Everytime you compile your project, this program will use those different settings.

Be aware that these settings belong to the specific project where they were set.
In other words, if you copy or link this program into another project or if you recreate the workspace or share it with other developers via SVN, you will lose these settings and you'll need to manually set them back in the new workspace.

Using the IMP Option Directive

To make a change in compiler options for one program, you can add the IMP OPTION Directive in the very first line of the source code.

For example:

       >>IMP OPTION "-dz #di"
              program-id. eg001.
       ...

Use the - symbol to include a compile options, and the # symbol to remove a compile option.
In the above sample, the program eg001 will be always compiled with the -dz option and will never be compiled with the -di option.

Be aware that there are some compile switches that cannot be used with the IMP OPTION directive.
You can get more information about this in the isCOBOL SDK User's Guide in the Compiler Directives section.

From the command prompt

The second option above, using the IMP OPTION directive, is the best way to customize the compile options for a specific program when you are compiling from a command prompt.

Authored by: Veryant Support This question has been viewed 3655 times so far.
Click Here to View all the questions in isCOBOL Compiler 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. Is there any disadvantage to using -cp compiler option for full pointer support?
  2. Does isCOBOL support traditional Printer Reporting?
  3. Can you provide an example ant build script (e.g. build.xml)?
Article Information Additional Information
Article Number: 296
Created: 2018-09-20 8:47 AM
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.