[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Longer Character Parameter



Arturo,

A VARYING field (like your xml_Data example) consists of two parts, (1) a length (2) the actual data. However, the WEBFORM_postData() rotuine does not return it in that format. Instead, it just points directly to the data. It does return a length, but it's in a completely separate field.

So you are confusing RPG by pointing a VARYING field at it. It's trying to use part of the data string as the length portion, and that's definitely going to cause problems.

If you really need to read this data yourself (instead of just passing it on to another HTTPAPI routine) then please use a fixed-length variable (rather than VARYING) and restrict it's length using %SUBST.

-SK

On 11/6/2014 8:11 AM, Arturo wrote:
    Thanks guys! Much appreciate your response.


    Your suggestion worked! I'm fairly new to the pointer world, as I
    haven�t really had to use.  I will create my own procedure and not
    modify HTTPAPI. Again, great suggestion!


    Having another pointer issue. I want to get the value from the pointer
    postPtr from the following call: WEBFORM_postData(form :postPtr
    :postDataSize ) but get error RNX0115 when I do the following:


    p_PostData = postPtr;

    wXML = 'Value of uri: ' + xml_Data;


    The definitions are:

         D p_PostData      S               *

         D xml_Data          S               A   Len(500000) Varying

         D
    Based(p_PostData)


    What am I doing wrong, that I am getting the RNX0115 error? When I
    debug, and hit F11 on xml_Data, I see actual data in the field, which
    is why this error is confusing me.


-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------