AMT Help Files

Find (and replace)

If you want to find a specific word, table or field, you can use one of the following options:

Find

To search your code on specific criteria. To use this option, select "search > find" or use the shortcut "CTRL-F".

When selecting the option "Find" on the top of the window, a search string can be specified in the combo box, optionally further customized with an extra search condition (using AND, OR or AND NOT).

The value to search for is entered in the combo box, then the "Find" button is pressed.

From the Options panel, you can refine the search by checking one of the following options:

Option
Description
Save search optionsSaves all the options of the current search, and will start with those options set the next time the search window is opened. 
Match case Returns only the items with the same case.
Complete Word Returns only the items where the whole word matches.
One result/ object

Returns only one item per object when searching with the Where option "Whole application" or "All applications". The option "One result/ object" does not effect the results for the options "Current frame/ element" or "Current object".

Regular expression











Enables the use of the undermentioned options inside the search string:
Character Description
^ A circumflex at the start of the string matches the start of a line.
$ A dollar sign at the end of the expression matches the end of a line.
. A period matches any character.
.*

An asterisk after a string matches any number of occurrences of that string followed by any characters, including zero characters. For example, bo* matches bot, bo and boo but not b.

\

A backslash before a wildcard character makes that the next character in the search string is treated literally, not as a wildcard. For example, \^ matches ^ and does not look for the start of a line.
Append resultWhen selecting this option, the results of the next search will be appended to the result window. There will be an Append column added to the result screen to indicate for which search the result was returned.

Append result is only visible when the search result are shown in a new window.


From the Where panel, the search can be restricted to either the "Current frame/element", "Current object", "Whole application", or "All applications". Depending on the selection, additional panels are presented to refine the selection.

 

Where: Current frame/element

When having specified the Where option "Current frame/ element", you can choose the search direction in the pane on the right. After clicking the "Find" button within the "Current frame/element" section, the cursor jumps to the first place on which the entered string is found and highlights this item.



Subsequently, pressing the function key "F3" then performs a "Find next", for the next occurrence of the search term.

 

With the "Where" options "Current object", "Whole application", and "All applications" it is possible to search for a second word with the drop down list options of "AND", "OR", or to remove a work from a search with the option "AND NOT".

Where: Current object

When having selected the Where option "Current object", two new search options are now provided, "Look In" and "Search Scope". The "Look In" section allows for specific areas of an object to be searched. The "Search Scope" panel allows for the following options to be specified:

Search scope
Description

Current Object
(result at the bottom)

Searches only in the current object, and therefore not in any related (child/parent) object. The search results will be presented at the bottom of the concerned object window.
Current Object
(result in new window)
Searches only in the current object, and therefore not in any related (child/parent) objects. The search results will be presented in a new separate window.
Including children Searches in the current object as well as in all related child objects. Only dll files that are located in other applications will not be included from the search.
Including children (remote) Searches in the current object as well as in all related child objects. There will also be searched inside the dll files in external AMT-COBOL applications (from the same repository) that are called from the current object.
Including parents Searches in the current object as well as in all related parent objects.

 

Where: Whole application

When using the "Where" option "Whole application", the "Find" dialog box changes again.

The "Look In" section remains to allow the specific areas of an object to be searched.

Now the "Entire Application" section is presented, which allows for object groups to be selected or deselected, or for selected objects within a group to be selected by clicking the "..." button.

Once the objects have been selected, clicking the "Ok" button returns the "Find" dialog box with the object group "Selected". Now when the find is performed, only the objects selected will be searched. By checking the "Append" checkbox after an initial "Find" has been performed, it is possible to append new finds to the results window.

 

Where: All applications

The final "Where" option, "All applications" looks similar to the "Whole application" dialog box. The exception is that the option to select objects or object groups in the "Entire Application" section is no longer available.

 

Find Results

 

When the find results are displayed, the used search options will be displayed in the upper grey pane. On the right side of this pane there are two buttons to search inside the current search results. The search string must then be specified in the text field. Additionally, the append option can be clicked if the next search results must be added below the current search results. If this option is not used, then the new results will replace the current ones.

Example 'Search inside lines' on the search results from the previous image.

 

Example 'Search inside objects' on the same search results as before.

The search results are represented in the columns Object, Type, Description, Location, Line #, Line and Append.

The column Description displays the description of the found object or the description of the objects parent if no description is available (like results in codelines) or when the description of e.g. a layout control is already added to the Line column.

If code comment lines are returned as result, then this will be indicated with two slashes at the beginning of that line. This means that in the Line column these slashes will also be shown if these don't physically appear in the code (which is the case if the accolades are used).

The number that is displayed in the Append column indicates for which search action the result was returned. At the first search the number is always zero (0). For every next search with the append option within the result set, the append value will be increased with 1. For example, if the value "5" is returned, then this means that the 5th appended search is concerned.

By doing a right mouse click in the result view, a popup menu is presented. From this popup menu, you can choose to select all result lines, to copy the selected results to the Windows clipboard or to print all selected search results.

Double-clicking on one of the results opens the object at the point where it was found. If this is in the code editor, then the specific line of code is highlighted.


Replace


Find next

To continue the search for the actual criteria down from the current cursor position. To use this option, select "search > find next" or use the shortcut "F3".

Replace

To replace text with other text. To use this option, select "search > replace" or use the shortcut "CTRL-H".

Replace all down

Replaces all the text from the current cursor position downwards.

Replace all documents

Replaces all the text in the document with an other text.