× 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 often wanted to do this, too. You could try an RFE, but COBOL RFEs
generally don't get much traction.”

Problem is Michael any changes have to either fit within a simple extension to ANSI syntax or be completely outside it. COPY DDS-… is a good example of the former.

Only thing I can suggest is to ask for an IBM extension that allows for a different delimiter pair to be used such that they could have the effect of a wildcard. Before even doing that it is normally a good idea to check out if there are any ANSI changes proposed that address this. Easier to get through the IBM COBOL bureaucracy if there is already an ANSI proposal.


Jon Paris

www.partner400.com
www.SystemiDeveloper.com

On Nov 17, 2016, at 1:58 PM, MichaelQuigley@xxxxxxxxxx wrote:

"COBOL400-L" <cobol400-l-bounces@xxxxxxxxxxxx> wrote on 11/17/2016
01:00:31 PM:
----- Message from "Stone, Joel" <Joel.Stone@xxxxxxxxxx> on Thu, 17
Nov 2016 17:53:20 +0000 -----

To:

"'COBOL Programming on the IBM i (AS/400 and iSeries)'" <cobol400-
l@xxxxxxxxxxxx>

Subject:

[COBOL400-L] can COPY ... REPLACING replace colhdg and text and
alias verbiage when it gets field info from a referenced field?

I cant get it to work. Is this possible???

Thanks in advance.



Unfortunately, no. Here's the description of the replacing phrase from the
manual:

Pseudo-text-1 must contain, as a minimum, a text word. Since text words,
by
definition, are bounded by separators, pseudo-text cannot be used to
select
part of a word for replacement (for example, a prefix in a data name): a
complete text word must be used in order to find a match. It is possible,
however, to simulate the partial replacement of a text word held in the
library
text, by dividing it into two or more text words using separators that are
used
only for matching purposes, and not copied into the source program. For an
example of this method, refer to “Coding Examples” on page 607.

If your ALIAS name had something else as a text separator, it could do it.
But then it wouldn't be valid in it's un-replaced state--at least not for
DDS. If you wanted to use an actual source copy member, you could. But the
inconvenience of maintaining the copy members to use for data definition
and specifying the replacing phrase everywhere you use it wouldn't be
worth the effort--at least not to my mind.

I've often wanted to do this, too. You could try an RFE, but COBOL RFEs
generally don't get much traction.

Michael Quigley
Computer Services
The Way International
www.TheWay.org
--
This is the COBOL Programming on the IBM i (AS/400 and iSeries) (COBOL400-L) mailing list
To post a message email: COBOL400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/cobol400-l
or email: COBOL400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/cobol400-l.



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.