Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Error while loading the amounts with sign in DB2 tables

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Error while loading the amounts with sign in DB2 tables
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Mon Apr 22, 2013 2:32 pm    Post subject: Reply to: Error while loading the amounts with sign in DB2 t
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
http://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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Mon Apr 22, 2013 5:09 pm    Post subject: Reply to: Error while loading the amounts with sign in DB2 t
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
No new posts Error during restore rename archanamuthukrishnan All Other Mainframe Topics 2 Fri Oct 14, 2016 3:30 pm
No new posts Error IEC161I 052(009,XXXRS00)-084 wh... amitc23 JCL & VSAM 10 Wed Oct 12, 2016 5:00 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us