× 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.



By *default* you the nulls cannot be assigned to numeric fields because the default value for a null is '*NULL', which is a character string that can't be stored in a numeric field.

If you change the value (perhaps to 0 or -1, depending on your application) it can be assigned to a number without a problem.

On 9/1/2020 9:16 AM, Raul Alberto Jager Weiler wrote:
Null values must go to alpha fields, not packed.
You need to check for 'null', if not change to decimal (%dec)

On Tue, Sep 1, 2020 at 10:10 AM (WalzCraft) Jerry Forss <
JForss@xxxxxxxxxxxxx> wrote:

Hi All,

I am using YAJL to consume json from a web service.

It parses the first details element but crashes on the second.

What do I have defined incorrectly?

From json

"details": [
{
"handlingUnits": 1,
"class": "70",
"packaging": "SK",
"isHazardous": false,
"description": "DOOR",
"weight": 55,
"rate": null,
"charges": null
},
{
"handlingUnits": 0,
"class": "FS",
"packaging": "",
"isHazardous": false,
"description": "FUEL SURCHARGE 17.500%",
"weight": 0,
"rate": null,
"charges": null
}
],

My DS looks like

cnt_details Int(5);
Dcl-ds details Dim(25);
handlingUnits Packed(5 : 0);
class Char(5);
packaging Char(100);
isHazarddous Ind;
description Char(100);
weight Packed(5 : 0);
rate Packed(5 : 0);
charges Packed(7 : 2);
End-Ds;




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.