On Tue, 15 Jan 2013 09:04:30 -0800, Charles Mills wrote:

>I've got a dataset that has been mangled through some misguided efforts such
>that original record boundaries have been lost. It used to be RECFM=V and
>now it is RECFM=F
>
>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?
> 
Having RTFM a little more, I'd go with (untested):

    cp -B "//'BAD.DATA.SET'" /dev/fd/1 |
        tr '\???\025' '\025\???' |
        cp /dev/fd/0 "//'BETTER.DATA.SET'"

o where \??? is the _octal_ value of your delimiter character (\025 is octal 
newline).
o Preallocate your BETTER.DATA.SET.

Oops.  This loses your delimiter character.  Put it back with sed.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to