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: 10231
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: 10231
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 Need help with below DB2 error ashek15 DB2 3 Sat Mar 18, 2017 5:56 am
No new posts loading a Modified Mapset Susanta CICS 2 Tue Mar 14, 2017 5:43 pm
No new posts FINDREP Syntax Error seahawk789 DFSORT/ICETOOL 4 Thu Mar 09, 2017 10:11 pm
No new posts INVOKE WEBSERVICE error danik56 CICS 11 Thu Mar 09, 2017 11:52 am
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am


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