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



Hi Suren,

When you get the error, place the cursor on the "Pointer not set for location referenced." error and press F1. That will help pinpoint the error.

--
*Peter Dow* /
Dow Software Services, Inc.
909 793-9050
petercdow@xxxxxxxxx <mailto:petercdow@xxxxxxxxx>
pdow@xxxxxxxxxxxxxx <mailto:pdow@xxxxxxxxxxxxxx> /

On 6/11/2019 9:15 AM, Suren K wrote:
Hi Pete,

Thanks for replying and helping me out.

The Error message i got is as below
4>> CALL SKANTHAS/DUMMY2
Pointer not set for location referenced.
Application error. MCH3601 unmonitored by QRNXUTIL at statement
0000000031, instruction X'0000'.
Application error. MCH3601 unmonitored by QRNXUTIL at statement
0000000031, instruction X'0000'.
Unmonitored exception at line 423
Replacement text of message CEE9901 in QCEEMSG in QSYS not valid for
format specified.
? *N

Regards,
Surender K


On Tue, Jun 11, 2019 at 11:57 AM Pete Helgren <pete@xxxxxxxxxx> wrote:

It probably isn't important but you characterized your scenario #2 as
adding another array to the document. You haven't added to an array,
you added a second object to the "data" object. It's just semantics,
but it alters the view of the JSON a bit.

I haven't worked with YAJL all that much but within the object you have
two objects, metadata and data and within the data object in your second
scenario, you have two objects, playerPin and playerProfile. I would
guess that adding a second object shouldn't affect the prior reference:

Scenario 1

data.playerProfile

Scenario 2

data.playerPin

data.playerProfile

Maybe giving us the error message would help us track down the solution....

Pete Helgren
www.petesworkshop.com
GIAC Secure Software Programmer-Java
Twitter - Sys_i_Geek IBM_i_Geek

Pete Helgren
www.petesworkshop.com
GIAC Secure Software Programmer-Java
Twitter - Sys_i_Geek IBM_i_Geek

On 6/10/2019 9:16 PM, Suren K wrote:
Hi Everyone,

I am using the Scott Klement's YAJL parser for Parsing the JSON
Document. I
am receiving an error when i parsing a document. Let me explain it in two
scenario, Scenario 1 (I can Parse the JSON Document) and Scenario 2 (I
cannot Parse the JSON Document which i am receiving an Error)

Scenario 1: (Parsed Successfully)
JSON Document:
{
"metadata":{
"propertyId":"E4",
"suren":"suren",
"clientId":"ATRIENTKIOSK",
"transDateTime":"2017-11-30T18:25:08Z",
"transStation":"DEVICE1",
"transEmployee":"MASTR"
},
"data":{
"playerProfile":{
"title":"Mr",
"firstName":"John",
"lastName":"Smith"
}
}
}

Data Structure:
Dcl-Ds playerProfile qualified;
title char(5);
firstName Char(25);
lastName char(25);
End-Ds;

RPG Code for Parsing this document
data-into(E) playerProfile %DATA(Wrk_Json: case=convert doc=string
path=json/data/playerProfile allowmissing=yes allowextra=yes)
%PARSER('YAJLINTO' :'{ "document_name":
"json",
"value_null": " " }');
This one works fine.

Scenario 2: (Unable to Parse, got an Error while Parsing)

Add one more array in the document and trying to parse the same
playerProfile i am getting error. Sample as below
JSON Document:
{
"metadata":{
"propertyId":"E4",
"suren":"suren",
"clientId":"ATRIENTKIOSK",
"transDateTime":"2017-11-30T18:25:08Z",
"transStation":"DEVICE1",
"transEmployee":"MASTR"
},
"data":{
"playerPin":{
"pinNumber":"7924"
},
"playerProfile":{
"title":"Mr",
"firstName":"John",
"lastName":"Smith"
}
}
}

Data Structure:
Dcl-Ds playerProfile qualified;
title char(5);
firstName Char(25);
lastName char(25);
End-Ds;

RPG Code for Parsing this document
data-into(E) playerProfile %DATA(Wrk_Json: case=convert doc=string
path=json/data/playerProfile allowmissing=yes allowextra=yes)
%PARSER('YAJLINTO' :'{ "document_name":
"json", "value_null": " " }');

This Scenario Errored Out.

Could you please someone let me know whether this scenario is not handled
in YAJL Parser or am i doing something wrong?

Regards,
Surender K
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com




---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

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.