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
 

 

DB2 Data load

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
kishpra

New User


Joined: 24 May 2010
Posts: 86
Location: Pune

PostPosted: Tue Mar 01, 2016 8:59 pm    Post subject: DB2 Data load
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: 1738
Location: Bloomington, IL

PostPosted: Tue Mar 01, 2016 10:32 pm    Post subject:
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: 86
Location: Pune

PostPosted: Wed Mar 02, 2016 2:40 am    Post subject: Reply to: DB2 Data load
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: 1738
Location: Bloomington, IL

PostPosted: Wed Mar 02, 2016 5:25 am    Post subject:
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: 86
Location: Pune

PostPosted: Wed Mar 02, 2016 1:15 pm    Post subject: Reply to: DB2 Data load
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: 2422
Location: Netherlands, Amstelveen

PostPosted: Wed Mar 02, 2016 2:52 pm    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Wed Mar 02, 2016 2:52 pm    Post subject: Reply to: DB2 Data load
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: 86
Location: Pune

PostPosted: Wed Mar 02, 2016 3:45 pm    Post subject: Reply to: DB2 Data load
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Wed Mar 02, 2016 4:36 pm    Post subject: Reply to: DB2 Data load
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: 86
Location: Pune

PostPosted: Wed Mar 02, 2016 4:49 pm    Post subject: Reply to: DB2 Data load
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Wed Mar 02, 2016 4:53 pm    Post subject: Reply to: DB2 Data load
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    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 ODPP(Optim Data privacy Provider) Iss... Rama kishore IBM Tools 1 Mon Nov 07, 2016 5:46 pm
No new posts Can sending 5 MB data between cobol p... Kevin Vaz CICS 12 Tue Oct 18, 2016 4:50 pm
No new posts output data in CSV Format janmejay COBOL Programming 8 Sat Oct 15, 2016 2:20 pm
This topic is locked: you cannot edit posts or make replies. output data in CSV Format janmejay DFSORT/ICETOOL 3 Sat Oct 15, 2016 2:16 pm
No new posts FTP Server and FTP.DATA vasanthz All Other Mainframe Topics 2 Wed Oct 12, 2016 11:49 pm


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