Documentation Issues - Example ABL code that fails to compil

Posted by jmls on 25-Aug-2013 02:07

Twice today I've copied and pasted code from the documentation, and twice I've gotten syntax errors

#1

http://documentation.progress.com/output/OpenEdge113/oe113html/ABL/wwhelp/wwhimpl/common/html/wwhelp.htm#href=Working%20with%20JSON/06dvjsnch02pds.163.3.html&single=true

using Progress.Json.ObjectModel.*.

DEFINE VARIABLE myLongchar AS LONGCHAR NO-UNDO.

DEFINE VARIABLE myParser   AS ObjectModelParser NO-UNDO.

DEFINE VARIABLE Request    AS JsonConstruct NO-UNDO.

DEFINE VARIABLE settings   AS JsonObject NO-UNDO.

myParser = NEW ObjectModelParser(myLongchar).

settings = CAST(myParser:Parse(), JsonObject).

Request = myParser:Parse(&WEBSTREAM).

gives the error

"Mismatched number of parameters supplied to 'ObjectModelParser', expecting 0 but 1 were specified (2680)

#2

from the help guide within PDS

def temp-table ttorder like order.

def temp-table ttorderline like order-line.

DEFINE VARIABLE hDset AS HANDLE NO-UNDO.

DEFINE VARIABLE hRel  AS HANDLE NO-UNDO.

CREATE DATASET hDset.

hDset:SET-BUFFERS(BUFFER ttOrder:HANDLE, BUFFER ttOrderLine:HANDLE).

hRel = hDset:ADD-RELATION(BUFFER ttOrder:HANDLE, BUFFER ttOrderLine:HANDLE, 

                          "ttOrder.OrderNum,ttOrderLine.OrderNum").

gives the error shown in the attached screenshot.

This is simply ridiculous. I can perhaps understand code examples not being best practice (although they should be) , but I cannot understand code that simply does not work or even compile.

Inexcusable.

Does anyone have any decent documentation on the progress json parser ?

Julian

All Replies

Posted by Bill Wood on 20-Oct-2013 10:15

Good points all around -- code samples should indeed work reliably.    I will pass this thread on to the Progress documentation team, who do indeed care a lot about errors like this.  

This thread is closed