Hi again, Specifics.... I didn't actually expect one would see if I had 72 characters in an example. The point is - in col 72, if the line contiunes, there's a + If there's a continuation, + is the last thing to be found, in col 72.
- KB ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Sunday, July 12, 2020 9:04 AM, Seymour J Metz <sme...@gmu.edu> wrote: > That doesn't have anything in column 72. Did you actually mean a trailing > plus in any column? What about a plus followed by spaces? > > > ------------------------------------------------------------------------------------------------------------------------------------- > > Shmuel (Seymour J.) Metz > http://mason.gmu.edu/~smetz3 > > From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of > kekronbekron [000002dee3fcae33-dmarc-requ...@listserv.ua.edu] > Sent: Saturday, July 11, 2020 11:24 PM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: Re: Concatenating lines > > Hi Shmuel, > > It's not for any programming language. > It's for key-value pairs such as this. > > Sample: > object=blablablablablablablablablablablablablablablabla+ > blablablabla > objec2=small > objec3=blablablablablablablablablablablablablablablabla+ > blablablablablablablablablablablablablablablablablablab+ > blablablablablablablablablabla > > - KB > > ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ > On Sunday, July 12, 2020 5:13 AM, Seymour J Metz sme...@gmu.edu wrote: > > > > You didn't simplify it; you changed the behavior. You're checking for > > non-blank while Lionel was checking for plus. Column 72 suggests assembler, > > but the concatenation rules are more complicated than what the OP wrote. I > > have no idea what the OP wanted, but neither version is correct for > > assembler, CLIST or REXX. > > > > Shmuel (Seymour J.) Metz > > http://mason.gmu.edu/~smetz3 > > From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of > > Paul Gilmartin [0000000433f07816-dmarc-requ...@listserv.ua.edu] > > Sent: Saturday, July 11, 2020 11:52 AM > > To: IBM-MAIN@LISTSERV.UA.EDU > > Subject: Re: Concatenating lines > > On Sat, 11 Jul 2020 08:27:54 -0500, Lionel B Dyck wrote: > > > > > This is a very quick and somewhat dirty example: > > > /* rexx */ > > > 'alloc f(in) ds(lionel.doc(concinp)) shr reuse' > > > 'execio * diskr in (finis stem in.' > > > 'free f(in)' > > > do i = 1 to in.0 > > > data = '' > > > if substr(in.i,72,1) /= '+' > > > then data = in.i > > > else do while substr(in.i,72,1) = '+' > > > data = data''substr(in.i,1,71) > > > i = i + 1 > > > data = data''substr(in.i,1,71) > > > i = i + 1 > > > if substr(in.i,72,1) /= '+' then i = i - 1 > > > end > > > say data > > > end > > > Now have fun with this and I'm sure you can improve upon it for your > > > purposes - a generalized input prompt or allocation and same for output. > > > > /* Not making a non-continued line a special case, > > I'd simplify the loop to: / > > signal on novalue / Always! */data = '' > > do i = 1 to in.0 > > parse value in.i with l 72 c 73 . > > data = data''l > > if c = ' ' then do > > say data > > data = '' > > end > > end i > > -- gil > > > > For IBM-MAIN subscribe / signoff / archive access instructions, > > send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > > > > For IBM-MAIN subscribe / signoff / archive access instructions, > > send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > > -- > > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > > --------------------------------------------------------------------------------------------------------------------------------------- > > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN