View previous topic :: View next topic
|
Author |
Message |
kishpra
New User
Joined: 24 May 2010 Posts: 92 Location: Pune
|
|
|
|
I am going to load the DB2 table which has column as BILLING_DET DECIMAL(15).
The input file for the load job (SYSREC) has data in the format below:
Text-Data CHAR(15) VALUE = +000023400000
How can I store the sign in BILLING_DET column of DB2 table. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
Numeric DB2 columns are always signed; you need do nothing. |
|
Back to top |
|
|
kishpra
New User
Joined: 24 May 2010 Posts: 92 Location: Pune
|
|
|
|
'Numeric DB2 columns are always signed; you need do nothing.'
It does not work as negative sign is not loaded into DECIMAL field.
So please let me know how can I perform the below:
I am going to load the DB2 table which has column as BILLING_DET DECIMAL(15).
The input file for the load job (SYSREC) has data in the format below:
Text-Data CHAR(15) VALUE = -000023400000
How can I store the sign in BILLING_DET column of DB2 table |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
How do you know that the sign is not being carried by the DB2 column? Have you retrieved it into a numeric edited field? |
|
Back to top |
|
|
kishpra
New User
Joined: 24 May 2010 Posts: 92 Location: Pune
|
|
|
|
My query is for Load job only. I am getting an input PS file with AMT-FIELD in CHAR(15) format with first character as sign and then loading that file into a DB2 table with AMOUNT field defined as DECIMAL(15) |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Quote: |
My query is for Load job only |
Search for examples, read the manuals. But don't ask. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
The question was, rephrased, can you confirm that after the load you have verified whether the sign on the data in the DB is correct. |
|
Back to top |
|
|
kishpra
New User
Joined: 24 May 2010 Posts: 92 Location: Pune
|
|
|
|
I am getting an error wile loading Text field like '-00000393939' into DB2 DECIMAL column. Please advise. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Things on the Mainframe are usually more specific than "an error". There are probably many thousands of ways you could get "an error". Without detail (the control cards and full message details) there's not much to be done. |
|
Back to top |
|
|
kishpra
New User
Joined: 24 May 2010 Posts: 92 Location: Pune
|
|
|
|
Error:
'BMC51501E INVALID NUMERIC DATA, COLUMN = 'TOT_AM', RECORD NO. 1 OF SYSREC, DATA = X'4EF0F0F0F0F0F0F0F0F0F0F0' |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
why not read the manuals for the utility being used to find out the formats for the different data types ?
topic is going to be locked if the attitude does not change |
|
Back to top |
|
|
|