ctl-opt dftactgrp(*no); readTheJson(); *inlr = *on; // FIXME: // - The field lengths (varchar/packed) are guesses // and should be adjusted based on your business rules. // - The array lengths (dim keywords) are also guesses // and should be adjusted based on your business rules dcl-proc readTheJson; dcl-ds jsonDoc qualified; num_DESTINATION_ADDRESSES int(10) inz(0); DESTINATION_ADDRESSES varchar(40) inz('') dim(4); num_ORIGIN_ADDRESSES int(10) inz(0); ORIGIN_ADDRESSES varchar(47) inz('') dim(1); num_ROWS int(10) inz(0); dcl-ds ROWS dim(1); num_ELEMENTS int(10) inz(0); dcl-ds ELEMENTS dim(4); dcl-ds DISTANCE; TEXT varchar(7) inz(''); VALUE packed(5) inz(0); end-ds; dcl-ds DURATION; TEXT varchar(7) inz(''); VALUE packed(4) inz(0); end-ds; STATUS varchar(2) inz(''); end-ds; end-ds; STATUS varchar(2) inz(''); end-ds; dcl-s ifsPathName varchar(5000); ifsPathName = '/smedoc/UTE/DEPE/gmaps.json'; data-into jsonDoc %DATA( ifsPathname : 'doc=file case=convert countprefix=num_') %PARSER( 'YAJLINTO' : '{ "document_name": "jsonDoc", + "number_prefix": "YAJL_" }'); end-proc;