× 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.



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.




--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.



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.