Re: DFSORT wizard help

2020-10-29 Thread Ray Pearce
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:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of Ituriel do Neto
Sent: 29 October 2020 11:06
To: IBM-MAIN@LISTSERV.UA.EDU
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
<000433f07816-dmarc-requ...@listserv.ua.edu> escreveu:

 On Wed, 28 Oct 2020 20:40:54 +, 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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions, send email
to lists...@listserv.ua.edu 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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: DFSORT wizard help

2020-10-29 Thread Ituriel do Neto
 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 
<000433f07816-dmarc-requ...@listserv.ua.edu> escreveu:  
 
 On Wed, 28 Oct 2020 20:40:54 +, 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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN  

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


Re: DFSORT wizard help

2020-10-28 Thread Sri h Kolusu
> What's your criterion for separating fields into lines?  Your example is
insufficiently informative.

Gil,

This is my interpretation of the requirement. Treat the entire data that OP
showed as a single line of data and OP wants to split the records beginning
with open curly bracket { and end with a closing curly bracket }

So the individual records would be like after the running that I showed
earlier.

{"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}



Thanks,
Kolusu
DFSORT Development
IBM Corporation

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


Re: DFSORT wizard help

2020-10-28 Thread Paul Gilmartin
On Wed, 28 Oct 2020 20:40:54 +, 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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: DFSORT wizard help

2020-10-28 Thread Sri h Kolusu
Ituriel,

Here is  DFSORT/ICETOOL job that would give you the desired results. I
assumed that you can have a maximum of 100 records in a single record. I
assumed that the maximum length of  each individual record has a length of
60 bytes.

//STEP0100 EXEC PGM=ICETOOL
//TOOLMSG  DD SYSOUT=*
//DFSMSG   DD SYSOUT=*
//IN   DD DISP=SHR,DSN=KOLUSU.ITURIEL.INPUT.TXT
//OUT  DD SYSOUT=*
//TOOLIN   DD *
  RESIZE FROM(IN) TO(OUT) TOLEN(60) USING(CTL1)
//CTL1CNTL DD *
  OPTION COPY
  INREC PARSE=(%001=(STARTAT=C'{',
  REPEAT=100,
   ENDAT=C'}',
  FIXLEN=60)),
BUILD=(%001,%002,%003,%004,%005,%006,%007,%008,%009,%010,
   %011,%012,%013,%014,%015,%016,%017,%018,%019,%020,
   %021,%022,%023,%024,%025,%026,%027,%028,%029,%030,
   %031,%032,%033,%034,%035,%036,%037,%038,%039,%040,
   %041,%042,%043,%044,%045,%046,%047,%048,%049,%050,
   %051,%052,%053,%054,%055,%056,%057,%058,%059,%060,
   %061,%062,%063,%064,%065,%066,%067,%068,%069,%070,
   %071,%072,%073,%074,%075,%076,%077,%078,%079,%080,
   %081,%082,%083,%084,%085,%086,%087,%088,%089,%090,
   %091,%092,%093,%094,%095,%096,%097,%098,%099,%100)

  OUTFIL INCLUDE=(1,1,CH,EQ,C'{')
/*

Further if you have any questions please let me know

Thanks,
Kolusu
DFSORT Development
IBM Corporation

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


DFSORT wizard help

2020-10-28 Thread Ituriel do Neto
Hi,
I have an omvs file and would like to separate the fields into multiple 
lines.The input file has the following 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},{"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.
TIA
Best Regards


Ituriel do Nascimento Neto

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