cancel
Showing results for 
Search instead for 
Did you mean: 

Convert Packed (DB2) to String with PI

Former Member
0 Kudos

Hi Experts, i'm having a serious problem.

I have an interface between a DB2 system with a an ECC, but i need to read the data with PI.

The DB2 has a Packed Number field, and i need to read it in String format, i do not know if i have to convert it or there any "standard" function or data type to do it.

Thank you very much,

Sebastiá

Accepted Solutions (0)

Answers (1)

Answers (1)

VijayKonam
Active Contributor
0 Kudos

Do you mean prefix with zeros by packed means? By default and data can be represented as string in PI. You just have to define the data type element with string type.

VJ

Former Member
0 Kudos

Hi, thanks for your answer, i did it, but i have strange characters, like square or space.

Here's an example: " "

When i converted it with JAVA results: "0000123" (For example)

I made an haxadecimal convertion with JAVA and it works but it takes a long time to do it, so i want to "convert" the data with any "standard" convertion.

Thanks,

Sebastiá

Former Member
0 Kudos

Have a look at this : http://jrecord.cvs.sourceforge.net/viewvc/jrecord/jrecord/src/net/sf/JRecord/Common/Conversion.java?...

It may help you find the most suitable code, as I'm not sure JAVA supports such type in a native way

Rgds

Chris