The Natural Server Search

The Natural Server search allows to search Natural objects or resources and a specified Natural Development Server. It provides options to specify containing text and replace text.

The following functionality is covered below.


Environment

The environment combo box shows the list of Natural Server environments that are available as defined in the Natural Server view. If no environments are defined, the localhost environment is available by default (which represents the local Natural runtime).

Contents

In this area, you can specify a pattern for a text search and, optionally, specify a replacement text.

Containing text

Specify your text search.

From the drop-down menu, you can choose to repeat or modify a recent search.

Case sensitive

If activated, the text search is done in case-sensitive form.

Whole word

If activated, only whole words are respected.

First occurrences only

If activated, the search stops on an object after the first match.

Replace with

Specify a text which you want to use as a replacement for the containing text.

From the drop-down menu, you can choose to repeat or modify a replacement text.

Confirm replace

If activated, a Confirm Replace dialog box is shown when the specified text has been found. You can confirm each replace or delete operation separately, or you can confirm all replace or delete operations at once.

Delete text

If activated the Replace text box will be disabled and the found text will be deleted.

Objects

Specify all the Natural objects and Resource patterns to be included in the search. Additional options can be defined.

Names

Enter the Natural object or the Resource patterns for the objects to find. Multiple patterns, separated by a semicolon, can be specified.

From the drop-down menu, you can choose to repeat or modify recently specified patterns.

Wildcards

The name patterns can be assembled with the following wildcards:

  • "* " matches any set of characters.

  • "?" matches for any character.

  • "\" escapes a literal; if you want to search for an asterisk, question mark, or backslash character, type a backslash before it to indicate that you are not using these characters as wildcards (e.g., "\*", "\?", or "\\").

Search for long names

If this check box is active a lookup of long names for the Natural types ‘Class’, ‘Subroutine’, and ‘Function’ takes place. For all other Natural types the object name is searched.

Natural types

If the ‘Natural types’ radio button is selected, a lookup for Natural objects, based on the specified types, engages. The following 3 letter types can be entered (separated by a semicolon).

Adapter [NS8]
Adapt view [NS6]
Class [NS4]
Command processor [NS5]
Copycode [NSC]
DDMs [NSD]
Dialog [NS3]
Error Message [ERR]
Function [NS7]
Global Data Area [NSG]
Helproutine [NSH]
Local Data Area [NSL]
Map [NSM]
Parameter Data Area [NSA]
Program [NSP]
Subprogram [NSN]
Subroutine [NSS]
Text [NST]
* [All types]

Example: NSC;NSM

In this case, the Natural objects with type Copycode and Map are searched.

Note
The search can only be started if valid types have been specified.

Choose ... (Natural types)

This Button will bring up a Type selection dialog which will simplify the selection of the Natural types, especially for users who are not yet familiar with the short form of the Natural types syntax.

Object exists

This unnamed combo box defines whether a match is successful depending on the availability of the source or GP of the object.

  • Source or cataloged object exists

    The object match is successful regardless of whether the object exists as a source or a generated program.

  • Source object exists

    The object match is successful if the object exists as a source.

  • Cataloged object exists

    The object match is successful if the object exists as a generated program.

  • Source and cataloged object exists

    The object match is successful if the object exists as a source and as a generated program.

Resources

If the ‘Resources’ radio button is selected the patterns specified in the Names text box are used for searching Resources only. Additionally, all controls displayed on the Natural Development Server Search tab not relevant for the Resources search will be disabled. These are:

  • Contents section

  • Types selection

  • Filter section

Filter

Specify additional filters limiting the search hits.

  • User ID

    The ID of the user who has created or modified an object. If specified, only objects with a matching user ID are found. If you specify more than one user ID, separate the IDs with semicolons. You can also use wildcards (* or ?).

  • All

    If selected, all specified Natural objects regardless of the source and catalog date are searched.

  • Matching source and catalog dates

    If selected, only those objects are found where the catalog date is identical to the source date.

  • Date between

    If selected, only those objects are found, on which the last modification had been performed within the specified date and time range.

Scope

Specify the libraries and System files to which the search applies.

  • Libraries

    Enter the library patterns for searching the objects. Multiple patterns separated by a semicolon can be specified. The same wildcards, as described for the Names text field can be used.

    Example: LIB*; MYLIB

    From the drop-down menu, you can choose to repeat or modify recently specified library patterns.

  • System files

    This combo box allows you to select the System file where to perform the object lookup. The following entries can be selected:

    • FNAT - the active System Libraries

    • FUSER – the active User libraries

    • DDMS – the DDMs

    • (0,0) - template for using any other system file. This entry must be adapted to the desired system file lookup.

      Example:

      LIBRARIES(10,160) when the system file with database id 10 and file number 160 should be used.

      Note
      The search can only be started if the syntax is valid (e.g. LIBRARIES(10, results in a disabled search.

    From the drop-down menu, you can choose to repeat or modify recently specified system file patterns.

Search View

This view displays the results of a Natural Server search.

Toolbar

The toolbar in the Search view contains the following buttons:

Show Next Match

This command highlights the next match of the search expression in the Natural Source Editor. If not yet available in the workspace, the corresponding Natural object will be downloaded and added to a temporary project.

Show Previous Match

This command highlights the previous match of the search expression in the Natural Source Editor. If not yet available in the workspace, the corresponding Natural object will be downloaded and added to a temporary project.

Remove Selected Matches

Removes all highlighted matches from the search results.

Remove All Matches

Removes all search results from the search view.

Expand all

Expands every tree item in the search view.

Collapse all

Collapses every tree item in the search view.

Run the Current Search Again

This command reruns the current search again, so that removed search results reappear or changes are reflected.

Cancel Current Search

Cancels the current search

Show Previous Searches

This command allows you to browse previously conducted searches and repeat a previous search. Select a previous search from the drop-down menu, or clear the search history.

Pin the Search view

Pinning the search view means that subsequent searches show their results in another search view and that the pinned view remains unchanged.

Search view menu
  • Show as List

    Presents the results in a flat list. In this mode, the context menu contains a Sort By menu with the options Name and Path.

  • Show as Tree

    Presents results in a hierarchy (like the Natural Server view).

  • Filters

    Limit the number of displayed results.

Context menus for results

Various context menus exist for the displayed results of a Natural Server search query. Regarding the commands of the context menu applicable on a Natural object also refer to Managing Objects Directly on a Natural Server.

On this page