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

Re: Longer Character Parameter



   Thanks guys! Much appreciate your response.


   Your suggestion worked! I'm fairly new to the pointer world, as I
   haven�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.


   Thank you!

   Art Duarte
   From: [1]Scott Klement
   Sent: �dnesday��vember�5��14 �:��PM
   To: [2]ftpapi@xxxxxxxxxxxxxxxxxxxxxx
   Scott,
   In V6R1, IBM added %ADDR(myvar:*DATA) so it's no longer needed to add 2
   or 4.  And since V6R1 is required for variables larger than 65535,
   there's really no need to still use this old VARPREF method. (Unless
   you
   still want to support V5R4, which, granted -- I do at this point.)
   As I said to Arturo, it'd be better to NOT modify HTTPAPI, since
   that'll
   make upgrades more difficult.  Since this is just a one-liner
   subprocedure, I would suggest he create his own wrapper for
   http_url_encoder_addvar() if he needs to do this frequently. That way,
   his copy of HTTPAPI will remain compatible with everyone else's, and
   won't break when he upgrades (or require changes with each upgrade),
   etc.
   At least in this case, it's pretty easy to do.
   -SK
   On 11/5/2014 3:36 PM, Scott Mildenberger wrote:
   > You need to also change the value of the constant:
   >
   >       D VARPREF         C                   4   <------Change to 4
   from 2
   >
   > This is because the definition below defines the length prefix to be
   4 when it was 2 previously
   >
   >       D   peValue                       A   Len(500000) Varying(4)
   Value
   >
   > Or if you are on a recent enough version of the system you can change
   the line
   >
   >                                        :%addr(peValue)+VARPREF
   > To
   >                                        :%addr(peValue : *data)
   >
   > And avoid the use of the constant at all.
   >
   > Scott
   >
   >
   > -----Original Message-----
   > From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   [[3]mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Arturo
   > Sent: Wednesday, November 05, 2014 9:34 AM
   > To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
   > Subject: Longer Character Parameter
   >
   >
   > Email Server keeps bouncing this back. Hopefully you have received.
   >
   >
   >
   > Hello,
   >
   >
   >
   > I need your help. I am calling the following procedure, which is
   defined as:
   >
   >       P WEBFORM_addVar...
   >
   >       P                 B                   Export
   >
   >       D                 PI             1N
   >
   >       D  peEncoder                      *   value
   >
   >       D  peVariable                   50A   varying value
   >
   >       D  peValue                   65535A   Varying Value
   >
   >
   >
   >        * Local Defined Variables
   >
   >       D VARPREF         C                   2
   >
   >
   >
   >        /free
   >
   >         return http_url_encoder_addvar( peEncoder
   >
   >                                        :peVariable
   >
   >                                        :%addr(peValue)+VARPREF
   >
   >                                        :%len(peValue));
   >
   >        /end-free
   >
   >       P                 E
   >
   >
   >
   > I want to change peValue to a longer character variable, such as:
   >
   >       D   peValue                       A   Len(500000) Varying(4)
   Value
   >
   >
   >
   > Problem I am facing is that the call to WEBFORM_addVar, to create my
   post http call, is not working.
   >
   > I get the following http error back:
   >
   > �valid ClientName / GUID�Client Name and GUID are part of the
   URI.
   >
   >
   >
   > Here is how I am calling WEBFORM_addVar:
   >
   >         siteName = wSiteName;
   >
   >         GUID = wGUID;
   >
   >         form = webForm_open();
   >
   >         WEBFORM_addVar(form :'ClientName' :siteName );
   >
   >         WEBFORM_addVar(form :'guid' : GUID );
   >
   > Looking at the URI, after ClientName=, it is adding %00%9D, and after
   GUID=, it is adding %00%88.
   >
   >
   >
   > Any ideas why this is happening? I hope I provided enough info, if
   not, let me know and I� send more details.
   >
   >
   >
   > Thank you
   >
   >
   >
   > Art Duarte
   >
   -----------------------------------------------------------------------
   > This is the FTPAPI mailing list.  To unsubscribe, please go to:
   > [4]http://www.scottklement.com/mailman/listinfo/ftpapi
   >
   -----------------------------------------------------------------------
   >
   -----------------------------------------------------------------------
   This is the FTPAPI mailing list.  To unsubscribe, please go to:
   [5]http://www.scottklement.com/mailman/listinfo/ftpapi
   -----------------------------------------------------------------------

References

   1. mailto:sk@xxxxxxxxxxxxxxxx
   2. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
   3. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   4. http://www.scottklement.com/mailman/listinfo/ftpapi
   5. http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------