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



Hi Scott

Thanks for mentioning this - the data-structure-like concept, for me, at least, really comes from using *DEFINED, not *BASED.

I've used *BASED to work through multiple entries in a list API, as someone else mentioned - then the *DEFINED variables are just populated - very cool stuff!

Vern

On 5/14/2012 12:26 PM, Scott Klement wrote:
Hiya Folks,

Consider using STG(*DEFINED) fields instead of *BASED for this type of
logic. No need to do pointer math that way, and aside from the pointer
stuff, they work the same as *BASED. Save *BASED for times when you
need to be able to change the address in memory where the variables point.

As for Joel's initial question, a *MSGF/RTVMSG might be an easier
solution. But, ultimately, the problem is that CL just isn't that good
at string manipulation. Using a better language like RPG or REXX would
almost certainly work better. Why force a square peg through a round hole?

-SK


On 5/14/2012 9:49 AM, DrFranken wrote:
I'm going to guess no, but in some cases you might be able to simplify
by declaring&P_CLIENT,&P_SEQ etc as *BASED fields of a longer
character variable thus building the VALUES( clause there. It could
look as simple as VALUES(&VALUES) avoiding all those *cats in your program.

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.