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

Re: Post vs Post_raw



 
Yes, you are correct, we do not need the data returned.  Thanks for simplifying the procedure for us.  We reran the changed program and got the same results
DSPLY  recvdoc: saveproc: Not all data was written!                           
in the joblog.
 
FYI, the datalen variable is equal to 0
 
Right now, I'm not sure which side (iSeries or Web) is causing the problem. 
 
-------------- Original message --------------

> Sender: Scott Klement
>
>
> Hi,
>
> I thought you said you didn't need the data that's returned by the server?
> (I think you said that in a previous message... I could be thinking of
> someone else, though)
>
> If you don't need it, why are you saving it into a variable?
>
>
> That's what this code does:
>
> > C* Make sure we don't overflow the string:
> > c eval retlen = (nextpos + datalen) - 1
> > c if retlen > %size(retdata)
> > c eval datalen=datalen-(retlen-%size(retdata))
> > c endif
> >
> > C* If there is nothing to write, return THAT...
> > c if datalen < 1
> > c return 0
> > c endif
> >
> > C* Here we add any data sent to the end of our 'retdata' string:
> > c eval %subst(retdata: nextpos) =
> > c %subst(data:1:datalen)
> > c eval nextpos = nextpos + datalen
>
> It basically concatenates the data to the end of a variable. (You could
> do this much easier with a VARYING field.)
>
> If you really don't need the results, (and you're just copying an old
> routine that I wrote in 1842,) maybe you should try changing it to this:
>
> P Incoming B
> D Incoming PI 10I 0
> D Descriptor 10I 0
> D Data 8192 Options(*VarSize)
> D DataLen 10I 0 Value
> c return datalen
> P Incoming E
>
> This basically just discards any data that HTTPAPI sends it. (Obviously,
> you'll want to remove the code that translates the result to EBCDIC, since
> you no longer have anything to translate.)
> -----------------------------------------------------------------------
> This is t! he FTPAP I mailing list. To unsubsribe from the list send mail
> to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
> -----------------------------------------------------------------------