CPYTOIMPF and EXCEL defaults

5 pts.
Tags:
CPYTOIMPF
CSV format
IFS
Microsoft Excel
I have an issue when copying an AS400 file to the IFS. One field that is defined as 15 charachter and contains numeric data does not show up in .csv format correctly without reformatting the column to special. I also tried defining the field as numeric, and had the same result. Example of data displayed: 8.1228E+13, where the value is displayed as 81228000000001. Is there an option on the CPYTOIMPF command the resolve this? I also tried the CPYTOSTMF without any luck. Thank you!

Answer Wiki

Thanks. We'll let you know when a new response is added.

This is a problem with Excel not CPYTOIMPF. If you look at the raw csv data with note pad or word pad, you will see the data formatted correctly.

Discuss This Question: 5  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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • philpl1jb
    This isn't exactly an AS/400 problem. You've sent the correct value to excel but it's decided to show it in this format. In Excel click on the field and you will see the number in the formula pane. Format the cell (or all the cells in the column) to number and set the column width wide enough so you will see the numbers. Using HSSF an rpg program could create the spreadsheet and set the column width and I believe set the format but that's a chunk of work and a chunk of processor time. Phil
    49,960 pointsBadges:
    report
  • cjdugas
    You will need to create a cwbtfr.ini file. Refer to: http://www-01.ibm.com/support/docview.wss?uid=nas1352f81ff9d0d4c86862565c2007cae44 Excel will need to be restarted before it takes effect. http://itknowledgeexchange.techtarget.com/itanswers/importing-an-excel-tab/ See if that works. Chris
    55 pointsBadges:
    report
  • philpl1jb
    Cjdugas This documentation and everything I can google on this cwbtfr.ini file refer to it's use with Client Access. Does it effect Excel outside that process .. ie: CPYTOIMPF.??? Phil
    49,960 pointsBadges:
    report
  • cjdugas
    After reviewing the original posting, I believe you are correct. The .ini file should have no effect on the opening of a .CSV in Excel What the .ini did do for me was to prevent the automatic conversion of long numbers into scientific notation when using data transfers and ODBC queries. I was experiencing a number conversion before the value would hit the cell. No amount of cell manipulation would correct it. Installing the .ini and changing the value worked like a charm. This .ini has not adversely affected any of my day-to-day 400-to-excel transfers. I recommend it.
    55 pointsBadges:
    report
  • philpl1jb
    Cjdugas Thanks, this is really good info. Phil
    49,960 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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

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

Following