i have an incoming pricing request with an array in it. I capture the number of elements on the incoming using the num_ countprefix option
Problem is on the data-gen it isn't recognizing that and tries to write all the elements and i get data decimal errors on the numeric fields being blank whenever i pass less than the 50 elements. 1st time using both so probably doing something wrong on the outgoing data gen . Data-into works great.
dcl-ds incoming qualified;
cusn char(10);
dtes zoned (8:0);
num_itmnin int(10);
dcl-ds itmnin dim(50);
item char(10);
bccdt char(1);
newprc zoned (8:2);
end-ds;
end-ds;
data-into incoming
%DATA(json:'doc=string countprefix=num_')
%PARSER('YAJLINTO');
dcl-ds outgoing qualified;
num_itmno int(10);
dcl-ds itmno dim(50);
itmo char(10);
name_itmo char(10) inz('itmn');
prcnt zoned (8:2);
flrt zoned (8:2);
base zoned (8:2);
end-ds;
end-ds;
outgoing.num_itmno = incoming.num_itmnin;
data-gen outgoing
%DATA(json:'doc=string countprefix=num renameprefix=name')
%GEN('YAJLDTAGEN');
Problem outputing DATA-GEN with array
Re: Problem outputing DATA-GEN with array
I have never experienced this -it always works fine for me.
I did notice, however, that your countprefix option on the DATA-GEN was spelled incorrectly. It may be a typo, but you coded:
instead of:
Is that the problem?
I did notice, however, that your countprefix option on the DATA-GEN was spelled incorrectly. It may be a typo, but you coded:
Code: Select all
%DATA(json:'doc=string countprefix=num renameprefix=name')
Code: Select all
%DATA(json:'doc=string countprefix=num_ renameprefix=name')