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

RE: Question on Posting data and getting a return value.



After looking at what is returned in the IFS file, I'm not getting "Just
a number"...

So the procedure call will be the way I'll go.

Thanks Scott


Gerald Magnuson
Supervisor, System i Adminstration & Development
IBM Certified Specialist, i5 Administration
The Knapheide Manufacturing Company
Quincy, Illinois
(217) 592-5291

-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Scott
Klement
Sent: Friday, November 19, 2010 1:37 PM
To: HTTPAPI and FTPAPI Projects
Subject: Re: Question on Posting data and getting a return value.

Hi Gerald,

I suppose I could add that capability to HTTPAPI.  I don't understand 
why the procedure call wouldn't work for you, though.  Seems like a very

simple solution...

Adding string capability would mean having three new routines:

http_get_string()
http_post_string()
http_post_string2()

They would output their results to a string variable.  But what type of 
variable should they use?  unicode?  alpha?  varying unicode? varying 
alpha?  just a raw pointer?   How big should it be?  16383 would be the 
largest size unicode available prior to IBM i 6.1, and that hardly seems

big enough for most applications.   Or should I use *VARSIZE and OPDESC?

   It's not as easy as it sounds, is it?

should it translate the data to EBCDIC?  Or keep it as-is?  If it 
translates it, how would you tell it which translation table to use?  Or

should it figure it out from the content-type?

Seems to me that the problem with the procedure-based approach is that 
you want HTTPAPI to do the work for you, you don't want to write the 
code yourself.  That being the case, how far, exactly should it go?


On 11/19/2010 12:47 PM, Gerald Magnuson wrote:
>
>     I have a "simple" project that isn't very simple for me...
>
>     I have httpapi going for actual SOAP calls, but I now need
>
>     To build a program for a post to a page (10 fields), and when it
>     submits
>
>     It returns a number...
>
>
>     I look at example2,  and that outputs to a file in the ifs (which
does
>     work...),
>
>     And then I see example5, and that outputs to a procedure. Both of
>     these seem
>
>     like more than I need.
>
>
>     Is there a method that just puts the return value in a variable?
>
>
>     (I'm asked why can't I just pass the big old url with the post
>     variables concatenated  on it)
>
>
>
>
>
>     Gerald Magnuson
>
>     Supervisor, System i Adminstration&  Development
>
>     IBM Certified Specialist, i5 Administration
>
>     The Knapheide Manufacturing Company
>
>     Quincy, Illinois
>
>     (217) 592-5291
>
>
>
>
>
-----------------------------------------------------------------------
> 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
-----------------------------------------------------------------------