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. Lionel B. Dyck <sdg>< Website: https://www.lbdsoftware.com "Worry more about your character than your reputation. Character is what you are, reputation merely what others think you are." - John Wooden -----Original Message----- From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of kekronbekron Sent: Saturday, July 11, 2020 7:12 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Concatenating lines Thanks Lionel, what about when there's a 3 or 7-part line (2 or 6 lines with continuation char respectively.). Need a safe way to loop the 'else do' bit you've shown below. - KB ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Saturday, July 11, 2020 5:26 PM, Lionel B Dyck <lbd...@gmail.com> wrote: > I'm not aware of one but that would be a very trivial rexx program to do so. > > This should get you started: > > /* 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 > if substr(in.i,72,1) /= '+' > then say in.i > else do > data = substr(in.i,1,71) > i = i + 1 > data = data''in.i > say data > end > end > > Lionel B. Dyck <sdg>< > Website: https://www.lbdsoftware.com > > "Worry more about your character than your reputation. Character is > what you are, reputation merely what others think you are." - John > Wooden > > -----Original Message----- > From: IBM Mainframe Discussion List IBM-MAIN@LISTSERV.UA.EDU On Behalf > Of kekronbekron > Sent: Saturday, July 11, 2020 6:37 AM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: Concatenating lines > > Hi, > > Is there any program in any of the CBT tapes, or perhaps on someone's GitHub > .. that makes concatenating lines easy? > If a continuating character is found in column 72, append the next line to > current line, and so on. > > Thanks, > > - KB > > 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