Read a table in a table

Discussions relating to the ScottKlement.com port of the open source YAJL JSON Reader/Generator. This includes the YAJL tool as well as the YAJLR4, YAJLGEN, YAJLINTO and YAJLDTAGEN add-ons from ScottKlement.com. http://www.scottklement.com/yajl/
Post Reply
OlivierPierre04
Posts: 17
Joined: Fri Jan 07, 2022 2:56 pm

Read a table in a table

Post by OlivierPierre04 »

hi , i have this configuration
I'm ok with the first table "Json2_CodeActi" but
how can i acces the this table "TraceabilEnfants" inside the first table "Json2_CodeActi" with yajl


****************
DCL-C CodeAct 'codeActiviteFm';
DCL-C CisAs400F 'isAs400FiniPousserDansFm';
Dcl-C CisOverlog 'isOverlogFiniPousserDansFm';

DCL-C CisPrevisions 'isPrevisionsPretesPourIntegration';
DCL-C Cmodificateur 'modificateur';

DCL-C Ctraceabilite 'traceabilites';
DCL-C Cpropriete 'propriete';
DCL-C Chorodatage 'horodatage';
DCL-C CTmodificateur 'modificateur';


DCL-DS Json2_CodeActi qualified dim(3);
CodeAct varchar(100);
IsAs400F Ind;
IsOverlog Ind;
IsPrevisions Ind;
Modificateur varchar(200);
Traceabilite likeds(Json2_TraceabilEnfants) dim(3);
END-DS;

DCL-DS Json2_TraceabilEnfants qualified;
Propriete varchar(100);
Horodatage varchar(100);
Modificateur varchar(100);
END-DS;


RootNode = yajl_buf_load_tree(%addr(Data_reponse) : %Len(%Trim(Data_reponse)) : ErrLoadingTree);
If RootNode <> *null;
Count = 0;
Dow yajl_array_loop(RootNode : Count : NodeLvl2);

NodeLvl3 = yajl_object_find(NodeLvl2 : CodeAct);
if NodeLvl3 <> *Null;
Json2_CodeActi(Count).CodeAct =
yajl_get_string(NodeLvl3);
Endif;
Post Reply