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



> From: Nicolay, Paul
>
> I guess both the MOVE (which won't even work if you're using VARYING
> strings) and %SUBST solution should be avoided as they're neither clear.

Maybe I misread the posts on MOVE and varying strings.  From what I
understood, the MOVE works exactly the same, moving data into the last
positions of the varying string.  Have you found otherwise?


> The best solution as far as I'm concerned is the use of datastructures to
> split the field, and fill it with the EVAL statement.  It doesn't
> depend on
> implicit type conversions like you get when using MOVE.

What's wrong with implicit type conversions?


> In addition, the MOVE and %SUBST shouldn't be compared neither since the
> MOVE always targets the last six characters, where the %SUBST
> uses a dynamic
> solution (also using fixed start and length positions could make it a lot
> easier to read, and maybe even preferred above the DS solution).

My original point way back when was that the MOVE instruction didn't have a
reasonable replacement in the new /free syntax.  Others have tried to insist
that the %subst replacement is equivalent.  I've simply opined that it is
not, and shown what I base my opinion on.  If you are using data structures,
then great, your code can quickly be converted to EVAL statements and there
are no issues with /free.  But if your code uses MOVE instructions, there's
no good substitution.  I guess I can agree, at a 30,000 foot level, that
data structures are better, but that argument doesn't do me a lot of good if
my legacy code uses MOVE instructions.


> Anyway... speed shouldn't be the main factor (it is a key factor
> however) in
> software design.  Otherwise we would better return to coding in
> assembler/MI... and never start with VB or Java !

There's a balance between performance, delivery and maintenance.  Different
languages have different strengths.  Java is an OOP language, and as such is
highly suited for developing sophisticated middleware where components
inherit behavior from one another.  RPG is best suited for coding business
algorithms, and should be focused on making tht as easy as possbile.  VB has
its place, I suppose, but not for anything I do.  But THAT dicussion is very
much one of opinion.

Joe



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.