Could this be done quite easily using sed?
Create a sed script file
# split.sed
s/},{/}\
{/g
And then run
sed -f split.sed input.file > output.records
Your file looks like it is json. You will also need to remove the square
brackets that surround the array of records.
I'll leave this as an exercise for the reader.
Ray
-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On
Behalf Of Ituriel do Neto
Sent: 29 October 2020 11:06
To: [email protected]
Subject: Re: DFSORT wizard help
Gentlemen,
The logical record i want starts with a "{" and ends with "}"
Thanks
Ituriel
Em quarta-feira, 28 de outubro de 2020 19:13:58 BRT, Paul Gilmartin
<[email protected]> escreveu:
On Wed, 28 Oct 2020 20:40:54 +0000, Ituriel do Neto wrote:
>Hi,
>I have an omvs file and would like to separate the fields into multiple
>lines.The input file has the following format:
>
What's your criterion for separating fields into lines? Your example is
insufficiently informative.
> Ý{"date":"20200616-0400","MMSU":11206,"IH":35,"X":302},{"date":"20200616-0500","MMSU":11235,"IH":29,"X":303},{"date":"20200616-0600","MMSU":11269,"IH":34,"X":304},{"date":"20200616-0700","MMSU":11309,"IH":40,"X":305},{"date":"20200616-0800","MMSU":11352,"IH":43,"X":306},{"date":"20200616-0900","MMSU":11403,"IH":51,"X":307},{"date":"20200616-1000","MMSU":11459,"IH":56,"X":308},{"date":"20200616-1100","MMSU":11516,"IH":57,"X":309},{"date":"20200616-1200","MMSU":11585,"IH":69,"X":310},{"date":"20200616-1300","MMSU":11639,"IH":54,"X":311},{"date":"20200616-1400","MMSU":11689,"IH":50,"X":312},{"date":"20200616-1500","MMSU":11742,"IH":53,"X":313},{"date":"20200616-1600","MMSU":11805,"IH":63,"X":314},{"date":"20200616.....
>And I would like to create a dataset in this
>format:{"date":"20200616-0400","MMSU":11206,"IH":35,"X":302}
>{"date":"20200616-0500","MMSU":11235,"IH":29,"X":303}{"date":"20200616-0600","MMSU":11269,"IH":34,"X":304}...
>I know SORT can to magic, but I'm not getting success.Any help will be
>appreciated.
-- gil
----------------------------------------------------------------------
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
--
This e-mail message has been scanned and cleared by Google Message Security
and the UNICOM Global security systems. This message is for the named
person's use only. If you receive this message in error, please delete it
and notify the sender.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN