The TOP software includes a
programmer's editor which can be used for software development. The
editor supports most common programming languages, including C, COBOL,
TAL and TACL. It is also possible to compile, build and run
programs directly from the editor, making the edit-compile-test cycle
very fast. TOP also provides an interface to PC-based compare and merge
programs, a valuable tool when
maintaining code provided by a third party.
This page provides some
information
on configuring and using TOP
as an integrated development tool (IDE). Further information is in the
product help. Click on the example you want to see.
Using
the Editor with Compiler Output -
show
Compiling
from the Editor -
show
Run from the Editor -
show
Comparing files -
show
Example: Using the Editor with Compiler Output
This is the quickest way to see how TOP uses compiler output with the
editor.
-
Compile a source file (with
some compilation errors),
directing the compilation output to a spooler location or an
edit file.
-
Open the source file in the
editor (navigate to the file in TOP, right-click and pick Edit from the
menu)
-
In the editor menu, use
Build|Load Existing Output|Spooler Job or
Build|Load Existing Output|Edit File and navigate to the output
location. The compiler output will be
opened in a window below the source file.
-
Click on the edit window
and press F4 (or use the
Search|Next Error menu selection) to automatically scroll to the next
compilation error in the code. The output window will also be scrolled.
Use Shift-F4 to look at the previous error.
![Using the editor with TAL compiler output [Using the editor with compiler output]](images%5CTOPDev01.gif)
Example: Compiling from the Editor
To compile from within the
editor, you must define a "tool" that TOP can use to do the
compile. A TOP tool defines a program or script to run on the
NonStop. TOP provides variables that you can use in the script
or
as program arguments so that a single tool can be used to
compile many different programs.
The example is for a COBOL85
compile. More complex examples are on the tool
samples page.
-
Click on Tools|Organise in
the main TOP menu. A dialog showing any existing tools will be
displayed. Click on the "Add" button and the Tool Add dialog will be
displayed.
-
This example runs the
COBOL85 compiler directly, appending an "o" to the file name to create
the object name. If you use a more sophisticated compilation
environment, you may need a more complex Tool.
-
Now open the source file up
in the editor and click on
Build|Properties. Select the new compile tool as the Compile Tool.
-
Press Ctrl-F7 or select
Build|Compile from the editor menu.
The editor will switch to read only-mode while the compiler runs. When
the compiler has finished, the editor will return to edit mode, and any
compilation errors can be navigated in the same way as the earlier
example.
Example: Run from the Editor
To run files from within the
editor you can use a "tool" which will execute
the target file, or you can just run the target files directly. The
best approach to take will depend on the run-time environment.
Stand-alone programs or TACL
code can be executed
directly, but programs which are part of a more complex application
usually need a script to be run to set up the run-time
environment in this case, a tool will have to be configured as it was
for the compile above. The tool
samples contains more examples of this type of tool
configuration.
![Configuring the run command [Configuring the run command]](images%5CTOPDev04.gif)
Specify the approach you are
going to take and the file or
tool to run in the
Build Properties dialog (Build|Properties menu).
Once you have configured how
the file is run, you can run it directly from the editor using the
Build|Run
menu command or its shortcut F8.
Example: Comparing Files
To compare files within TOP a
user first has to configure the PC-based comparison tool that they
want to use within TOP (This is a one-off task). Within TOP, use the
Session|Options|Global menu command and open the "File Compare" tab.
Set the compare and merge tool that you will use by browsing to it. If
it is one of the tools with extended TOP support, you can then click
the relevant button to set the compare options, otherwise refer to the
compare tool documentation.
![Configuring the compare tool [Configuring the compare tool]](images%5CTOPDev05.gif)
Once the compare tool is
configured using it to compare and merge files on the NonStop is
simple. Select one (or both) files in TOP,
then use the context (right-click) menu and pick "Compare". Once you
have specified both files, the compare tool will be started with the
NonStop files.
![Comparing files [Comparing files]](images%5CTOPDev06.gif)
In the example illustrated, the
open source WinMerge
tool is used.