It looked like JOINCONT was just what the doctor ordered.
I was asked by our z/OS sysprog (who does not have CMS/TSO Pipelines) for
some help with a rexx procedure on TSO. After a few changes, the specs
for the app were:
- Join any line with a tilde and the following line, drop all others. The
tilde could be anywhere in the record.
We got it working in TSO rexx. But I wanted to enlighten him with the
power of Pipelines (i.e. let him drool for a change).
So I tried the following (on CMS):
/* */ 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.0=17
'PIPE (END ? NAME JoincontDemo)' ,
'| STEM rec.' ,
'| JOINCONT RANGE 1-* DELAY /~/' , /*Join any rec w/~ to next*/
'| LOCATE /~/' , /*Drop any w/o ~ */
'| CHANGE / ~/ /' , /* Remove tildes */
'| CHANGE /~ / /' ,
'| CHANGE / ~ / /' ,
'| CHANGE /~//' ,
'| > JOINED RECS A'
Upon ending, JOINED RECS contained:
---<snip>---
keep rec 1
keep record 2 -- see the tilde? --->
keep rec 3
Keep tilde in middle of rec 4
---<snip>---
Where I had been expecting:
---<snip>---
~ keep rec 1 append to previous rec 1
keep record 2 -- see the tilde? --->~ append to previous rec 2
keep ~ rec 3 append to rec 3
Keep tilde in mid~dle of rec 4 append to rec 4
---<snip>---
doc:
piplevel
PIPINX560I CMS/TSO Pipelines, 5654-030/5655-A17 level 110B001C.
PIPINX086I CMS/TSO Pipelines, 5654-030/5655-A17 1.0111
(Version.Release/Mod) -
Generated 19 Sep 2008 at 10:17:19
Source: Princeton Runtime Distribution
What am I missing? RANGE 1-* seemed so intuitive.
Mike Walter
Hewitt Associates
Any opinions expressed herein are mine alone and do not necessarily
represent the opinions or policies of Hewitt Associates.
The information contained in this e-mail and any accompanying documents may
contain information that is confidential or otherwise protected from
disclosure. If you are not the intended recipient of this message, or if this
message has been addressed to you in error, please immediately alert the sender
by reply e-mail and then delete this message, including any attachments. Any
dissemination, distribution or other use of the contents of this message by
anyone other than the intended recipient is strictly prohibited. All messages
sent to and from this e-mail address may be monitored as permitted by
applicable law and regulations to ensure compliance with our internal policies
and to protect our business. E-mails are not secure and cannot be guaranteed to
be error free as they can be intercepted, amended, lost or destroyed, or
contain viruses. You are deemed to have accepted these risks if you communicate
with us by e-mail.