× 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.



I've tried copy/paste before and had no luck.  May have to revisit it.

Sadly, source dates are a big deal in this shop.  Some programs have a 20 year history of changes - all dead code commented out and left in the program <gag>.

Sometimes, though, I do a major code liposuction.  When there are 6000 lines in a source member and 3200 are commented out...  Time for a trim - but I do save the original member first.

Roger Harman
COMMON Certified Application Developer - ILE RPG on IBM i on Power

 
 




From: WDSCI-L <wdsci-l-bounces@xxxxxxxxxxxx> on behalf of Hiebert, Chris <chris.hiebert@xxxxxxxxxxxxxx>
Sent: Thursday, April 26, 2018 8:07 AM
To: Rational Developer for IBM i / Websphere Development Studio Client for System i & iSeries
Subject: Re: [WDSCI-L] Search/Replace unprintable attribute characters
 

Yes, by using Find/Replace you will change the source dates.
However, that was not mentioned as a requirement by the OP.

I was providing a solution that runs native within RDI/Eclipse without any extra work required.

And a lot of people just don't care about the source dates anymore. Over 1/2 the people I work with don't even view them anymore.
And there are becoming even more meaningless especially since you can now move your source into stream files.

But as you so kindly mentioned, you can just use translate to do this work. But if you don't want to take the time to write a program you can just run the SQL:

CREATE ALIAS QTEMP/FIXSRC FOR YourLibrary/QRPGSRC(Member);
UPDATE QTEMP/FIXSRC SET srcdta =
translate(SRCDTA
,x'404040404040404040404040404040404040404040404040404040404040404040'
,x'202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F41'
);
Drop Alias QTEMP/FIXSRC;

Personally, I don't come across programs with color attributes much anymore.
And when I do, I just use find/replace to remove them.  The few line dates that get changed don't make must difference in the long run. Our old code was mostly colored on comment lines.

But is extremely easly to just use the find/replace dialog.

Locate the character, Shift-Right to select it, Ctrl-F to open the Find/Replace Dialog, The character is Preloaded into the find box, Alt-P to move the to the replace box, key space, Alt-E to replace all.

Takes under 30 seconds to remove most of the characters and then they are gone. About 13 keystrokes and I'm done with a character, counting the modifier keys separately.


I think the confusion lies with the issue that they are non-displayable characters.
In the editor they are replaced with another character to show you they are in the source.
But in the find dialog it doesn't "look" like they get entered.
However they are still in there.
You can prove it by selecting multiple characters including blanks from the source, say column 1 through 5.
When you press Ctrl-F the find dialog is loaded. If you cursor left to right you will see that it takes 5 keystrokes to get to the end.
And some of the keystrokes appear not to move at all. Those are the ones passing over the non-displayable characters.



Chris Hiebert
Senior Programmer/Analyst
Disclaimer: Any views or opinions presented are solely those of the author and do not necessarily represent those of the company.


-----Original Message-----
From: WDSCI-L [mailto:wdsci-l-bounces@xxxxxxxxxxxx] On Behalf Of Ken Killian
Sent: Thursday, April 26, 2018 8:28 AM
To: Rational Developer for IBM i / Websphere Development Studio Client for System i & iSeries <wdsci-l@xxxxxxxxxxxx>
Subject: Re: [WDSCI-L] Search/Replace unprintable attribute characters

Of course the only problem is with that, it will update the Punch-Card Date Column. <smirk>

Which other programming languages have evolved past 19th Century punch-card formats with Sequence/Date columns. Yup, punch-cards were invented in the 1800's, a.k.a the 19th Century!

HLL languages like COBOL/RPG still use 19th Century punch-card technology. <Disappointment>

So, running a utility program, you can remove those hex codes without changing the date. If you happen to care about the punch-card Date Column.

-Ken Killian-


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.