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

RE: returning more than 8192 bytes



So then Response is a Global variable,
So you can access it between procedures?


Gerald Magnuson | Senior System I Admin
The Knapheide Manufacturing Company | 1848 Westphalia Strasse | P.O. Box 7140 | Quincy | IL | 62305-7140
Phone: 1-217-592-5291 | www.knapheide.com
-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Scott Mildenberger
Sent: Tuesday, October 28, 2014 4:58 PM
To: HTTPAPI and FTPAPI Projects
Subject: RE: returning more than 8192 bytes

Yes, I just concat the output together in the process procedure.  

Right after the api call if there was no error I call another procedure that actually does what I need to do with the data.

Scott


-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Gerald Magnuson
Sent: Tuesday, October 28, 2014 3:51 PM
To: HTTPAPI and FTPAPI Projects
Subject: RE: returning more than 8192 bytes

Oops, sorry...
Yes, when I return length it does run multiple times...

Are you just using the process procedure to concat your output back together?




Gerald Magnuson | Senior System I Admin
The Knapheide Manufacturing Company | 1848 Westphalia Strasse | P.O. Box 7140 | Quincy | IL | 62305-7140
Phone: 1-217-592-5291 | www.knapheide.com

-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Scott Mildenberger
Sent: Tuesday, October 28, 2014 4:24 PM
To: HTTPAPI and FTPAPI Projects
Subject: RE: returning more than 8192 bytes

Not sure, I just ran one of my programs in debug and mine is getting called several times.  I notice my Process procedure returns peLength, is yours?  Don't know if it needs to though. Here are my call and Process procedure completely.  I can't see anything else in my program that would affect it.

       Response = '';                                                
       rc = http_url_get_raw(Url : 1 : %paddr(ProcessLogs) : 60);    


p ProcessLogs     b                                      
D ProcessLogs     PI            10I 0                    
D   peFD                        10I 0 value              
D   peData                   65535A   options(*varsize)  
D   peLength                    10I 0 value              
                                                         
                                                         
 /free                                                   
  if peLength > 0;                                       
    HTTP_xlate(peLength : peData : TO_EBCDIC);           
                                                         
    Response += %subst(peData : 1 : peLength);           
  ENDIF;                                                 
                                                         
  return peLength;                                       
                                                         
 /end-free                                               
                                                         
p ProcessLogs     e                                      


Scott


-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Gerald Magnuson
Sent: Tuesday, October 28, 2014 3:08 PM
To: HTTPAPI and FTPAPI Projects
Subject: RE: returning more than 8192 bytes

I must be missing something else,
Because my Process routine is only getting ran once,


Gerald Magnuson | Senior System I Admin
The Knapheide Manufacturing Company | 1848 Westphalia Strasse | P.O. Box 7140 | Quincy | IL | 62305-7140
Phone: 1-217-592-5291 | www.knapheide.com -----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Scott Mildenberger
Sent: Tuesday, October 28, 2014 3:10 PM
To: HTTPAPI and FTPAPI Projects
Subject: RE: returning more than 8192 bytes

Char varying, I have it defined:

d Response        s        9999999    varying    


Scott


-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Gerald Magnuson
Sent: Tuesday, October 28, 2014 2:06 PM
To: HTTPAPI and FTPAPI Projects
Subject: RE: returning more than 8192 bytes

Scott,
Is Response a char field, or a pointer?
I am having trouble getting that line to compile...



-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Scott Mildenberger
Sent: Tuesday, October 28, 2014 2:01 PM
To: HTTPAPI and FTPAPI Projects
Subject: RE: returning more than 8192 bytes

Your Process function will be called repeatedly until you get all the data, I also changed the Process procedure parm peData to be 65535.
Here is the code in my procedure that just adds all the data together.

  if peLength > 0;                                 
    HTTP_xlate(peLength : peData : TO_EBCDIC);     
                                                   
    Response += %subst(peData : 1 : peLength);     // NOTICE the +=
  ENDIF;                                           

After the url_get_raw is completed you have a procedure to actually process the entire response.

Scott

-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Gerald Magnuson
Sent: Tuesday, October 28, 2014 12:09 PM
To: HTTPAPI and FTPAPI Projects (ftpapi@xxxxxxxxxxxxxxxxxxxxxx)
Subject: returning more than 8192 bytes

I am attempting to change from http_url_get to http_url_get_raw...

I have:
rc = http_url_get_raw(URL:
                      rtnFD:
                      %paddr(Process) :
                      timeout) ;

<<top of Process procedure...>>
// convert to EBCDIC
  http_xlatep (Len
              : %addr(Data)
              : TO_EBCDIC)     ;
 docNode =
    yajl_buf_load_tree( %addr(Data) : %len(%trim(Data)) : errMsg);
   if errMsg <> '';

my LEN var is 8192, and my input Data ends there...

is there some looping I need to do to get the rest of my data?



-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
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
-----------------------------------------------------------------------

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
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
-----------------------------------------------------------------------

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
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
-----------------------------------------------------------------------

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
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
-----------------------------------------------------------------------