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



John,

Understood on the manual effort. The thing about this one is that a plain
search for *MDY will find all of the programs for which *MDY conversions
have already been modified to something that won't abend when handling a
date > 2039. (And for which the *MDY code will have been commented out.)
This accounts for probably 90% of our code base currently. Which means
that I would end up *manually* throwing out 90% of the results for many
hundreds of source members.

I agree, with caveats, that the programming project to do this could be
manageable. To be able to share something like this with the community,
I'd need to do this in my spare time. Unfortunately, I do not have access
to our i outside of work hours. I could use lunch break time to work on
this, I suppose, but I would need to clear sharing anything I develop on
this i with my client supervisor.

- Dan

On Tue, May 19, 2015 at 1:07 PM, John Yeung <gallium.arsenide@xxxxxxxxx>
wrote:

On Tue, May 19, 2015 at 11:08 AM, Dan <dan27649@xxxxxxxxx> wrote:
John: My motivation to do this is that I have to scan about 200 source
members, and there is the likelihood that this will turn into a
system-wide
endeavor. (I.e. thousands of source members.)

OK. But (1) you asked on here and the RDi list, suggesting that it's
something that, if RDi could do it, would satisfy your use case; and
(2) no matter if it's tens of thousands, this kind of thing is still
*usually* something that humans (not programs) ultimately act on. For
example, when we were doing our Y2K conversion, we found who knows how
many instances where something had to be fixed. But we did all those
fixes by hand (yes, it was one of the most tedious things imaginable).
So for that project, it would not have made much of a difference
whether the searches ignored comments or not.

I wonder if IBM could be persuaded to share the code it uses to validate
code syntax, specifically how it distinguishes between comments and live
code.

I didn't fully understand Jon's response either, but from a purely
technical standpoint (regardless of IBM's "willingness"), I doubt
their code would be of particular use to us. I would expect it to be
in C, and I would expect it to be fairly tightly coupled to and
integrated with other code (for example, it might also parse strings,
keywords, numbers, operators, etc. in the same pass).

If this is a wheel that needs to be invented, I'd be happy to be involved
in an open source project to do it, but from the looks of the regular
expressions using grep / egrep, I'd be more of a cheerleader than a main
contributor.

I wouldn't judge the difficulty of "regular coding" based on regex
coding. Regular expressions are both denser and less capable than
most "Turing complete" languages. (APL is a Turing complete language
which is arguably even denser than regex.)

Honestly, writing an RPGLE comment parser (in almost any programming
language) doesn't strike me as particularly difficult. The trickiest
thing, in my mind, would be NOT interpreting the double-slashes as
comment-initiators when they appear inside string literals, which can
contain quotes and span multiple lines.

All in all, it's actually quite a manageable programming project.
It's just nontrivial enough that most people seem to not bother. And
also just nontrivial enough that it's a little frustrating that most
editors don't provide easy hooks to read their syntax highlighting.

John Y.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.