0

I am using IBM iSeries .NET datareader to get data from the AS400.

1) What do I need to do in the AS400 side to send double byte chars 2) Will the IBM iSeries preserve double byte chars? All I get is an empty string

Arcadian
  • 4,312
  • 12
  • 64
  • 107

1 Answers1

2

1) Make sure your connection is set to use UTF-8.

2) The IBM i is certainly capable of storing double-byte data, it just depends on how the Physical File (table) was created. You can either execute DSPFD LIBRARY/FILE from a 5250 session and search for DBCS capable - you will see a Yes or No that indicates if the table is capable of storing double-byte characters. Of if you want to use SQL to find out you can query the SYSIBM database:

SELECT * FROM SYSIBM.SQLCOLUMNS WHERE TABLE_SCHEM = 'MYLIB' AND TABLE_NAME = 'MYTABLE'

You'll want to look for the TYPE_NAME column to see the data type. If it's VARGRAPHIC then it is capable of storing double-byte characters.

Benny Hill
  • 6,191
  • 4
  • 39
  • 59
  • SO all I need to do in the .net side is to set the connection to UTF-8? will the datareader show it as a string? – Arcadian Feb 20 '14 at 16:49
  • @magic-c0d3r - I don't know anything about .NET, I'm an IBM i guy :-) But if you want to transfer multi-byte character data between systems the connection should use UTF-8. – Benny Hill Feb 20 '14 at 20:49