First I'll point out that the replace and modify examples are redundant.
For a replacement situation just specify the entire replacement string in
the modify example's specs stage.
The same's true of Rob's solution, where the replace is limited case of
modify.  For a more complex modification you might code the specs stage in
your control record and pass it to callpipe.

--
Mike Harding
z/VM System Support

/sp


CMSTSO Pipelines Discussion List <[email protected]> wrote on
04/11/2014 11:11:31 PM:

> From: Rob van der Heij <[email protected]>
> To: [email protected],
> Date: 04/12/2014 04:11 AM
> Subject: Re: Replace/overlay record #
> Sent by: CMSTSO Pipelines Discussion List <[email protected]>
>
> I would use 'collate' with the record number as the key. You prefix each
> input record with the 10-byte record number and have the master
streamwith
> replacements also tagged with record number to replace. You could use
plain
> record numbers (so no data) as deletion (use a locate 1 afterwards to
> filter null records out) and some out-of-order record number would let
you
> insert something.
>
> Rob
>
>
> On 12 April 2014 04:25, Frank M. Ramaekers <[email protected]> wrote:
>
> > Okay plumbers, I have a stream and I know which record number I want to
> > replace or modify.  Is there some easier method than
> >
> > REPLACE:
> >
> > PIPE (endchar ?) ... f:TAKE FIRST n-1 | DROP FIRST 1 | PREFACE
> > STRLITERAL ... |i:FANINANY ...?f:|i:
> >
> >
> >
> > MODIFY
> >
> > PIPE (endchar ?) ... f:TAKE FIRST n-1 |g:TAKE FIRST 1 | SPEC /*/ 1 1-*
N
> > |i:FANINANY...?f:|i:?g:i:
> >
> >
> >
> >
> >
> > Frank M. Ramaekers Jr. | Systems Programmer | Information Technology |
> > American Income Life Insurance Company | 254-761-6649
> >
> >
> >
>

Reply via email to