I need help on this.  (I said I was naive.)

On Tue, 28 Jul 2015 15:40:09 +0200, Steve Coalbran wrote:

>SAYMSG: PROCEDURE 
>PARSE ARG zedsmsg,lm 
>zedlmsg = "" 

/* 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 

/* IOW, while lm contains nothing but blanks and paragraph marks?  */
>DO WHILE( TRANSLATE(ml lm," ","�")<>"" ) 

/* 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) 

/* I'd rather:  */
    zedlmsg = zedlmsg !! LEFT(ml,((LENGTH(ml)+76)%77)*77) 

>   PARSE VAR lm ml"�"lm 
>END 

/* Does ISPF collapse multiple blanks to single blanks?  */
>zedsmsg = TRANSLATE(zedsmsg," ","�") 
>zedlmsg = TRANSLATE(zedlmsg," ","�") 

/* What if your EXEC is called from TSO READY prompt, IRXJCL, or OMVS; not from 
ISPF?
   My approach is to "say ZEDLMSG" if SETMSG fails.  */
>ADDRESS ISPEXEC "SETMSG MSG(ISRZ000)" 

Thanks,
gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to