GR:Gravity/Xref/TDOMS/Searching
Menu options on an Xref hit
The Xref find options are made available in the Components, Route Navigator and Impact Analysis view and where the selection will resolve to a valid TD/OMS component. Up to 7 items can be selected for an Xref find. If more than 1 item was selected then a successful find will be based on the fact that all the items have been found in a source. If you want to change the behavior of a multiple selection find then use the advanced find dialog (menu option Find ...) and update the search terms with the +/- sign or the AND/OR operator for example "OMA0042 OR OMA0043 OR OMA0044"
With regards to the Xref result view and IBMi related sources (library or IFS), there are a number of extra menu options that can be made available depending on how the Xref location was created. If a location is created from TD/OMS through the Components view or Route Navigator view then the location will contain extra metadata making it possible to connect Xref hits to a task.
For locations of type lib, ifs or tdoms the option View IBMi source will also be made available. This option will download the current library or IFS source file from the IBMi. This differs from 'View in editor' which downloads the source file from the Xref hosted repository. The editor chosen to open the file will depend on the source file extension. In the RDi, IBMi native source files will be opened in the LPEX editor.
Connect an Xref hit to a task
If an Xref hit (source file) belongs to an Xref location of type lib or tdoms and the location was created from within TD/OMS UI, then a hit can be added to a TD/OMS task. Two menu options will be made available; 'Add to connection list...' and 'Direct connect...'. The menu option will not be enabled if an application task has not yet been selected. With a connect the file to which the hit refers to will be mapped to the current file registered in the TD/OMS database and added to the selected task. In the example below the object of the source file DMD001_2.rpgle can be connected to task T0145 in the application KE110.
Xref find from within the LPEX editor
Xref can also be accessed from within the LPEX editor (available only in the RDi). You can initiate an Xref search by positioning the cursor on a word or highlighting a number of words, with a right mouse click the menu options 'Find all', 'Find exact' and 'Find ...' will become available for Xref searching.
- 'Find all' will run a search with the provided text as is, this means that any Xref reserved characters will be interpreted as such, see Advanced Searching section Escaping special characters.
- 'Find exact' is an enhanced version of the 'Find all' but will attempt to find the text as is, i.e. including special characters used in the text.
- 'Find...' will start the Xref advanced query wizard, this will allow you to fine-tune the text to be searched and or augment the search with specific Xref attributes (i.e. path, language type ...).
In the example above the text PGM(OMX928C) was selected for an Xref search. To just reiterate the difference between the options 'Find all' and 'Find exact' there is a not so subtle difference between the outcome of the two. As explained in 'Advanced Searching' this has to do with the way the text is processed by the Xref search engine. In the chosen example the default 'Find all' will do a search based on 2 words, PGM and OMX928C, this is due to the parenthesis which is an Xref special character used for grouping. With the 'Find exact' the search processing is enhanced to find the exact text 'PGM(OMX928C)' including the parenthesis. A similar situation will arise when running a search on a word containing the special character %, #, $ or @ for example #fldX or %eof(OMERD). A word containing any of these characters will be split up into 2 or more words so you need to use the exact match option to get a sensible collection of hits.