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 > Having specific needs to compile a program with different compiler options than the rest of the programs in a project; how can you accomplish this task either inside the IDE or from the command line?
Question Title Having specific needs to compile a program with different compiler options than the rest of the programs in a project; how can you accomplish this task either inside the IDE or from the command line?

Inside the IDE

From the IDE there are two possible solutions:

Using the program properties

Let's say that the program in question, due to its size, needs to be compiled with the -big compiler option. This option may cause a performance issue, which cannot be used by all the programs in a project.
Right click the particular source program and select "Properties", go to the B tab and select "-big"

In the Title's bar of the Properties windows, you can see the name of the specific program for example "Properties for SONGS.cbl", then you can set all the properties you need for this specific program.
Afterwards save it; every time you compile or execute this program, the IDE will take these properties instead of the project's ones.
You are also able to know which programs have set their own compiler options because an asterisk will be shown at the very beginning of the program's name, like the SONGS.cbl shown below:

Something that you should be aware of is 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 of the project or if you share it with other developers via SVN, you will lose these settings, and you will need to manually set them back in the new workspace.

Using the IMP Option Directive

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

In the above sample, the program eg001 will be always compiled with the -dz option and never will be compiled with the -di option, and this is due to the - or the # symbols preceding the compiler options in the string.


From the command prompt

You may use the same 2nd approach described above: "Using the IMP Option Directive"

Authored by: Veryant Support This question has been viewed 303 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.