Hi Folks,
I've searched the forum about this, and although there are lots of mentions of binary data conversions, none appears to capture my specific case.
I am reading a stream of EBCDIC data as VarBinary. I know that at a pre-defined position and length (i.e. REC_IN[11,4]), there is data that would be defined as a binary datatype if I were to split the file using a CFF. I would like to convert this data to ASCII numeric or varchar.
What function(s) can I use to perform this?
Thanks!
Peter
Converting EBCDIC Binary data type to ASCII
Moderators: chulett, rschirm, roy
Hi,
It looks like decimal datatype at CFF ( for : REC_IN[11,4]), ). If it is decimal you can use "DecimalToString" (for Varchar data type).
It looks like decimal datatype at CFF ( for : REC_IN[11,4]), ). If it is decimal you can use "DecimalToString" (for Varchar data type).
I am reading a stream of EBCDIC data as VarBinary. I know that at a pre-defined position and length (i.e. REC_IN[11,4]), there is data that would be defined as a binary datatype if I were to split the file using a CFF. I would like to convert this data to ASCII numeric or varchar.
We seem to be thinking along similar lines. As a matter of fact, I've used the DataTypePicComp function to successfully read packed data, and I was hoping that there would be a similar function for binary data.ArndW wrote:You can use the SDK functions that convert binary COBOL datatypes to do this. Do you know what sort of binary data you have?
I'm not certain specifically which type of binary data I have, although when I read the file using a CFF stage, it comes through correctly. Does that tell us anything about the nature of the binary data?
-
- Charter Member
- Posts: 42
- Joined: Wed Aug 18, 2004 2:49 pm