|
You need to pass the base variable not the pointer variable. D szCGIData S 65535A D pCgiData S * Eval pCgiData = %alloc(2 megabytes) Then call CgiParse with the szCGIData field as the parameter NOT the pCgiData variable. Also, CGI Parse "only" works with method="GET". To get it to work with Method="POST" you have to read the data using QtmnRdStin and them assign that data to the QUERY_STRING environment variable. Then use CGI Parse to get the data. -Bob Cozzi -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Stefan Tageson Sent: Friday, February 25, 2005 9:27 AM To: RPG programming on the AS400 / iSeries Subject: RPG CGI with large amount of data Hello, I'm trying to retrieve a large piece of data (approx 2mb) in a rpg cgi program by using getenv(content_length) alloc(content_length) D cgiparse PR extproc('QzhbCgiParse') D cmd 20a (in this case "-Post") D fmt 8a (in this case "CGI0100") D target 32767a based(mp) (in this case a pointer from alloc(Content_Length)) D targetlen 10I 0 D responselen 10I 0 D Errorcode 16a I'm receiving MCH6902 The requested heap space operation is invalid, and C2M1212 The pointer parameter passed to free or realloc is not valid. If I try using qtmhrdstin api instead of qzhbcgiparse all data is received but the format of the data makes me feel unhappy. Am I doing something very wrong? Currently running on OS/400 V5R1 and the original HTTP server. Best regards, Stefan Tageson Informatikk Sverige AB Propellergatan 1, SE-211 19 Malmö, Sweden Cell: +46 733 913 813 -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.