Translations:HOWTO:Compiling/Override the default compile/3/en

From Remain Software
Jump to navigation Jump to search

GUI

The TD/OMS Compile View enables you to overrides creation commands for the selected component. You will see in this section that sometimes we talk about Create and sometimes about Compile, we mean the same thing (strictly speaking, the compilation is just one way to create something). Compile overrides are create commands that differ from the normal commands for this specific type. Suppose you want to create all physical files with MAXMBRS(1) except for some special files. We are going to take this example in the following explanation.


TD/OMS Compile View

Open the Compile View by using the "Show in" context menu on a solution or component. In our case, we have selected file OMAPP. The following view is opened:


Ewm com01.png


The view shows overrides on the selection tab. In this case, there is already an override for this file when it is created in environment *DEV in application DEMO. If you click on this line then its create commands are loaded on the tab "Create Commands for Selected Line". Click on this tab to see the create commands for this selected line. If you want to see the default create commands for this object then press CTRL and click on the line again. The will be "unselected" and the second tab will change the contents to "Default Create Commands (not editable)". The default create commands for this component can then be viewed.

Creating a new Override

Press the big green Plusbutton.png button to create a new override selection. The "Copy Selected Set" tickbox determines if you want to copy the creation commands for the selected line into the new override. If you untick this box, the default create commands will be copied for this new override.


Ewm com02.png


The tick boxes indicate the selection for which this override is active. If you leave all the tick boxes unselected as shown in the previous picture then this override will be active for all occurrences of this file. You can restrict when the override is active by selecting one or more selection boxes.


Ewm com03.png


In this case we want to make one additional override to compile the file always with the MAXMBRS(*NOMAX) setting anywhere in the DEMO application. Tick the Application box as indicated in the above picture. Press the "Finish" button to create the override.


Changing the creation commands

Ewm com04.png


The "Selections" tab will be loaded with our new entry and it will be automatically selected. Selecting a line in the "Selections" tab will load the create commands in the "Create Commands for Selected Line" tab. Click on the tab to reveal the commands. Please note that the "Object Data" section will be collapsed to make more room for the create commands. If you wish, you can expand it manually.


Ewm com05.png


As you can see from the image, there are already compile commands created for this new entry. If you want to remove one of the default commands you can select it and press Deletebutton.png to remove it.

To create a new compile command, select the middle line that says "Compile Commands" and then press the Plusbutton.png button.


Ewm com06.png


a new wizard will pop up that enables you to create a new command. The command can be created in the "Pre" ,"Compile" or "Post" section. Since our view is already filled correctly, we just press "Finish". If you get a warning telling you that the sequence is already taken or the Finish button is not enabled, then press the "Check Availability" button to tell you if the sequence is available. Change the sequence if needed. There can only be one compile command, but many pre and post commands.

Also, specify the Behavior on Error field to indicate if you want this command to be executed:

No Error
Execute this command if no errors were found in any of the preceding commands.
Error
Execute this command if errors were found in any of the preceding commands. You can use this field to send a message or do error recovery.
Always
Always execute the command no matter how the previous commands ended.

Ewm com05.png


When we return to the Compile view we see that the compile command is copied from the default compile command. All we have to do is to alter our command and we can do that by pressing the "Prompt" (Promptbutton.png) button.

Ewm com08.png


In the prompt dialog we can change the values that we want and press "Finish" Please note that you can use Substitution variables that will be filled in by TD/OMS.


Ewm com09.png

Finally, press the "Save" button to save your work.

If you select a solution for Compile, you will see that the new compile command is active.