John  Ehrman has made the crucial point.  Character terms are problematic

My personal preference, predictably, is to use the facilities of the macro
language.  Once a character set symbol has been defined all of that
language's facilities for concatenation, substring construction, and
character counting are available in open code for it.

Thus,

|&text setc 'very long string'
|&tk seta k'&text
|          DC  CL&tk'&text'

Or again,

|&prefix setc 'Lincoln''s'
|&infix setc ' Doctor''s'
&suffix setc ' Dog'
|&text setc '&prefix'.'&infix'.'&suffix'
|&tk seta k'&text
          DC CL&tk'&text'

Or yet again,

&plural setc 'children'
&singular setc '&plural'(1,5)


On Mon, May 4, 2015 at 2:49 PM, John Ehrman <ehr...@us.ibm.com> wrote:

> Much of this discussion seems to illustrate a risk in using character
> literals: it's difficult to refer explicitly to their length attribute.
> One could write
>
>      MVC   Target(L'=C'very long string'),=C'very long string')
>
> hoping you made the two instances identical.  It seems preferable to me to
> define the literal as a character constant:
>
> LS   DC    C'very long string'
>
> and then use its length attribute:
>
>      MVC   Target(L'LS),LS
>
> John Ehrman
>



-- 
John Gilmore, Ashland, MA 01721 - USA

Reply via email to