× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.





Dear ALl,

I have the following piece of code
dcl-ds dati qualified;
CodiceCliente varchar(6);
RagioneSociale varchar(35);
PartitaIva varchar(11);
TipoCliente varchar(1);
Indirizzo varchar(35);
Cap varchar(5);
Localita varchar(35);
Provincia varchar(2);
end-ds;

dcl-c lyajlOpts '{ +
"beautify": true, +
"sequence type": "array" +
}';


data-gen *start %data(gMyFile: 'doc=file') %gen('YAJLDTAGEN':lyajlOpts);
lStart = *ON;

Loop with
data-gen dati %data(gMyFile: 'doc=file output=continue') %gen('YAJLDTAGEN':lyajlOpts);

*END
data-gen *end %data(gMyFile: 'doc=file') %gen('YAJLDTAGEN':lyajlOpts);
JSON generate is like the following
[
{
"CodiceCliente": "C00043",
"RagioneSociale": "VEICOLI INDUSTRIALI MATTONI S.R.L.",
"PartitaIva": "",
"TipoCliente": "D",
"Indirizzo": "VIA GALATEA, 113",
"Cap": "00155",
"Localita": "LA RUSTICA (ROMA)",
"Provincia": "RM"
},
{
"CodiceCliente": "C00053",
"RagioneSociale": "ROTALNORD AUTO SRL",
"PartitaIva": "",
"TipoCliente": "D",
"Indirizzo": "S.S. 12 DEL BRENNERO KM 400",
"Cap": "38010",
"Localita": "CADINO DI FAEDO",
"Provincia": "TN"
},
{
"CodiceCliente": "C00180",
"RagioneSociale": "NIS-CAR S.R.L",
"PartitaIva": "",
"TipoCliente": "D",
"Indirizzo": "VIA SPLUGA, 70/1",
"Cap": "23857",
"Localita": "OLGINATE",
"Provincia": "LC"
}
]
but i need something like this with the ROOT dati . I try different way without reach my purpose. Any idea ?

Thanks
Basilio


{
      "dati" : [
            {
                  "CodiceCliente" : "C00043",
                  "RagioneSociale" : "VEICOLI INDUSTRIALI MATTONI S.R.L.",
                  "PartitaIva" : "01050001005",
                  "TipoCliente" : "D",
                  "Indirizzo" : "VIA GALATEA, 113",
                  "Cap" : "00155",
                  "Localita" : "LA RUSTICA (ROMA)",
                  "Provincia" : "RM"
            },
            {
                  "CodiceCliente" : "C00053",
                  "RagioneSociale" : "ROTALNORD AUTO SRL",
                  "PartitaIva" : "01902620226",
                  "TipoCliente" : "D",
                  "Indirizzo" : "S.S. 12 DEL BRENNERO KM 400",
                  "Cap" : "38010",
                  "Localita" : "CADINO DI FAEDO",
                  "Provincia" : "TN"
            },
            {
                  "CodiceCliente" : "C00180",
                  "RagioneSociale" : "NIS-CAR S.R.L",
                  "PartitaIva" : "01843810134",
                  "TipoCliente" : "D",
                  "Indirizzo" : "VIA SPLUGA, 70/1",
                  "Cap" : "23857",
                  "Localita" : "OLGINATE",
                  "Provincia" : "LC"
            }
      ]
}



***********************************************************************************************************
CONFIDENTIALITY NOTICE

This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information.

If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify us by email to email.security@xxxxxxxxxxxxxxxxx with a copy of this message. You must not, directly or indirectly, use, disclose, distribute, print or copy any part of this message if you are not the intended recipient. NISSAN EUROPE and any of its subsidiaries each reserves the right to monitor all e-mail communications through its networks.

NISSAN EUROPE is neither liable for the proper, complete transmission of the information contained in this communication nor any delay in its receipt. This email was scanned for the presence of computer viruses. In the unfortunate event of infection NISSAN EUROPE does not accept liability.

Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them.

***********************************************************************************************************

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.