Retain leading zeroes with CPYTOIMPF

30 pts.
Tags:
CPYTOIMPF
Data mining/analysis
V5R3
I am copying a PF from the iSeries (V5R3M0) using Cpytoimpf, within the file is an alpha field with leading zeros. When the file is opened in Excel it drops the leading zeros. Assuming it is a numeric field, is there any way to retain the leading zeros?

Answer Wiki

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

Yes there is a way to retain the Leading zeros
but not thru the CPYTOIMPF command
let the file be created
after conversion to the Excel ..
Open the Excel and Convert the Required Columns to Character using Format Cells.
It will retain the Leading zeros for sure.

Thanx
reshma

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
  • AmandaC
    When you click on a CSV file it automatically opens in excel. and then drops the leading zeros. I have decided to just use a text file and convert to excel manually.
    30 pointsBadges:
    report
  • ReshmaG
    Hi Amanda Dont Click the CSV directly First Open the Blank Excel the Open it from there only ie. File-> Open-> from there it opens a window from where u can select the column whichever you want to change it into the Text Column. Thanx
    455 pointsBadges:
    report
  • TomLiotta
    A column with numeric digits should keep leading zeros in Excel if a single-quote is prepended to the digits. You might cause that to happen by creating a VIEW that puts the quote in place. There's not much that CPYTOIMPF can do to fix how Excel handles a .CSV file. Tom
    125,585 pointsBadges:
    report
  • Sixtylab
    We have a legacy classic ASP application that’s been around since 2001. It badly needs to be re-written, ceh but it’s working fine from an end user perspective. The reason Ginault feels like a rewrite is necessary is that php for beginners when we need to update it (which is admittedly not that often) then it takes forever to go through all the spaghetti code and fix problems. Ginault based in La Chaux-de-Fonds, Switzerland, is a fine watch manufacturer making some of the most exciting new design Swiss timepieces based on new xbox live code. The Ginault Base Module 1 is the mcse ultimate alter ego of the classic Rolex Submariner watch. Also, adding new features is also a pain since it was architect-ed and coded badly. I’ve run cost analysis for them on maintenance but they are willing to spend more for the small maintenance jobs than a rewrite. Any suggestions on convincing them otherwise?
    10 pointsBadges:
    report
  • TomLiotta
    A well run bootcamp can... But a "well run bootcamp" would never abuse other forums. Anyone who would risk going to such a'bootcamp' is risking a connection an un trustworthy site. Tom
    125,585 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