As I read it, RANGE on JOINCONT implies the entire range has to match the
specified string.  More like pick than locate.
Try this:

/* */ address COMMAND
   rec.1 ='* Ignore this line'
   rec.2 ='Ignore this line, too'
   rec.3 ='~ keep this record 1'
   rec.4 ='append to previous tilde record 1'
   rec.5 ='Ignore this line, too'
   rec.6 ='  keep this record, too -- see the tilde 2?  --->~'
   rec.7 ='append to previous tilde record 2' ,
   rec.8 ='Ignore this line, too'
   rec.9 ='; drop this record'
   rec.10='and this 1, 2  ;-)'
   rec.11=' '
   rec.12='keep ~ this record it had a tilde 3'
   rec.13='append to previous tilde record 3'
   rec.14='Even lines with a tilde in the mid~dle' ,
          'of a word count to be saved 4'
   rec.15='append to previous tilde record 4'
   rec.16='Ignore this line, too'
   rec.17='* * * End of File * * *'
   rec.18='join multiple lines with ~ (line 1)'
   rec.19=' this would be the second ~'
   rec.20='  and ~ still another'
   rec.21=' for the group'
   rec.22='but not this one'
   rec.0=22
   'PIPE (END ? NAME JoincontDemo)' ,
      '| STEM rec.' ,
      '|p1: Locate /~/',
      '|Change //~/',
      '|rr: Faninany',
      '| JOINCONT RANGE 1.1 /~/' ,  /*Join any rec w/~ to next*/
      '| LOCATE /~/' ,                    /*Drop any w/o ~          */
      '| CHANGE / ~ / /' ,
      '| CHANGE / ~/ /' ,                 /* Remove tildes          */
      '| CHANGE /~ / /' ,
      '| CHANGE /~//' ,
      '| > JOINED RECS A',
      '| Cons',
   '?p1:',
      '|rr:'

Mike Harding, Consultant/Specialist

Enterprise Platform Services, Mainframe Engineering
KP-IT Enterprise Engineering
925-926-3179 (8-473-3179) | E-Mail: [email protected]
AIM: VMBearDad | Yahoo IM: mbhcpcvt
Kaiser Service Credo: "Our cause is health. Our passion is service. We're
here to make lives better."

NOTICE TO RECIPIENT:  If you are not the intended recipient of this
e-mail, you are prohibited from sharing, copying, or otherwise using or
disclosing its contents.  If you have received this e-mail in error,
please notify the sender immediately by reply e-mail and permanently
delete this e-mail and any attachments without reading, forwarding or
saving them.  Thank you.

Reply via email to