Data-INTO issue Reason Code 6
Posted: Tue Jun 07, 2022 8:49 pm
Json Received -
Data-Structure created :-
Data-into used below:-
Getting below error -
Message . . . . : The information supplied by the parser for the DATA-INTO
operation was in error. Reason code 6.
Cause . . . . . : While parsing an document for an RPG procedure, the
information supplied by the parser was in error. The actual document is *N;
*N indicates that the document was not an external file. The parser is
'YAJLINTO'. *N indicates that the parser is a procedure pointer. The reason
code is 6.
6. A call to QrnDiReportValue, QrnDiReportValueCcsid, QrnDiStartStruct, or
QrnDiStartArray was made, but there was no prior call to QrnDiReportName
or QrnDiReportNameCcsid. Calling QrnDiReportValue, QrnDiReportValueCcsid,
QrnDiStartStruct, or QrnDiStartArray without a prior call to
QrnDiReportName or QrnDiReportNameCcsid is only valid at the beginning of the parse
What am i doing wrong? i can't understand the error? pls advise
Code: Select all
{
"start_time": "2022-06-06T00:00:06.000Z",
"data_extract": {
"expected_end_datetime": "2022-06-07T00:00:00",
"stop_idle_fuel_used": 0,
"distance_drive": 353.1,
"drive_time": 442.25,
"performance_group_id": "default",
"odometer_start": 36255.84,
"engine_time": 442.25,
"pto_time": 0,
"over_rpm_count": 13,
"stop_idle_time": 0,
"intertrip_idle_time": 0,
"coast_out_gear_time": 0,
"top_gear_time": 87.55,
"total_trip_count": 21,
"cruise_control_time": 152.92,
"moving_time": 403.15,
"over_rpm_time": 0.75,
"total_idle_fuel_used": 0.6,
"over_rpm_max_value": 1999,
"over_speed_count": 0,
"moving_fuel_used": 40.8,
"excessive_rpm_time": 0,
"excessive_overspeed_time": 0,
"stop_idle_count": 0,
"total_idle_time": 39.1,
"over_speed_time": 0,
"total_fuel_used": 41.4,
"over_rpm_max_duration": 0.27,
"excessive_rpm_count": 0,
"gear_data_source": "J1939",
"pto_fuel_used": 0,
"engine_readings_count": 26535,
"speed_rpm_matrix": [
[
0,
0,
0.12,
0.13,
0.08,
18.15,
6,
2,
3.25,
4.92,
3.12,
0.82,
0.23,
0.17,
0.07,
0.03,
0.02,
0,
0,
0,
0,
0,
0,
0,
0
],
[
0,
0,
0,
0,
4.63,
9.02,
1.03,
1.12,
2.9,
14.3,
67.55,
82.02,
23.07,
12.68,
7.42,
3.72,
2.65,
0.85,
0.33,
0.12,
0,
0,
0,
0,
0
],
[
0,
0,
0,
0,
3.48,
7.33,
0.3,
0.37,
0.48,
0.25,
0.38,
110.2,
0.47,
0.03,
0.62,
1.25,
0.02,
0.02,
0.25,
0,
0,
0,
0,
0,
0
],
[
0,
0,
0,
0,
4.48,
7.62,
0.23,
0.23,
0.1,
0.18,
0.22,
5.73,
13.25,
0.02,
0.05,
1.97,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
[
0,
0,
0,
0,
0.62,
2.57,
0.17,
0.07,
0.03,
0.12,
0.13,
0.07,
3.55,
0.02,
0,
0.18,
0.17,
0,
0,
0.05,
0,
0,
0,
0,
0
],
[
0,
0,
0,
0,
0,
1.12,
0.03,
0,
0,
0.02,
0,
0,
0.45,
0.02,
0,
0,
0.27,
0,
0,
0,
0,
0,
0,
0,
0
],
[
0,
0,
0,
0,
0,
0.47,
0,
0,
0,
0,
0,
0,
0,
0.12,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
],
"avg_engine_load": 36.08,
"stop_idle_warning_count": 0,
"short_idle_fuel_used": 0.6,
"over_speed_max_duration": 0,
"short_idle_count": 61,
"excessive_overspeed_count": 0,
"short_idle_time": 39.1
},
"end_time": "2022-06-07T00:00:01.000Z"
}
Data-Structure created :-
Code: Select all
dcl-ds jsonDoc qualified;
START_TIME varchar(24) inz('');
dcl-ds DATA_EXTRACT;
EXPECTED_END_DATETIME varchar(19) inz('');
STOP_IDLE_FUEL_USED packed(1) inz(0);
DISTANCE_DRIVE packed(4: 1) inz(0);
DRIVE_TIME packed(5: 2) inz(0);
PERFORMANCE_GROUP_ID varchar(7) inz('');
ODOMETER_START packed(7: 2) inz(0);
ENGINE_TIME packed(5: 2) inz(0);
PTO_TIME packed(1) inz(0);
OVER_RPM_COUNT packed(2) inz(0);
STOP_IDLE_TIME packed(1) inz(0);
INTERTRIP_IDLE_TIME packed(1) inz(0);
COAST_OUT_GEAR_TIME packed(1) inz(0);
TOP_GEAR_TIME packed(4: 2) inz(0);
TOTAL_TRIP_COUNT packed(2) inz(0);
CRUISE_CONTROL_TIME packed(5: 2) inz(0);
MOVING_TIME packed(5: 2) inz(0);
OVER_RPM_TIME packed(3: 2) inz(0);
TOTAL_IDLE_FUEL_USED packed(2: 1) inz(0);
OVER_RPM_MAX_VALUE packed(4) inz(0);
OVER_SPEED_COUNT packed(1) inz(0);
MOVING_FUEL_USED packed(3: 1) inz(0);
EXCESSIVE_RPM_TIME packed(1) inz(0);
EXCESSIVE_OVERSPEED_TIME packed(1) inz(0);
STOP_IDLE_COUNT packed(1) inz(0);
TOTAL_IDLE_TIME packed(3: 1) inz(0);
OVER_SPEED_TIME packed(1) inz(0);
TOTAL_FUEL_USED packed(3: 1) inz(0);
OVER_RPM_MAX_DURATION packed(3: 2) inz(0);
EXCESSIVE_RPM_COUNT packed(1) inz(0);
GEAR_DATA_SOURCE varchar(5) inz('');
PTO_FUEL_USED packed(1) inz(0);
ENGINE_READINGS_COUNT packed(5) inz(0);
num_SPEED_RPM_MATRIX int(10) inz(0);
SPEED_RPM_MATRIX varchar(5) dim(25);
AVG_ENGINE_LOAD packed(4: 2) inz(0);
STOP_IDLE_WARNING_COUNT packed(1) inz(0);
SHORT_IDLE_FUEL_USED packed(2: 1) inz(0);
OVER_SPEED_MAX_DURATION packed(1) inz(0);
SHORT_IDLE_COUNT packed(2) inz(0);
EXCESSIVE_OVERSPEED_COUNT packed(1) inz(0);
SHORT_IDLE_TIME packed(3: 1) inz(0);
end-ds;
END_TIME varchar(24) inz('');
end-ds;
Data-into used below:-
Code: Select all
data-into jsonDoc %DATA(jsonstring
: 'doc=string case=convert countprefix=num_')
%PARSER( 'YAJLINTO'
: '{ "document_name": "jsonDoc", +
"number_prefix": "YAJL_" }');
Message . . . . : The information supplied by the parser for the DATA-INTO
operation was in error. Reason code 6.
Cause . . . . . : While parsing an document for an RPG procedure, the
information supplied by the parser was in error. The actual document is *N;
*N indicates that the document was not an external file. The parser is
'YAJLINTO'. *N indicates that the parser is a procedure pointer. The reason
code is 6.
6. A call to QrnDiReportValue, QrnDiReportValueCcsid, QrnDiStartStruct, or
QrnDiStartArray was made, but there was no prior call to QrnDiReportName
or QrnDiReportNameCcsid. Calling QrnDiReportValue, QrnDiReportValueCcsid,
QrnDiStartStruct, or QrnDiStartArray without a prior call to
QrnDiReportName or QrnDiReportNameCcsid is only valid at the beginning of the parse
What am i doing wrong? i can't understand the error? pls advise