[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ftpapi] data-into, YAJL parser issues



Is this mailing list actually working, now?   It had stopped working and was not working for the past 8 month.

Dennis,

I use YAJLINTO every day, and have never run into the problems you are experiencing.  No one else besides you has reported them.  So, you must be doing something differently than the others?

Can you send me an example program (please keep it simple, it doesn't have to do anything useful, it only has to reproduce the problem.  It needs to be something I can run, considering that I don't have your files, programs, etc... so please keep it only to what is necessary.)

Without any idea how to reproduce the problems you're seeing, it's difficult to assist you.

-SK


On 9/20/2019 6:46 PM, Dennis Liu wrote:
Hi Scott, hope you are doing well! I was so excited about the new data-into from IBM and the parser YAJLINTO from YAJL. We recently applied the required PTFs to our system (7.3). I wrote a sample program to play with. But, quickly, I run into some issues:
 
1. I have to define my data structure as an array (dim(n)) even though my json string does not start with a list. I got the error: 
 "15. A call to QrnDiStartArray was made, but the matching RPG variable or subfield is not an array.". 

2. After I changed my data structure to an array, it worked. However, I run into another problem. I am missing the value for the last element from my json string. 
 
3. I also tried to retrieve an object inside the json string using 'path'. Again, I run into an error. I got the following message: 
    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 statement 46500 of procedure DO_START_OBJECT
    Replacement text of message CEE9901 in QCEEMSG in QSYS not valid for  
      format specified.

Here is the snippet of my code:

       clear gJS;

       data-into gJS %data(gIFSFile
        :'doc=file case=convert allowmissing=yes allowextra=yes')
                     %parser('YAJL/YAJLINTO');


       //Retrieve part of the json string based on the path
       clear gJS2;
       data-into gJS2 %data(gIFSFile
        :'doc=file case=convert allowmissing=yes allowextra=yes +
          path=orderIsCancelled/way_points/contacts')
       %parser('YAJLINTO'
              :'{"value_null": "*none*", "document_name": "orderIsCancelled"}'); 


I also attached my program and the json string. 

Appreciate if you give me some advice. Thanks a lot. 

Warmest regards,

Dennis 
 

--
Best regards,

Dennis 刘 春

-- 
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi