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



Hello, Raul.

Here's an article I put together on reading in large data using QtmhRdStin.


http://www.fieldexit.com/forum/display?threadid=142

You'll probably want to do something similar as the data could be varying
in size.

The parts you'll want to know are:

1. Read the CONTENT_LENGTH header to know how big the data will be.
2. Allocate the size from step using a pointer and %alloc
3. Read in the data using QtmhRdStin and save it to a stream file.

The samples in the link use the eRPG SDK for some things, as well as some
of our home grown IFS subprocedures, but it should give you an idea of how
to do it (or, at least one way).

Brad
www.bvstools.com


On Fri, May 29, 2015 at 5:00 PM, Raul A Jager W <raul@xxxxxxxxxx> wrote:

We are planing to wor with a company that will send us data as POST in
json format.
CGIDEV seems to ignore this data. With another company I used
QtmhRdStin, but I wonder if there is an easier way to read it.

I installed YAJL from Scot's site, but it seems that is great to create
json and to parse it, but I did not find how to receive it.

According to this: http://www.w3.org/TR/html-json-forms/ browsers will
be able to send json encode data.

Here is part of the document they send me.

Recurso: Pago (POST / JSON)
Pedido

Nombre Campo Tipo Longitud Descripción
codServicio String 5
tipoTrx Num 2 03 = Pago
usuario String 20
password String 20
nroFactura Num 15
importe String 15,2 Ej.: 10.000 = 000000001000000
moneda String 1 1= Guaraní, 2= Dólar.
medioPago Num 1 1=Efectivo, 2=Cheque
codTransaccion Num 10 Identificador único de la transacción.

{
"usuario": "test",
"password": "*134*",
"nroFactura": "60",
"moneda": "1",
"importe": "335500",
"codTransaccion": "0012929861"
}

-- Este e-mail fue enviado desde el Mail Server del diario ABC Color --
-- Verificado por Anti-Virus Corporativo Symantec --
--
This is the Web Enabling the IBM i (AS/400 and 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 ...

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.