convert Binary data to ascii format
Moderators: chulett, rschirm, roy
convert Binary data to ascii format
Hi,
Could you please advice how to handle Binary and packed decimal data in Data Stage ?
I am trying to convert the Binary data into a readable format.
If this has been answered earlier please point me to correct direction.
With regards
M
Could you please advice how to handle Binary and packed decimal data in Data Stage ?
I am trying to convert the Binary data into a readable format.
If this has been answered earlier please point me to correct direction.
With regards
M
There are various forms of "binary" and unless you know what type it is you won't be able to convert it. Is your source EBCDIC that you need to convert? Or is it packed decimal data?
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
There are numerous ways to do this. If you also have packed decimal data then the cmoplex flat file stage is best, otherwise just use a sequential file stage and specify that the data is EBCDIC in the format tab.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
Hi Arndw,
Thank you, I have been able to use Seqential file stage to read the file that is EBCDIC (binary and packed decimals) in the Ascii format, but there are some transformation rules to split the binary data into two fields
e.g
Binary Data when viewed through Data Stage
{20 08 01 02 00 $ 00}
I have get the 8 bytes and put the ascii value into another column.
Is there a way to convert the EBCDIC data into Char value
Please advice.
With Regards
M
Thank you, I have been able to use Seqential file stage to read the file that is EBCDIC (binary and packed decimals) in the Ascii format, but there are some transformation rules to split the binary data into two fields
e.g
Binary Data when viewed through Data Stage
{20 08 01 02 00 $ 00}
I have get the 8 bytes and put the ascii value into another column.
Is there a way to convert the EBCDIC data into Char value
Please advice.
With Regards
M
While BASIC transform stages have ASCII and EBCDIC functions the better way to solve this splitting would be to edit your metadata or COBOL definitions to split the data before reading it, this would be a COBOL "REDEFINES".
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The main issue is we DONOT have any Cobol Copy Books, We have been given a spreadsheet with the fields with start positions and number of bytes, also there are lots of Arrays, redfinitions and Occour Depening on clauses that are not upto the Cobol Standards.
Also we have one single field that holds the Record Type and other info in Binary Format and the files are of Variable length format. And also the files donot have row or record delimiters and also donot have final delimiter.
E.g.
{20 08 01 02 00 $ 00}
The above binary field consists of Date (YYYYMMDD), Seqyuence Number and the Record Type. A single file can have as many different Record types.
I have taken an example file and used an external code to add row delimiters, then used Seq Stage to read teh file and then used BASIC Transformer to find the above details.
Could you'll please advice whether to go with CFF or Seq Stage. ?
With Regards
M
Also we have one single field that holds the Record Type and other info in Binary Format and the files are of Variable length format. And also the files donot have row or record delimiters and also donot have final delimiter.
E.g.
{20 08 01 02 00 $ 00}
The above binary field consists of Date (YYYYMMDD), Seqyuence Number and the Record Type. A single file can have as many different Record types.
I have taken an example file and used an external code to add row delimiters, then used Seq Stage to read teh file and then used BASIC Transformer to find the above details.
Could you'll please advice whether to go with CFF or Seq Stage. ?
With Regards
M
With Regards
M
M