Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 3 Tools : CROSSREFSEARCH

CROSSREFSEARCH
Searches the cross reference index of the specified library to answer a query. (C)
Invocation
CALL CROSSREFSEARCH(querystring, querykind, library)
 
A string of one or more names or keywords (the wild card characters asterisk (*) and question mark (?) can be used if they are enclosed in single quotation marks), the AND (&) or OR (|) logical operators, the NOT operator or the not sign (¬), and the open and closed parentheses symbols
A string specifying the type of search is to be carried out on the global cross reference. The valid search types are:
TABLE – Searches for objects that refer to the named tables. The search can be based on a whole table, on the field of a table, or on just a field. Enter one of the following for querystring:
Usage Notes
SEARCH is the interactive version of this tool used on the developer’s workbench. It also searches the cross reference index.
Before using CROSSREFSEARCH, the cross reference index must first be built for the library. Refer to REFMAKER for more information about building the index.

Exceptions
 
Raised when there is a syntax error in the querystring, the value for querystring is invalid, the value for querykind is invalid, or the library does not exist. In each of these cases, a message is placed in MSG.
Example
The following rule searches the SYSADMIN library for the FCNKEY table and sends the results to the message log:

 
CROSSREFSEARCH_1;
LOCAL MSG;
_ ------------------------------------------------------------------------
_ ------------------------------------------------------------+-----------
_ CALL CROSSREFSEARCH('FCNKEYS', 'TABLE', 'SYSADMIN'); | 1
_ CALL $RESETPRINT(60, 80, 1 'SCR'); | 2
_ FORALL @RESULTLIST : | 3
_ CALL $PRINTLINE(PAD(@RESULTLIST.INDEX, 4, ' ', 'R') || |
_ PAD(@RESULTLIST.NAME, 18, ' ', 'R') || ' ' || |
_ @RESULTLIST.TYPE); |
_ END;
_ ------------------------------------------------------------------------

 
Resulting Output
Pressing PF2 displays the following output:

 
-----------------------------INFORMATIONAL MESSAGE LOG-----------------
COMMAND ===> SCROLL: P
---------------------------------NEW PAGE------------------------------
1 FCNKEY_MSG RULE
2 PROCESS_FCNKEY RULE
3 RESTORE_ENTRY RULE
4 SCRDEF_INIT RULE
5 WRITE_FCNKEYS RULE

 

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved