× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Not quite, but yes jsoRecGet() does use OS400 apis to discover the structure of externally defined records and any constraints which might invalidate the data, such as a numeric value not being within a range, invalid date, and such.

Given that, are you still gung-ho about endorsing Mihael Schmidt's apis for generating and parsing JSON formatted streams? Is open-source still the most important thing to you? Will you also pull PowerExt in under RPGUI?

Nathan.
www.relational-data.com



----- Original Message ----
From: Aaron Bartell <aaronbartell@xxxxxxxxx>
To: Web Enabling the AS400 / iSeries <web400@xxxxxxxxxxxx>
Sent: Wed, January 6, 2010 3:41:29 AM
Subject: Re: [WEB400] Code donations for RPGUI initiative

I am guessing the JSON feed carries enough info to know which record
format/DS to parse itself into (i.e. the table name)? And then based on
that you use OS400 API's to learn the structure of a table and accordingly
occupy a pointer with fixed length data and pass that pointer to the
program?

Aaron Bartell
www.SoftwareSavesLives.com

On Tue, Jan 5, 2010 at 5:26 PM, Nathan Andelin <nandelin@xxxxxxxxx> wrote:

From: Aaron Bartell
[Aaron raises his hand] Tell us more please :-)

Okay. Last week I shared an example of an RPG program generating a JSON
formatted output stream to populate a GRID widget. See:

http://www.radile.com/rdweb/temp/petitems.pdf

The GRID source was based on the sample that you posted in your project,
while the RPG source was my own. We already discussed the streamlined
nature of the jsoRecWrt() procedure to generate and output JSON formatted
records for the GRID.

But generating "output" streams is only half of the puzzle. The other half
is parsing, validating, and mapping JSON formatted "input" streams from GUI
clients to internal RPG data structures. I more recently completed that
interface by implementing jsoRecGet(), which maps input streams to records
with just one line of code. And alternatively, jsoFldGet() to retrieve
individual field values specifically by name.

Actually, the service program exports 15 new procedures for working with
JSON formatted I/O - according to the level of control needed.

These procedures complement others in the framework which were
traditionally used for interacting with traditional HTML clients.

Nathan.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.