Jeff,



You can do something similar using RegEx



e.g. in the following code block



V001 E_Description = 'Family reference not numeric -
aborting';

V001 E_Description = 'Account Reference too long -
aborting';

V001 E_Description = 'Family Reference Blank - aborting';
V001 E_Description = 'Family reference not numeric -
aborting';

V001 E_Description = 'Family Reference Blank -
aborting';

V001 E_Description = 'Account Reference Blank - aborting';
V001 E_Description = 'Portfolio reference not numeric -
aborting';



To find all E_description parameters with the word reference after it
use:



(.+E_Description.+)( reference) in the find box (making sure that the
Regular expression box is ticked)



Use the All box to show all of the matched text in the whole program.



Then in the replace box put



$1 TEST



$1 pastes the first group (the first bracketed search) back in

TEST will replace the second group (i.e. the word reference) with the
word test



Resulting in the following code:



V001 E_Description = 'Family test not numeric - aborting';
V001 E_Description = 'Account test too long - aborting';
V001 E_Description = 'Family test Blank - aborting';
V001 E_Description = 'Family test not numeric - aborting';
V001 E_Description = 'Family test Blank - aborting';
V001 E_Description = 'Account test Blank - aborting';
V001 E_Description = 'Portfolio test not numeric -
aborting';



Its not exactly what you are after, but its the only way I know to
replace certain text on a line conditioned on the text in another part
of the line



Regards


Aaron Price



From: WDSCI-L <wdsci-l-bounces@xxxxxxxxxxxx> [mailto:WDSCI-L
<wdsci-l-bounces@xxxxxxxxxxxx>] On Behalf Of Jeff Young
<jyoung0950@xxxxxxxxx>
Sent: 09 June 2014 14:58
To: "Rational Developer for IBM i / Websphere Development Studio Client
for System i & iSeries" <wdsci-l@xxxxxxxxxxxx>
Subject: [WDSCI-L] Filter source code by selected string



In SEU, we have the ability to display only source lines that meet a
specified search string.
By excluding all source lines using the *X* function on the source
line(s)
and then using the *F(*ind) search string *A(*ll) *X(*Excluded), only
those
lines matching the search string will be displayed. I can then use
the *C*(hange)
command to do a group change on either only those lines displayed or
only
those lines not displayed.

Is there any way to do this in RDi?


Jeff Young
Sr. Programmer Analyst

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.