Issue with amount fields with decimals

230 pts.
Tags:
#AS400 #RPGLE #as400
AS400 iseries
CLLE
I have an excel spreadsheet which i copied to AS400 stream file, and then copied from stream file in IFS to a database file using CPYFRMIMPF but the amount fields whihc i had has value as "21100" which should be treated as 211.00 in database but it copied as "21100.00" . How to resolve this issue? please advise asap
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 4  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • ToddN2000
    were the fields formatted to show 2 decimals in the Excel file before the copy was done? Or are they assumed decimals? 
    135,515 pointsBadges:
    report
  • Hamsu
    No sir the fields are not formatted in the excel
    230 pointsBadges:
    report
  • ToddN2000
    You may need to format them  in Excel, if not it may assume they are integer values and when moving to a database that has a decimal definition it will throw you data off. IF this is a one time thing you could probably fix the database by taking the numeric value and dividing by 100 to give you the 2 decimal positions you are missing. The cleanest way would be to fix it in Excel before any copy/imports get done. 
    135,515 pointsBadges:
    report
  • Hamsu
    Thank you Sir .... I got them corrected in excel itself. 
    230 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: