This confuses me.
I am using the example in JSONREAD2,rpgle.txt, with the list_t fields 
changed and QSYSPRT deleted.  The qualified data structure Result has a 
subfield called "success."  It is not in the JSON qualified template 
data structure named list_t.  I do not see a "success" node?  But then, 
I am not completely sure what a node is.  If I understand correctly the 
node is blank and the elements are name, life, term, and party?
   The JSON file looks like this:
   [
   {"name":"George Washington", "life":"1732-1799", "term":"1789-04-30
   to 1797-03-04", "party":"No Party"},
   {"name":"John Adams", "life":"1735-1826", "term":"1797-03-04 to
   1801-03-04", "party":"Federalist"},
   {"name":"Thomas Jefferson", "life":"1743-1826", "term":"1801-03-04
   to 1809-03-04", "party":"Democratic-Republican"},
   {"name":"James Madison", "life":"1751-1836", "term":"1809-03-04 to
   1817-03-04", "party":"Democratic-Republican"},
   {"name":"James Monroe", "life":"1758-1831", "term":"1817-03-04 to
   1825-03-04", "party":"Democratic-Republican"},
   {"name":"John Quincy Adams", "life":"1767-1848", "term":"1825-03-04
   to 1829-03-04", "party":"Democratic-Republican"},
   {"name":"Andrew Jackson", "life":"1767-1845", "term":"1829-03-04 to
   1837-03-04", "party":"Democratic"},
   {"name":"Martin Van Buren", "life":"1782-1862", "term":"1837-03-04
   to 1841-04-04", "party":"Democratic"},
   {"name":"William Henry Harrison", "life":"1773-1841",
   "term":"1841-03-04 to 1841-04-04", "party":"Whig"},
   {"name":"John Tyler", "life":"1790-1862", "term":"1841-04-04 to
   1845-03-04", "party":"Whig"},
   {"name":"James K. Polk", "life":"1795-1849", "term":"1845-03-04 to
   1849-03-04", "party":"Democratic"},
   {"name":"Zachary Taylor", "life":"1784-1850", "term":"1849-03-04 to
   1850-07-09", "party":"Whig"},
   {"name":"Millard Fillmore", "life":"1800-1874", "term":"1850-07-09
   to 1853-03-04", "party":"Whig"},
   {"name":"Franklin Pierce", "life":"1804-1869", "term":"1853-03-04 to
   1857-03-04", "party":"Democratic"},
   {"name":"James Buchanan", "life":"1791-1868", "term":"1857-03-04 to
   1861-03-04", "party":"Democratic"},
   {"name":"Abraham Lincoln", "life":"1809-1865", "term":"1861-03-04 to
   1865-04-15", "party":"Republican"},
   {"name":"Andrew Johnson", "life":"1808-1875", "term":"1865-04-15 to
   1869-03-04", "party":"Democratic"},
   {"name":"Ulysses S. Grant", "life":"1822-1885", "term":"1869-03-04
   to 1877-03-04", "party":"Republican"},
   {"name":"Rutherford B. Hayes", "life":"1822-1893",
   "term":"1877-03-04 to 1881-03-04", "party":"Republican"},
   {"name":"James A. Garfield", "life":"1831-1881", "term":"1881-03-04
   to 1881-09-19", "party":"Republican"},
   {"name":"Chester A. Arthur", "life":"1829-1886", "term":"1881-09-19
   to 1885-03-04", "party":"Republican"},
   {"name":"Grover Cleveland", "life":"1837-1908", "term":"1885-03-04
   to 1889-03-04", "party":"Democratic"},
   {"name":"Benjamin Harrison", "life":"1833-1901", "term":"1889-03-04
   to 1893-03-04", "party":"Republican"},
   {"name":"Grover Cleveland", "life":"1837-1908", "term":"1893-03-04
   to 1897-03-04", "party":"Democratic"},
   {"name":"William McKinley", "life":"1843-1901", "term":"1897-03-04
   to 1901-09-14", "party":"Republican"},
   {"name":"Theodore Roosevelt", "life":"1858-1919", "term":"1901-09-14
   to 1909-03-04", "party":"Republican"},
   {"name":"William Howard Taft", "life":"1857-1930",
   "term":"1909-03-04 to 1913-03-04", "party":"Republican"},
   {"name":"Woodrow Wilson", "life":"1856-1924", "term":"1913-03-04 to
   1921-03-04", "party":"Democratic"},
   {"name":"Warren G. Harding", "life":"1865-1923", "term":"1921-03-04
   to 1923-08-02", "party":"Republican"},
   {"name":"Calvin Coolidge", "life":"1872-1933", "term":"1923-08-02 to
   1929-03-04", "party":"Republican"},
   {"name":"Herbert Hoover", "life":"1874-1964", "term":"1929-03-04 to
   1933-03-04", "party":"Republican"},
   {"name":"Franklin D. Roosevelt", "life":"1882-1945",
   "term":"1933-03-04 to 1945-04-12", "party":"Democratic"},
   {"name":"Harry S. Truman", "life":"1884-1972", "term":"1945-04-12 to
   1953-01-20", "party":"Democratic"},
   {"name":"Dwight D. Eisenhower", "life":"1890-1969",
   "term":"1953-01-20 to 1961-01-20", "party":"Republican"},
   {"name":"John F. Kennedy", "life":"1917-1963", "term":"1961-01-20 to
   1963-11-22", "party":"Democratic"},
   {"name":"Lyndon B. Johnson", "life":"1908-1973", "term":"1963-11-22
   to 1969-01-20", "party":"Democratic"},
   {"name":"Richard Nixon", "life":"1913-1994", "term":"1969-01-20 to
   1974-08-09", "party":"Republican"},
   {"name":"Gerald Ford", "life":"1913-2006", "term":"1974-08-09 to
   1977-01-20", "party":"Republican"},
   {"name":"Jimmy Carter", "life":"1924-2100", "term":"1977-01-20 to
   1981-01-20", "party":"Democratic"},
   {"name":"Ronald Reagan", "life":"1911-2004", "term":"1981-01-20 to
   1989-01-20", "party":"Republican"},
   {"name":"George H. W. Bush", "life":"1924-2100", "term":"1989-01-20
   to 1993-01-20", "party":"Republican"},
   {"name":"Bill Clinton", "life":"1946-2100", "term":"1993-01-20 to
   2001-01-20", "party":"Democratic"},
   {"name":"George W. Bush", "life":"1946-2100", "term":"2001-01-20 to
   2009-01-20", "party":"Republican"},
   {"name":"Barack Obama", "life":"1961-2100", "term":"2009-01-20 to
   2017-01-20", "party":"Democratic"}
   ]
On 9/5/2017 11:29 PM, Scott Klement wrote:
Booth,
I don't understand.  You say you're getting a lexical error -- but 
then you also say that yajl_object_find() is failing to find the 
"success" node.
1) If you're getting a lexical error, then docNode should be *null, 
and errMsg = 'The Lexical Error Message'.  Your code doesn't actually 
call yajl_object_find when errMsg isn't blank.
2) Do you understand that the 2nd parameter in yajl_object_find() is 
the name of the JSON element you are trying to retrieve?  You are 
asking for an element named 'success' inside your document. So your 
document would look like this:
{
  "success": true,
  .. other stuff ...
}
Are you sure it has a "success" element in it?  The examples you 
posted earlier did not.
You didn't answer my questions about the SQL LOB and SUBSTR, either.
-SK
As an Amazon Associate we earn from qualifying purchases.