|
Maybe I need to give a brief explanation first:
These fields below are actually fields in audit journal entries(in entry
specific data portion), just to get an idea of what I am saying, see IBM
security reference, Appendix "Layout of journal entries", table for each entry
type. In some of the entry types, information is given about the field length,
field CCSID and Field data. I am trying to figure out if I need to do something
special if CCSID info is given.
>> I am given with the following information:
>> - Field length, Binary(4)
>>- Field CCSID, Binary(5)
>>- Field Data, char(100)
>There's no such data type as BINARY(5). Someone is very confused.
What I understood is : BINARY means the value needs to be interpreted as raw
data. Like say Binary(4), a sequence of 4 bytes, we interpret as integer,
similarly Binary(5) is a sequence of 5 bytes representing a number, in my case,
when printed as hex value the CCSID field is 00 00 00 25 00.
>> The above field data is encoded using CCSID given by Field CCSID. How
do
>> I get corresponding data in normal English form? Any pointers to APIs
>> would be greatly appreciated.
>What do you consider to be "normal" English form? What form is the
data
>in now? (Note that CCSID only specifies a character set, not a
language.)
I'm sorry, maybe I got a bit confused here. I will reframe the question: Right
now when I see the data using printf, it's printed in plain english(for eg:
"CHKUSAGE") even though a separate CCSID is given. So I can use it easily
inside the program, my purpose is solved. But just for the sake of info: the
system gives me a sequence of bytes saying these bytes are in CCSID xxxxx. This
means these bytes represent whatever they do only in the given CCSID. Now if I
transfer these sequence of bytes to another country say from US to UK which
uses different CCSID, the same sequence of bytes would represent something else
in UK than whatever was in US. To get the right information, I will have to
convert these sequence of bytes (US) to corresponding sequence of bytes (UK) so
that the data would mean the same at both ends. Did I understand this right? If
so, is there any API which does this and how do I use it? I have seen
iconv_xxx() set of functions. Are these the ones to be used?
- P.Prasad
> Similarly, I am given with another set of information:
> - Field length, Binary(4)
> - Field CCSID, Binary(5)
> - Field Country or Region ID, char(2)
> - Field Language ID, char(3)
> - Field Data, char(100)
>
> In the above information, Region ID and Language ID are also given,
how
> are these to be used to convert the Field data into a usable form?
Again, you have BINARY(5) which doesn't exist. (It has to be 2, 4 or 8)
Where is the data now? What format is it currently in? Does the
software
that's passing you the above fiedls have a facility for character set
translation, or do you have to do this manually?
If you're talking about info retrieved from an IBM API, please tell us
which API. They're all different, and I'd rather not take a blind guess
at
what youi mean.
> What would happen if I just use the CCSID, length, data portion and
the
> API for the first scenario ignoring the Region ID and Language ID?
CCSID is just a character set. It's a set of letters, numbers and
other
symbols that can be displayed on a screen. It does not tell you which
language the text is in.
---------------------------------
Enjoy this Diwali with Y! India Click here
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.