You have my condolences? <grin/> Assuming REXX and EXECIO for a binary
file, then I'd likely do something akin to:

/* REXX */
EXECIO * DISKR (STEM RECORD.
FILE=''
DO I=1 TO RECORD.0 /* CONCAT FILE INTO A SINGLE STRING */
      FILE=FILE||RECORD.I
END
OUTPUT.0=0
I=1
DELIMITER=LEFT(FILE,1) /* FIRST BYTE MUST BE START OF RECORD CHAR!  PER OP*/
J=POS(DELIMITER,FILE,2) /* FIND START OF 2ND RECORD */
DO WHILE 0 <> J
      OUTPUT.I=LEFT(FILE,J-1)
      OUTPUT.0=I
      I=I+1
      FILE=SUBSTR(FILE,J)
      J=POS(DELIMITER,FILE,2) /* FIND START OF NEXT RECORD */
END
IF LENGTH(FILE) <> 0 THEN DO
    OUTPUT.I=FILE
    OUTPUT.0=I
END
EXECIO OUTPUT.0 DISKW (FINIS STEM OUTPUT.

Of course, this ASSuMEs that the entire data set contents can reside
in memory twice. The more complicated version would not work like
this, but would read, concatenate, split, and write only when
necessary.

On Wed, Jan 16, 2013 at 8:33 AM, Ze'ev Atlas <[email protected]> wrote:
> I would do Perl too, but what if you are limited to Rexx and EXECIO
>
> Ze'ev Atlas
>
>
>
> ________________________________
>  From: Shmuel Metz (Seymour J.) <[email protected]>
> To: [email protected]
> Sent: Tuesday, January 15, 2013 10:44 PM
> Subject: Re: Break a dataset into new record boundaries?
>
> In <[email protected]>, on 01/15/2013
>    at 09:04 AM, Charles Mills <[email protected]> said:
>
>>As luck would have it, every original record begins with the same
>>hex value. Can anyone suggest a simple tool -- z/OS, USS, or
>>Windows -- that would reformat the records breaking on every
>>occurrence of a particular byte value?
>
> I'd probably write a Perl script.
>
> --
>      Shmuel (Seymour J.) Metz, SysProg and JOAT
>      Atid/2        <http://patriot.net/~shmuel>
> We don't care. We don't have to care, we're Congress.
> (S877: The Shut up and Eat Your spam act of 2003)
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN



-- 
Maranatha! <><
John McKown

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to