If you want simple, stick with the Apache server. I've said this a few
times in this thread already and offered examples.

If you're using YAJL, it has a function to write the JSON to stdout.. so
it's actually VERY simple.

1. Create a web instance
2. Change your program to write the JSON to std out
3. Execute the program from a browser to test.

Super simple as it sounds like you have the JSON building already done.

Bradley V. Stone
MAILTOOL Benefit #6 <>: Easily send
group emails with Distribution Lists

On Mon, Aug 27, 2018 at 3:35 PM Booth Martin <booth@xxxxxxxxxxxx> wrote:

You are correct, Scott. I am confused. And still am confused.

My goal is to provide a very simple web service. The example I am
learning with is a DB2 file of 10 to 20 records, each with a state and a
city field. A green screen program maintains the file. The additional,
new piece that I am trying to make work is an Intranet web service that
offers that data, in a JSON format, to anyone who asks for it.

My presumption was that there would be an SQLRPGLE program, that when
asked, would read the DB2 file and provide a .json data stream that a
javascript file could GET and process as the web folks chose, for their

This DB2-to-web page task already works if I write a .json file to the
IFS and deal with it as an IFS HTTP website. So, I know the general
process works. The hang-up for me is the web service piece.

I shall read the slide show presentation one more time.

Your initial premise really is correct; I am confused. By the way, in
case I forget, I really appreciate all the stuff you have offered and
all that I have learned from you. Thank you Scott.

On 8/26/2018 11:03 PM, Scott Klement wrote:

It sounds to me as if you are confusing two different things.

IWS (which uses QWSERVICE as a default userid, and runs under Java,
explaining the reason you're getting these Java errors) does not
require you to write data to STDOUT.

IWS does all of the XML/JSON work for you, and passes you input/output
as parameters.

If you want to read/write your documents yourself using stdin/stdout,
do not use IWS, but instead using a normal Apache server. (i.e. an
HTTP server, NOT a web services server.)

My documents have examples of both ways, and it sounds like you are
confusing the two.

This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives

Please contact support@xxxxxxxxxxxx for any subscription related

Help support by shopping at with our affiliate

This thread ...


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

This mailing list archive is Copyright 1997-2020 by 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].