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? -----Original Message----- From: CMSTSO Pipelines Discussion List [mailto:CMS-PIPELINES@VM.MARIST.EDU] On Behalf Of Mark Boonie Sent: Wednesday, May 06, 2015 3:50 PM To: CMS-PIPELINES@VM.MARIST.EDU Subject: Conditional reblocking. Or something like that. I have a file that I'd like to reblock based on the first two characters of each record: if the first two characters are 'DA' then write 1071 bytes, but for any other combination of characters I need to write 4111 bytes. I don't need a working solution, just a pointer in the right direction. Thanks. - mb