Examples of %RSE

Example:

	GTM>DO ^%RSE
	Routine Search for Every occurrence 
	Routine: BES*
	BEST BEST2 BEST3 BEST4
	Current total of 4 routines
	Routine: <RETURN>
	Find string:^NAME
	Find all occurrences of: 
	>^NAME<
	Output device: <terminal>:
	USER:[SMITH.WORK]BEST.M
	
	S ^NAME=SMITH
	S ^NAME(1)=JOHN
	USER:[SMITH.WORK]BEST2.M
	
	USER:[SMITH.WORK]BEST3.M
	
	S ^NAME=X
	W ^NAME
	USER:[SMITH.WORK]BEST4.M
	
	Total of 4 routines parsed.
	4 occurrences found in 2 routines.
	GTM>
	

This example invokes %RSE that searches and finds a given string. The output device specifies a terminal display of all lines where the text string occurs.

Example:

	GTM>DO ^%RSE
	Routine Search for Every occurrence
	Routine: BEST
	BEST
	Current total of 1 routine
	Routine: <RETURN>
	Find string:^NAME 
	Find all occurrences of: 
	>^NAME<
	Output Device: OUT.LIS
	
	BEST
	GTM>	
	

This example instructs ^%RSE to write all lines where the text string occurs to an output file, OUT.LIS.