I'm trying to convert a vsam file to db2 table using load utility. However, one of my variables is pic s9(8)v99. When i try to load it into a column decimal(10,2) an error occurs - 02 invalid input numeric. Can you please help?
Asked
Active
Viewed 460 times
1
-
What is the usage, i.e., COMP-3, DISPLAY, something else... – zarchasmpgmr Mar 01 '17 at 21:03
-
3Full message including any codes. Full JCL and control cards. Values for record failing, especially this field. Probably bad data. – Bill Woodger Mar 02 '17 at 07:52
-
Usage is DISPLAY. – Ana S. Mar 02 '17 at 09:38
-
This is an example of the number in a dump of the file VSAM: 000004909è – Ana S. Mar 02 '17 at 09:40
-
In your LOAD statement, you may need to specify that field as DECIMAL ZONED (signed USAGE DISPLAY), as I see the presence of a sign in the last digit. If that works, please reply and I will create an answer for acceptance. – zarchasmpgmr Mar 02 '17 at 20:02
-
Yes, that was it!! thanks a lot! – Ana S. Mar 07 '17 at 16:19
1 Answers
1
s9(8)v99 represents a signed variable to me. You may have to use char or varchar to store exact value with sign or try to absolute value.

Sailor
- 183
- 5
-
-
Correct . so while converting the sign to decimal(10,2) causing the problem ? – Sailor Mar 01 '17 at 21:18
-
yes, the variable is signed. I've tried char but i need it to make calculations, and display the number and it's incompatible with numeric pictures – Ana S. Mar 02 '17 at 09:38
-
1use NUMERIC(10,2). Else you can do typecasting. By converting s9(8)v99 to string and then to decimal(10,2) – Sailor Mar 02 '17 at 16:13