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

Re: Post to a file, Conversion from ASCII to EBCDIC



   Great...thanks Scott. I've been working on a project that is enabling
   (forcing?) me to do some interesting tasks. This is a good solution to
   part of it. Thanks as always for your contributions and your help.
   - Michael

   On Sat, Aug 14, 2010 at 2:09 AM, Scott Klement
   <[1]sk@xxxxxxxxxxxxxxxx> wrote:

     HTTP is a binary protocol -- it's not purely used for text,
     therefore
     having it do translation would be harmful.  For example, if you
     download
     a video and run it through an ASCII/EBCDIC translation table, that
     video
     is going to be pretty worthless when you're done.
     Same goes for many other types of objects.
     Is there some particular reason you want to translate data that
     you're
     saving to the IFS?   Why wouldn't you just save it to a file, and
     let
     the other application open the file in text mode (O_TEXTDATA on the
     open() API)??   If the data is text, then that's really the right
     thing
     to do.
     And assuming you do that, the OS will automatically do the
     ASCII/EBCDIC
     translation when you read the file.  No need to do it when saving
     it to
     disk.

   Michael Ryan wrote:
   >    I've used HTTPAPI successfully for several projects, and have
   always
   >    used http_url_post_raw, received the data back in a string,
   translated
   >    to EBCDIC, and processed it. I need to save the data to a file
   and
   >    make the file available to another application. So, I could use
   >    http_url_post and save the data to a file on the IFS, but then it
   will
   >    be in ASCII. I would then have to translate the file contents to
   >    EBCDIC. Or, I could use http_url_post_raw, translate to EBCDIC,
   and
   >    write to a file. Or...I could use the best way, which is the one
   I
   >    don't know. :)
   >    What's the best way to accomplish this? Thanks!
   >
   >
   >

     >
     -------------------------------------------------------------------
     -----
     >
     >
     -------------------------------------------------------------------
     ----
     > This is the FTPAPI mailing list.  To unsubscribe, please go to:
     > [2]http://www.scottklement.com/mailman/listinfo/ftpapi
     >
     -------------------------------------------------------------------
     ----
     -------------------------------------------------------------------
     ----
     This is the FTPAPI mailing list.  To unsubscribe, please go to:
     [3]http://www.scottklement.com/mailman/listinfo/ftpapi
     -------------------------------------------------------------------
     ----

References

   1. mailto:sk@xxxxxxxxxxxxxxxx
   2. http://www.scottklement.com/mailman/listinfo/ftpapi
   3. 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
-----------------------------------------------------------------------