Hi Gil

Yeah - it's difficult to imagine how it started before it got 
Discombobulated by LISTSERV (or the combination of Lotus Notes and 
LISTSERV)?!

Also I see "�" characters for both of my symbolic paragraph-mark and 
required-blank characters... X'4A' and X'B8' repectively. 
NOTE: that this is in CP 278 so may differ if you are using CP 037?
When I switch my PCOMMs to CP 037 and type those chars and they are X'B5' 
and X'B8' respectively. 
BUT as long as you use the same in the call and the subroutine the actual 
characters don't matter?

Like I say, try it in TSO?
I can send you a general purpose version offline to you directly if you 
send me your email to me at work on coal...@se.ibm.com. 

/Steve



From:   Paul Gilmartin <0000000433f07816-dmarc-requ...@listserv.ua.edu>
To:     IBM-MAIN@LISTSERV.UA.EDU
Date:   2015-07-28 17:34
Subject:        Message handling (was: Submit job without messages)
Sent by:        IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU>



(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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN




Såvida annat inte anges ovan: / Unless stated otherwise above:
IBM Svenska AB
Organisationsnummer: 556026-6883
Adress: 164 92 Stockholm


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to