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

Re: http_url_post question



Hi Tim,

Do you want to convert the database file to ASCII?  Should it be in any 
particular format?   Or do you want to simply read the raw bytes that make 
up each record and send them, unmodified, to the HTTP server?

If you want them to be converted to ASCII, and transformed into a text 
file, I suggest taking two steps:

    a) Use CPYTOIMPF to convert the PF to a nice IFS stream file, formatted
       in ASCII the way you need it.

    b) Use http_url_post_stmf() to send the stream file to the HTTP server.

On the other hand, if you want to read a PF or LF directly and send the 
raw bytes without any sort of transformation, then I'd recommend using
the http_url_post_raw2() API, and supply your own subprocedures that read 
the file (so you can read the database records with your own RPG code) and 
that save the response.  (not sure what sort of response you expect to 
receive, so I won't try to explain what to do with it...)

-- 
Scott Klement  http://www.scottklement.com

On Wed, 4 Apr 2007, GornallTD@xxxxxxxxxxxxxxxxxxxx wrote:
>
> Can I use http_url_post to post a native OS/400 type file directly from the
> iseries?  I modified one of Scott's example programs to test a post to a
> customers web site, and it all worked well.  The file sent was just hard
> coded within the program.   What's the best way to load up and database
> file and send?  The file will be variable in size and sent on a daily
> basis.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------