(LISTSERV appears to have mangled your nice section marks and
required blanks.)
On 2015-07-28, at 08:41, Steve Coalbran wrote:
>
> /* Break lm at the first paragraph mark. Since lm appears to be
> no further used, anything after the paragraph mark is discarded.
> Why? */
>> PARSE VALUE STRIP(lm,"T")"�" WITH ml"�"lm
>>> no first line goes to var ml, remainder stays in var lm for re-parsing
>
I stand corrected.
> /* IOW, while lm contains nothing but blanks and paragraph marks? */
>> DO WHILE( TRANSLATE(ml lm," ","�")<>"" )
>>> this is true while there is no more text or paragraph marks
>
Since paragraph marks are translated to blanks, it becomes false
when there are only paragraph marks. Pathological case.
> /* Does ISPF wrap zedlmsg at multiples of 77? If ml is exactly (a multple
> of)
> 77 characters, does this insert a (needless) blank line? */
>> zedlmsg = zedlmsg !! LEFT(ml,((LENGTH(ml)+77)%77)*77)
>>> this is a simplification as I only use a screen width of 80 hence
> 80-frame of 4 = 76, making this 77 long forces a line break.
>
Suppose ml is (extreme) 153 characters:
498 $ rxx "say ((153+77)%77)*77"
154
So ml gets padded to 154 characters. 154 == 76 + 76 + 2. Do you
want two dangling characters? I'd use:
zedlmsg = zedlmsg !! LEFT(ml,((LENGTH(ml)+75)%76)*76)
...
499 $ rxx "say ((153+75)%76)*76"
228
... 3 x 76 character lines after padding by LEFT()
(But if you simplified you may have omitted some screen width algebra
in the full version that gives correct result.)
>>> you can build in any variable you like as ling as it gets to zedlmsg
...
>>> I have another version that accesses SYSVAR("SYSISPF") and
>>>
I'm trying for a "one size fits all" version.
> SYSVAR("SYSENV") and in this case it SAYs
>>> the message lines. I assumed you were running in FOREground under ISPF
> otherwise why use ZEDxMSG
>>> variables?
>>>
I can build in any variable I like. In the ISPF case, they're already
in ZEDxMSG; if non-ISPF I "say ZEDLMSG".
>>> Also you could use ZERRSM and ZERRLM along with message ISRZ002 as long
> as you also load
>>> ZERRALRM and ZERRHM perhaps by...
>>> PARSE VALUE "ISR20000 YES" WITH zerrhm zerralrm
>
Lots of stuff there I don't know. Yet. Today, TMI.
Thanks,
gil
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN