V
Ven
Hi,
I am reading a kind of below mentioned raw data into my C++ program and
writing it out but I want this to be converted into EBCDIC format, how
can I accomplish this ?
Right now I am using the following code
ifstream Source("source_file");
ofstream Dest("dest_file");
Dest << Source.rdbuf();
The above code just reads the below mentioned input data and writes it
out as it is but I want this to be converted into EBCDIC format(sample
data shown below) . Is there any EBCDIC conversions in C++.
Input data:
{00 00 00 00 00 00 00 01 00 00 % 0f 00 00 00 07 00 00 00 00 05 3 7 u A
P ( f6 C ] a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 01 A O 3 3 C \ 80 f4 00 00 7 u 00 00 00 00 C
] a0 00 00 00 00 00}{00 00 00 00 00 00 00 01 00 00 % 0f 00 00 00 07 00
00 00 00 05 5 7 u A S \ ) C a 80 00 00 00 00 00 00 00 00 00 00 00 00 00
00
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
so...on
Expecting output (in EBCDIC) :
^@^@^@^@^@^@^@^A^@^@%^O^@^@^@^G^@^@^@^@^E27uAP(öC]|
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^AAO33C\~@ô^@^@7u^@^@^@^@C]|
^@^@^@^@^@^@^@^@^@^@^@^@^A^@^@%^O^@^@^@^G^@^@^@^@^E37uAP(öC]|
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^AAO33C\~@ô^@^@7u^@^@^@^@C]|
^@^@^@^@^@^@^@^@^@^@^@^@^A^@^@%^O^@^@^@^G^@^@^@^@^E47uAS\)Ca~@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^AAPzáC^!¥^@^@7u^@^@^@^@Ca~@^@^@^@^@^@^@^@^@^@^@-------------------------------------------------
so...on
Any help would be greatly appreciated.
Thanks,
Ven.
I am reading a kind of below mentioned raw data into my C++ program and
writing it out but I want this to be converted into EBCDIC format, how
can I accomplish this ?
Right now I am using the following code
ifstream Source("source_file");
ofstream Dest("dest_file");
Dest << Source.rdbuf();
The above code just reads the below mentioned input data and writes it
out as it is but I want this to be converted into EBCDIC format(sample
data shown below) . Is there any EBCDIC conversions in C++.
Input data:
{00 00 00 00 00 00 00 01 00 00 % 0f 00 00 00 07 00 00 00 00 05 3 7 u A
P ( f6 C ] a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 01 A O 3 3 C \ 80 f4 00 00 7 u 00 00 00 00 C
] a0 00 00 00 00 00}{00 00 00 00 00 00 00 01 00 00 % 0f 00 00 00 07 00
00 00 00 05 5 7 u A S \ ) C a 80 00 00 00 00 00 00 00 00 00 00 00 00 00
00
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
so...on
Expecting output (in EBCDIC) :
^@^@^@^@^@^@^@^A^@^@%^O^@^@^@^G^@^@^@^@^E27uAP(öC]|
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^AAO33C\~@ô^@^@7u^@^@^@^@C]|
^@^@^@^@^@^@^@^@^@^@^@^@^A^@^@%^O^@^@^@^G^@^@^@^@^E37uAP(öC]|
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^AAO33C\~@ô^@^@7u^@^@^@^@C]|
^@^@^@^@^@^@^@^@^@^@^@^@^A^@^@%^O^@^@^@^G^@^@^@^@^E47uAS\)Ca~@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^AAPzáC^!¥^@^@7u^@^@^@^@Ca~@^@^@^@^@^@^@^@^@^@^@-------------------------------------------------
so...on
Any help would be greatly appreciated.
Thanks,
Ven.