× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



As an aside, I was taught you should change your code to:

0166.08 C* Department totals
0166.09 CL1 DO
0167.00 C TCH ADD TCHLR L1TCH
0168.00 C MISC ADD TMISC L1MISC
0169.00 C SRP ADD SRPLR L1SRP
0170.00 C TSRP ADD TSRPLR L1TSRP
0171.00 C HED ADD HEDLR L1HED
0172.00 C ENDDO

Then the Level 1 indicator only gets interrogated once, not on every
single line.
(Not sure if compiler changes have made this no longer true - it's a
long time
Since I wrote code this antiquated!) :-)

Trevor Briggs
Analyst/Programmer
Lincare, Inc.
(727) 431-1246
TBriggs2@xxxxxxxxxxx

-----Original Message-----
From: WDSCI-L [mailto:wdsci-l-bounces@xxxxxxxxxxxx] On Behalf Of Buck
Calabro
Sent: Monday, June 09, 2014 4:11 PM
To: wdsci-l@xxxxxxxxxxxx
Subject: Re: [WDSCI-L] Filter source code by selected string

On 6/9/2014 12:31 PM, Edmund Reinhardt wrote:

Vern has a good suggestion

He usually does!

If you filter the ' CL1 ' by selected->Filter Selection - so you
have
just the lines you want

Not exactly; I have twice as many lines as I want. Stripped of their
context. Let me restate the use case a bit clearer. Start with this:

0166.08 C* Department totals
0167.00 CL1 TCH ADD TCHLR L1TCH
0168.00 CL1 MISC ADD TMISC L1MISC
0169.00 CL1 SRP ADD SRPLR L1SRP
0170.00 CL1 TSRP ADD TSRPLR L1TSRP
0171.00 CL1 HED ADD HEDLR L1HED

There are actually 20 or so more lines, but this is enough to get the
idea across. Now copy them after 171.00, to make a second set:

0166.08 C* Department totals
0167.00 CL1 TCH ADD TCHLR L1TCH
0168.00 CL1 MISC ADD TMISC L1MISC
0169.00 CL1 SRP ADD SRPLR L1SRP
0170.00 CL1 TSRP ADD TSRPLR L1TSRP
0171.00 CL1 HED ADD HEDLR L1HED
x6 1.01 C* Division totals
0171.02 CL1 TCH ADD TCHLR L1TCH
0171.03 CL1 MISC ADD TMISC L1MISC
0171.04 CL1 SRP ADD SRPLR L1SRP
0171.05 CL1 TSRP ADD TSRPLR L1TSRP
0171.06 CL1 HED ADD HEDLR L1HED

In SEU, I'd exclude lines .02 through .06, (or exclude all 6 of the
added lines because I'm lazy) then issued a c l1 l2 a x and just the
excluded lines would be changed to L2.

0166.08 C* Department totals
0167.00 CL1 TCH ADD TCHLR L1TCH
0168.00 CL1 MISC ADD TMISC L1MISC
0169.00 CL1 SRP ADD SRPLR L1SRP
0170.00 CL1 TSRP ADD TSRPLR L1TSRP
0171.00 CL1 HED ADD HEDLR L1HED
0171.01 C* Division totals
0171.02 Cl2 TCH ADD TCHLR l2TCH
0171.03 Cl2 MISC ADD TMISC l2MISC
0171.04 Cl2 SRP ADD SRPLR l2SRP
0171.05 Cl2 TSRP ADD TSRPLR l2TSRP
0171.06 Cl2 HED ADD HEDLR l2HED

In reality, I would have excluded these lines then moved on to the O
specs, where I'd copy all the L1-related lines and then excluded them as
well. Now, I have duplicate L1 lines; the new ones are excluded. When
I issue the SEU change command on those excluded lines, all of the L1s
become L2 no matter what columnar position they happen to fall in.

If I filter by CL1, I lose the comments. OK, so I have to pay closer
attention because the eyecatchers at the beginning of the blocks are
lost. But there are two different columns where L1 occurs: column 8 and
column 51. That's two separate block fills. The keyboard work flow
goes like this:

1) Cursor to the top of the first L2-to-be, column 8.
2) Alt-R.
3) cursor down to the last line in the block.
4) Alt-R.
5) Escape.
6) block fill 2.
7) Enter.
8) Escape.
9) Alt-U.
10) 5 keystrokes to move to column 51.
11) Alt-R.
12) cursor up to the top of the target block.
13) Alt-R.
14) Escape.
15) up arrow (to recall previous command).
16) Enter.
17) Escape.
18) Alt-U.

We'll need to repeat this exercise several more times for the O specs
(the type of line T L1 and the field lines O L1TCH).

This is a bit pants if a predecessor decided to name her fields TCHl1,
MISCL1, SRPL1 and so on. The columns don't line up. :-(

What I tend to do is use regular expressions:
Find: L1([ A-Za-z]+)
Replace: L2$1
Check boxes: Regular expression, Restrict search to selection, Wrap.

then use Alt-R, Alt-R1 to rectangular select the '1' column
then hit esc to go to the command line and type 'block fill 2'

Alt-R and block fill are a powerful combo

They are indeed!
--buck

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2024 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.