IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Error while loading the amounts with sign in DB2 tables


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Kunal Surpurkar

New User


Joined: 15 Nov 2012
Posts: 47
Location: India

PostPosted: Mon Apr 22, 2013 2:25 pm
Reply with quote

Dear Team,

I have a requirement wherein, the DB2 tables have to be loaded from the flat files produced from the IMS databases.

The amounts field has PIC as its datatype. There are a few negative amounts as well. In order to load them in a DB2 table, I have used DECIMAL and DECIMAL EXTERNAL data types. But, I am getting the below errors.

112 08:45:27.49 DSNURCON - RECORD (2) WILL BE DISCARDED DUE TO 'IMPOTOT'
CONVERSION ERROR FOR DB2TIVA.IVA_TEST
ERROR CODE '02 - INPUT NUMERIC INVALID'



Would you suggest me the correct DB2 datatype for the amounts fields in PIC, so that they can be loaded successfully in the DB2 table ?

Thanks a lot in advance.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10903
Location: italy

PostPosted: Mon Apr 22, 2013 2:32 pm
Reply with quote

Quote:
Would you suggest me the correct DB2 datatype for the amounts fields in PIC, so that they can be loaded successfully in the DB2 table ?


too bad that You did not care to tell what PIC You are using

and ... it is not DB2 that has to follow Your COBOL datatype rules ...
it is the other way around.

also do not forget to read about cobol db2 data type equivalence
here for example
pic.dhe.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=%2Fcom.ibm.db2z9.doc.apsg%2Fsrc%2Ftpc%2Fdb2z_equivalentcoboldatatypes.htm
Back to top
View user's profile Send private message
Kunal Surpurkar

New User


Joined: 15 Nov 2012
Posts: 47
Location: India

PostPosted: Mon Apr 22, 2013 4:56 pm
Reply with quote

Hi Enrico,

First of all, thanks for the quick reply.

And apologies for not being clear enough.

I am using PIC as :

3 IBASEIM PIC'ZZZZZZZZZ9V99-' INIT(0),
3 IIVASOP PIC'ZZZZZZZZZ9V99-' INIT(0),

The file is writing the negative values.

But when I am loading into the DB2 table, it gives me the error stated above.


Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10903
Location: italy

PostPosted: Mon Apr 22, 2013 5:09 pm
Reply with quote

if You had clicked on the link I suggested, You would have found already the error and how to fix it icon_cool.gif
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Question regarding ISPF tables with T... TSO/ISPF 11
No new posts U0016 error in JCL JCL & VSAM 4
No new posts To join 2 tables and to join 3rd tabl... DB2 8
No new posts python on z/OS error no encoding decl... Testing & Performance 0
No new posts IEW2315E 1369 Link error All Other Mainframe Topics 3
Search our Forums:


Back to Top