× 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 getting a 500 error "Cannon read script output pipe" when trying to
write out my user space through QtmhWrStout. I am so confused here and
Google isn't helping me (I am sure I am not using the right terminology).

D QtmhWrStout PR extproc('QtmhWrStout')
D DtaVar 32767A options(*varsize) const
D DtaVarLen 10I 0 const
D ErrorCode 8000A options(*varsize)

D QtmhWrStoutPtr PR extproc('QtmhWrStout')
D DtaVar * value
D DtaVarLen 10I 0 const
D ErrorCode 8000A options(*varsize)


P*----------------------------
----------------------
P* Procedure name: Main
P* Purpose:
P* Returns:
P*--------------------------------------------------
P Main B
D Main PI

/free

// Read all of the data sent via STDIN into the user space.
QtmhRdStin( p_UsrSpcData
: MAXSPACE
: len
: Kaboom );

// Do stuff here

WriteResponse('Content-Type: application/xml' + cr);
WriteResponse('Content-Length: ' + %char(%len(p_UsrSpcData)));

QtmhWrStoutPtr(p_UsrSpcData:%len(p_UsrSpcData):ErrCode);

return;

/end-free
P Main E


P*--------------------------------------------------
P* Procedure name: WriteResponse
P* Purpose:
P* Returns:
P*--------------------------------------------------
P WriteResponse B
D WriteResponse PI
D buffer 32767A options(*varsize) const

/free

QtmhWrStout(%trim(buffer):%len(%trim(buffer)):ErrCode);

return;

/end-free
P WriteResponse E


Right now I am just trying to bring in an XML document and write it back
out. Just to make sure my code is working.

What am I doing stupid?

--
Mike Wills
http://mikewills.info
P: (507) 933-0880 | Skype: koldark

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.