Hi Gil comments inline preceded by '>>'
From: Paul Gilmartin <0000000433f07816-dmarc-requ...@listserv.ua.edu> To: IBM-MAIN@LISTSERV.UA.EDU Date: 2015-07-28 16:26 Subject: Re: Submit job without messages Sent by: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> 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 >> no first line goes to var ml, remainder stays in var lm for re-parsing /* 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 /* 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. /* I'd rather: */ zedlmsg = zedlmsg !! LEFT(ml,((LENGTH(ml)+76)%77)*77) > PARSE VAR lm ml"�"lm >END >> you can build in any variable you like as ling as it gets to zedlmsg before the SETMSG call /* Does ISPF collapse multiple blanks to single blanks? */ >zedsmsg = TRANSLATE(zedsmsg," ","�") >zedlmsg = TRANSLATE(zedlmsg," ","�") >> NO, historical, I used to SPACE it first! /* 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)" >> I have another version that accesses SYSVAR("SYSISPF") and 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? >> 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 Thanks, gil >> No probs. >> Steve >> BTW: try it - the example in the 'TRY' bit tests it out, just de-comment whichever? ---------------------------------------------------------------------- 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