Question

Hello I'm trying to connect to a Universe DB with ODBC. I have successfully imported some data into access for most of the tables. (I'm using access just to look at the data and get a general idea of everything)

There are a few tables that will not import due to precision errors.

I'm just starting out with this database type so I'm fairly new to all this. Although I do have past AS/400 (DB2) experience back in the day. The dictionary files remind me of that a bit.

Anyways the problem is a with a field with amounts in it. It works fine unless the amount is greater then 999.99 then I get an error about the field being too small. Apparently ODBC is assuming the field is precision of 5 with 2 decimal places. I looked at the dictionary file and as far as I can tell the field is set to 10R with a conversion code of MR2 which seems like it should be adequate.

Where do I set this in Universe so that ODBC knows it is larger then that.

Thanks for any help.

Update::: I was looking at wrong field the output format of the field I need in the dictionary is actually 7R. If that makes any difference.

Était-ce utile?

La solution

Try setting attribute 6 in your dictionary entry to DECIMAL then run HS.UPDATE.FILEINFO at TCL:

>ED DICT MYFILE I.PAY
10 lines long.

----: 6
0006:
----: R DECIMAL
0006: DECIMAL
----: FI

Check out Rocket's ODBC documentation (page 75-76) for how to optionally set custom precision and scale in the dictionary entry for the DECIMAL SQL Data Type.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top