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
 

 

LOAD decimal values from flat file to DB2 table

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

New User


Joined: 27 Dec 2005
Posts: 58

PostPosted: Tue Oct 30, 2007 8:03 pm    Post subject: LOAD decimal values from flat file to DB2 table
Reply with quote

we have a requirement to load data from a flat file to a DB2 table.The table has an amount field which is declared as DECIMAL(15,2).

We are using the LOAD utility for this.

The syntax in the load that we are using is:
POSITION(61:76) DECIMAL

The data in the file is something like this:
1234567890111.12(13 integers followed by decimal point and 2 decimals)

When this is run it gives a '04' error the description being:
04 an input packed decimal field was in error

There is either an error in the input data format in the file or the way the
load syntax is written.

Kindly let me know if there is a fix for this.
Back to top
View user's profile Send private message

Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Tue Oct 30, 2007 8:53 pm    Post subject: Re: LOAD decimal values from flat file to DB2 table
Reply with quote

morpheus007 wrote:
we have a requirement to load data from a flat file to a DB2 table.The table has an amount field which is declared as DECIMAL(15,2).

We are using the LOAD utility for this.

The syntax in the load that we are using is:
POSITION(61:76) DECIMAL

The data in the file is something like this:
1234567890111.12(13 integers followed by decimal point and 2 decimals)

When this is run it gives a '04' error the description being:
04 an input packed decimal field was in error

There is either an error in the input data format in the file or the way the
load syntax is written.

Kindly let me know if there is a fix for this.

Try POSITION(61:76) DECIMAL external(16,02)
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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm


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