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

Re: writing CLOB to IFS file - CCSID issue



Hi Kara,

I don't understand how the data is getting to a PC?   Are you running 
RPG code (like the sample you provided) and then viewing that file from 
a PC?   Or are you using ODBC or similar from a PC program?

For that matter, how are you viewing the data on i?  Are you outputting 
to a file (as shown) and then reading that file somehow from RPG?  If 
so, are you reading it in binary mode, or...?


Kara Burkhalter wrote:
>    Hi,
>    I am using HTTPAPI to create a temporary filename in the IFS to write
>    a CLOB (which is just html code) to it so it can be opened from the
>    green screen to view.  I have successfully created the ifs and wrote
>    the clob to and can view the html code doing wrklnk...., but when I
>    open on the PC I get a bunch of weird characters.  I know this is a
>    CCSID issue (the Clob is defined as 37 and the file is created with
>    CCSID 37) but I'm not sure what I need to do to get it to be readable
>    when opened on PC as a HTML doc.
>          ***************************************************
>          * Ask HTTPAPI for a temporary filename in the IFS.
>          ****************************************************
>         C                   eval      IfsFile = http_tempfile()
>         C                   eval      ifsFile = %trim(ifsFile) + '.html'
>         C                   eval      Doc      = *ALLx'00'
>         C                   eval      Doc_FO   = SQFOVR
>         C                   eval      Doc_Name = IfsFile
>         c                   eval      Doc_NL   = %len(IfsFile)
>         C/EXEC SQL   Select text
>         C+             Into :Doc
>         C+             From conrslt2
>         C+            Where conseq = :conseq
>         C+             with NC
>         C/END-EXEC
>     
>     
>    Thanks,
>    Kara
> 
>    P Please consider the environment before printing this e-mail
> 
> 
> 
> 
>    This message may contain confidential or proprietary information and
>    is intended only for the person(s) to whom it is addressed. Any use,
>    distribution, copying or disclosure of confidential information by any
>    other person is strictly prohibited. If you have received this message
>    in error, please notify the e-mail sender immediately, and delete the
>    original message without making a copy. For information on the UW
>    Foundation's privacy policy, please visit:
> 
>    [1]UW Foundation Privacy Policy
> 
> References
> 
>    1. http://www.uwfoundation.wisc.edu/home/privacypolicy/privacypolicy.aspx#email
> 
> 
> 
> ------------------------------------------------------------------------
> 
> -----------------------------------------------------------------------
> 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
-----------------------------------------------------------------------