If it helps, the following PTFs would get your RPG compiler,
runtime, and previous target levels all up-to-date as of a month
or so ago (for IBM i 7.3)
Installing these would likely be a lot easier than installing all
of the PTFs in cum/group packages, but of course, it only brings
RPG up-to-date (nothing else).
This would also give you access to the latest features for 7.3,
such as the SAMEPOS DS keyword.
-SK
On 9/23/19 5:51 PM, Dennis Liu wrote:
Hi Scott, that is exactly what I meant. You see,
you get the value for 'reason'. For me, it came back with blank.
I still believe it has something to do with our system where we
are missing so many PTFs. I will wait for our system
administrator to catch up with our PTFs. Then, I will test
again. Unfortunately, they have other high priority works to do.
I will keep you posted. Appreciated all your help.
Hi Scott, this is very interesting. I asked
our iSeries system engineer to double-check the PTFs
(SI67185, SI67187, SI63445, and SI67183) and we
confirmed all are applied in our system. I also tried to
recompile my program targeting V7R2M0. I still have the
same problem. The only possible reason we can think of
is that we are very much behind in terms of PTFs,
meaning we have many other PTFs that have not applied
for the past year or two.
Anyway, I am glad it worked just fine when you
tested. There is one more thing. Even after I use DIM
on gJS, it worked. However, the program failed to
retrieve the value for 'reason' that is defined as the
last element in my data structure. All other values
are retrieved correctly, including
'last_assigned_time', but the 'reason' comes back with
all blanks. I am not sure if you have the same issue.
If you can firm that, that would be great.
My apologies, I did not notice the program/json
that you attached. Thank you for re-sending them.
I tried your program and did not have the
problems that you describe. I removed the DIM(1)
from gJS, and the program worked without errors.
The DIM on gJS2 is required, however, because
"contacts" is an array in the JSON file. This
worked perfectly for me the way you have it coded,
which honestly surprised me -- I expected this one
to fail because "way_points" is also an array and
is in the middle of your path= setting, I figured
that would not work, but I was wrong it worked
fine without any errors for me.
I do not have access to an actual 7.3 machine,
but I tested on a 7.2 machine and on a 7.4 machine
with tgtrls(V7R3M0) -- all worked without error.
Perhaps you haven't installed the latest RPG PTFs
on your machine?
-SK
On 9/20/2019 11:11 PM, Dennis Liu wrote:
Scott, thank you for your reply. I
did attached my progrom and the sample json file
I used in the program. If you put the file on
your IFS folder, change the folder name in the
program. It should run. Also, I want to point
out that I don't have the problem #1 when I just
run my my program against a simple json string
constructed within the program. I did run my
json file through an online validation. It is
valid. I use this website to do the validation.
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.
//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'