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 [email protected] with the message: INFO IBM-MAIN