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

RE: Longer Character Parameter



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 [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:

“Invalid 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’ll send more details.

 

Thank you

 

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