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

DB2 Data load


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

New User


Joined: 24 May 2010
Posts: 92
Location: Pune

PostPosted: Tue Mar 01, 2016 8:59 pm
Reply with quote

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
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Tue Mar 01, 2016 10:32 pm
Reply with quote

Numeric DB2 columns are always signed; you need do nothing.
Back to top
View user's profile Send private message
kishpra

New User


Joined: 24 May 2010
Posts: 92
Location: Pune

PostPosted: Wed Mar 02, 2016 2:40 am
Reply with quote

'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
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Wed Mar 02, 2016 5:25 am
Reply with quote

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
View user's profile Send private message
kishpra

New User


Joined: 24 May 2010
Posts: 92
Location: Pune

PostPosted: Wed Mar 02, 2016 1:15 pm
Reply with quote

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
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2475
Location: Netherlands, Amstelveen

PostPosted: Wed Mar 02, 2016 2:52 pm
Reply with quote

Quote:
My query is for Load job only


Search for examples, read the manuals. But don't ask.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7311
Location: Inside the Matrix

PostPosted: Wed Mar 02, 2016 2:52 pm
Reply with quote

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
View user's profile Send private message
kishpra

New User


Joined: 24 May 2010
Posts: 92
Location: Pune

PostPosted: Wed Mar 02, 2016 3:45 pm
Reply with quote

I am getting an error wile loading Text field like '-00000393939' into DB2 DECIMAL column. Please advise.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7311
Location: Inside the Matrix

PostPosted: Wed Mar 02, 2016 4:36 pm
Reply with quote

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
View user's profile Send private message
kishpra

New User


Joined: 24 May 2010
Posts: 92
Location: Pune

PostPosted: Wed Mar 02, 2016 4:49 pm
Reply with quote

Error:

'BMC51501E INVALID NUMERIC DATA, COLUMN = 'TOT_AM', RECORD NO. 1 OF SYSREC, DATA = X'4EF0F0F0F0F0F0F0F0F0F0F0'
Back to top
View user's profile Send private message
enrico-sorichetti

Senior Moderator


Joined: 14 Mar 2007
Posts: 10712
Location: italy

PostPosted: Wed Mar 02, 2016 4:53 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts SKIP LOCKED DATA in UPDATE statement DB2 9
No new posts How to find which file contains my se... DFSORT/ICETOOL 6
No new posts Changing Data Type SYNCSORT 4
No new posts Copying data from prev record using SORT SYNCSORT 19
No new posts how to get total count from numeric d... SYNCSORT 9
Search our Forums:

Back to Top