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

Re: [Ftpapi] The type and attributes of the parameter do not match those of the prototype.



You need to specify formResp as Varying(4).  The proto calls for a 16M varchar which has a 4 byte length.  Varsize allows you to specify a shorter length - but you still need to match the 4 byte length.

The same thing would apply to the input form data parm - except that that is a CONST value so the compiler takes care of it.  However, I would suggest you might want to also define it the same way.


Jon Paris

On Jun 21, 2021, at 12:21 PM, Mark Hall <mch@xxxxxxxx> wrote:

The compile error points to the line with the field formResp and the example 4 comments imply that *omit is valid.
 
 
From: <ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx> on behalf of Michael Mayer-Oakes <mmayer-oakes@xxxxxxxxxxx>
Reply to: FTPAPI/HTTPAPI mailing list <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
Date: Monday, 21 June 2021 at 17:17
To: 'FTPAPI/HTTPAPI mailing list' <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [Ftpapi] The type and attributes of the parameter do not match those of the prototype.
 
One of the fields you are using in your call do not match the prototype, maybe the prototype doesn’t allow *OMIT. The prototype is in a copybook.
 
Michael Mayer-Oakes
Data Scientist
500 Crocker Drive. Vacaville, CA. 95688
Phone: 707-452-2868 | www.mariani.com
 
<image001.jpg>
 
Celebrating over 100 years of being your Global Supplier of Dried Fruits and Snacks.
 
Please consider the environment before printing this email.
 
 
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx <ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx> On Behalf Of Mark Hall
Sent: Monday, June 21, 2021 9:10 AM
To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Subject: [Ftpapi] The type and attributes of the parameter do not match those of the prototype.
 
Hi
 
I made a simple change to the Example4 to connect to a different URL.
Worked perfectly if I set the ‘File to receive’ but if I change this to *OMIT and set a string to receive as bellow I get the following compiler error
 
*RNF7535 30      1 The type and attributes of the parameter do not match those
                    of the prototype.       
 
Any help would be great  
 
Thanks in advance
 
Mark Hall                                
 
D formData        s          32767a   varying      
D formResp        s          32767a   varying      
 
formData = 'ilsno' + http_urlEncode('000')          
         + '&cid=' + http_urlEncode('BAT001');      
 
http_setOption( 'content-type'                        
              : 'application/x-www-form-urlencoded' );
 
rc = http_req( 'POST'                                             
             : 'http://docstore.systems/office/dataconnectors/' + 
               '/AS400ValidateILSNo.asp'                          
             : *omit                      // File to receive      
             : formResp                   // String to receive    
             : *omit                      // File to send         
             : formData );                // String to send       
-- 
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi

-- 
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi