Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 10327
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: 10327
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 IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts display the sign only if the value is... useit DFSORT/ICETOOL 3 Wed Oct 04, 2017 5:53 pm
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us