[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: CCSID issues
Hi Scott,
I think I have used the wrong terminology and confused both yourself and
Mike kreibs.
Given the following example
C Eval rc = http_url_post(%trim(PostURL) +
C %trim(postdata)
C : mypointer
C : %len(PostData)
C : logfile
C : HTTP_TIMEOUT
C : HTTP_USERAGENT)
C
The variable logfile will contain the response from the server. I need
a separate response file each time I perform a post(it might be
overkill, but I'm just trying to be careful).
So after I perform the post, I want to read the contents from logfile
and if there is anything in this file, send a notification to the proper
people. This file is being created with CCSID 819, but I can't seem to
read it correctly. I'll take a look at chapter 5.
Thanks.
-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Scott
Klement
Sent: Monday, March 01, 2010 1:42 PM
To: HTTPAPI and FTPAPI Projects
Subject: Re: CCSID issues
Hi Mike,
The debug log is purely intended to be human-readable. HTTPAPI is
specifically designed that your program doesn't need to check the
contents of this file to detect errors.
If you've found a situation where an error can't be detected
programmatically without reading this debug file, I'd appreciate you
sharing that information with me. I'd consider that to be a bug, and
would like to improve it so that checking the debug log isn't needed.
Check the debug log at your own risk: I may add/remove messages from
that log at any time, and I may choose to rephrase them, as needed to
make the log useful to me. The log is only intended to be read by a
human being, so I can make changes with impunity.
But, having said that, if you really need to read it in a program, then
using the open() API with O_TEXTDATA (and maybe O_CCSID) followed by the
read() API should work just fine.
CH2WRRD is a beginner example from my tutorial. To learn how to use
CCSID support, you'll need to read a little further in the tutorial --
chapter 5. However, be aware that the tutorial is out of date, and
discusses code page support instead of ccsid support. CCSID support is
enabled by using the O_CCSID flag in place of the O_CODEPAGE flag.
On 3/1/2010 9:21 AM, Smith, Mike wrote:
>
> I am working on a project that will have multiple error/log files.
> The idea is that I will be sending orders and because of volume I
will
> create a unique log/error file for each order. So far so good.
After
> I send the order, I need to check the log file to see if there is
an
> error. I'm trying to read the file directly from the IFS using
> program CH2WRRD(from scotts IFS examples). This is where the
problem
> comes in. I'm able to read the file, but its garbage.
>
> The initial log file seems to have a CCSID of 819. I've tried
> changing to 37. It seems to be a CCSID problem, but I'm not sure
what
> to do about it. Ideas?
>
> Thanks
>
> Mike
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
NOTICE: This message, including any attachment, is intended as a confidential and privileged communication. If you have received this message in error, or are not the named recipient(s), please immediately notify the sender and delete this message.
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------