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

Re: Ftpapi Digest, Vol 118, Issue 9



   I found the issue with Receiver value too small to hold result.   I had
   in the "Incomming" procedure "Data = Data;" to allow an easy place for
   me to debug what was comming in. Somehow that was causing the issue.
   When I removed that I no longer got that halt.

   I do see this in the debug log... is this normal when using _RAW and
   now having the process create the IFS?

   recvdoc(): Receiving 107 bytes.

   T74V00000001              225160829         4788250000028291   0917VI
   000000000000TI4788257519358291
   SetError() #16: errno is currently 0

   SetError() #16: recvdoc: saveproc: Not all data was written!

   http_close(): entered

   I did see on one example of using Post_Raw that the "Incoming"
   Procedure had a return code.

   When I defined a return code I got a comiple time message that the
   interface didn't have a return value.

   Removed it and everything looks like its working except for the above
   error in the log.

   Thanks for your help.

   Dan
     __________________________________________________________________

   From: Dan Dan <qmagic101@xxxxxxxxxxx>
   Sent: Monday, August 29, 2016 10:33 AM
   To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
   Subject: Re: Ftpapi Digest, Vol 118, Issue 9

   I'm looking for a POST option that will write the response to the IFS
   (archive) and also allow me to bring the results into memory. Looks
   like http_url_post_xml would do that for me with one exception in that
   it tries to parse the response for me and not all of my responses will
   be XML. Is there a switch/flag something that would tell this process
   not to parse the response? I received back in the log (SetError() #66:
   XML parse failed at line 1, col 0: syntax error ).

   So move to second option of using _RAW just to get the data back and it
   looks like it work great and returns the data as I hoped.

   Then I get the error "Receiver value too small to hold result.
   " in Module:   HTTPAPIR4 "saveProc". (see below)

   I also tried opening a file and pass the FD instead of "1" as I saw in
   examples but maybe I used wrong options.

   fd = open(IFS: O_WRONLY+O_TRUNC+O_CREAT+O_CCSID: 511: 819);

   Any help using eithe option would be appreciated.

   Thanks,

   Dan

   rc = http_url_post_raw(%Trim(url)
             : %addr(postData) + 2
             : %len(PostData)
             : 1
             : %paddr(Incoming)
             : HTTP_TIMEOUT
             : HTTP_USERAGENT
             : 'Salem05210/SLM');

    P Incoming        B

    D Incoming        PI

    D   descriptor                  10I 0 value

    D   data                      8192A   options(*varsize)

    D   datalen                     10I 0 value



    D TO_ASCII        C                   '1'

    D TO_EBCDIC       C                   '2'



     /free

            rc =  http_xlate( datalen
                            : Data
                            : TO_EBCDIC  );

           data = data;
    /end-free
   P                 E

   Program:   HTTPAPIR4      Library:   LIBHTTP        Module:   HTTPAPIR4


     4709       4708

     4710       4709 c                   eval      rc = saveproc( peFD

     4711       4710 c                                          :
   %addr(wwData)
     4712       4711 c                                          : wwLen )

     4713       4712

     4714       4713 c                   if        HTTP_DEBUG_LEVEL > 1

     4715       4714 c                   callp     http_dmsg('recvdoc():
   saveproc
     4716       4715 c                                %char(rc) + '
   saved')
     4717       4716 c                   endif

     4718       4717 c

     4719       4718 c                   if        rc < wwLen

     4720       4719 c                   callp     SetError(HTTP_RDWERR


   More...
   Debug . . .



   F3=End program   F6=Add/Clear breakpoint   F10=Step   F11=Display
   variable
   F12=Resume       F17=Watch variable   F18=Work with watch   F24=More
   keys
   Receiver value too small to hold result.
         +
     __________________________________________________________________
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------