Based on your response, I think I wasn't clear enough.  What I meant was
that the size of the next record to be written is based on the contents of
the first 2 bytes of that output record.  The input is a stream, so I
can't use STRFIND; if the first input record is 10,000 bytes then the
first output record is either 4111 or 1071 (based on the first two input
bytes), and the two bytes immediately following that data is used to
determine the size of the next output record.  Etc.

The fact that I need to reblock the input is what makes a sipping stage
not as straightforward as a "read a record, write a record" stage.  That's
why I was hoping for a stage that would do some more of the dirty work.

- mb

CMSTSO Pipelines Discussion List <[email protected]> wrote on
05/06/2015 04:50:23 PM:

> From: Hobart Spitz <[email protected]>
> To: [email protected]
> Date: 05/06/2015 04:51 PM
> Subject: Re: Conditional reblocking. Or something like that.
> Sent by: CMSTSO Pipelines Discussion List <[email protected]>
>
> You could use some thing like:
> PIPE (END ?) < ... | F: FANINANY | L: STRFIND /DA/ | S1: SPECS 1-1071 1
> SELECT OUTPUT 1 1072-* 1 | > ...
> ? S1: | F:
> ? L: | S2: SPECS 1-1114 1 SELECT OUTPUT 1 1115-* 1 | F:
> ? S2: | F:
>
> If you don't like shunts, IF can used at S1, and S2.
>
> If you need to preserve record order you'll need to work a little
harder.
>
> However, a REXX filter might be simpler and more maintainable.
>
> Interesting puzzle.
> Do they need to be written to two separate files?

Reply via email to