0

I need to convert data from ASCII to EBCDIC in an Informatica Transformation. I have attempted to use CONVERT_BASE in an expression using string datatypes for the currency data, but received a non-fatal error.

I've also googled a fair amount and have been unable to find a solution.

Has anyone encountered and been successful in a situation like this?

Gautam Rai
  • 2,445
  • 2
  • 21
  • 31
  • can you show your fatal errors. – Gautam Rai May 24 '18 at 12:15
  • i re-created the transformation and did an evaluate and here's that error message: <> <> <> [CONVERT_BASE]: Process row failed for function [Convert_Base]: Invalid number passed for conversion.. ... u:CONVERT_BASE(u:u:'v_AMOUNT',i:i:10,i:i:2) ... >>>>TO_INTEGER(CONVERT_BASE('v_AMOUNT',10,2))<<<<. – Agileskunk May 24 '18 at 12:26
  • I managed to get it to work - straight to binary...and, Given `EBCDIC`has multitudes of variation, I am unable, at this time, to find a solution that holistically suits. So, basic problem solved. ...and a customized script appears in order. Thanks. – Agileskunk May 24 '18 at 16:35

1 Answers1

0

In Complex Data Exchange, you do not require a transformer to convert ASCII to EBCDIC format.

To change the encoding from ASCII to EBCDIC format, do the following:

LaunchContentMaster Studio Go toProject > Properties > Encoding Change the output encoding toEBCDIC-37 and the byte order toBigEndian.

Just in case if you need to transfer flat file from mainframe (EBCDIC) to Linux (ASCII) and preserve packed decimal fields / COMP-3 (i.e. do not unpack COMP-3); You can use a combination of PWX for VSAM/Sequential on the mainframe source, and PWX for Flat Files on the Linux machine for the target.

Create appropriate datamaps for the source, and for the target. On the source side, use datamap functions to create a new field for each of the packed fields, as an unpacked value. In the mapping, bring in the unpacked value ports, not the packed ones, as numerics. In the datamap for the target, create only the packed fields. In the mapping, map the (unpacked) numerics to packed numerics fields

PWX should handle the conversions for you.

Note that this includes operations on packed fields, so some signs may get converted from F to C.