Page 1 of 1

Retain Leading Zeroes in CSV File exported from mainframe

PostPosted: Thu Apr 16, 2020 10:27 pm
by Manjucan
Hi ,

There is a requirement to export mainframe file as CSV format file using FTP.

Doing so ,the fields with leading zeroes are displayed without leading zeroes while opening the CSV file.

Any ways to retain the leading zeroes in the fields ?

Re: Retain Leading Zeroes in CSV File exported from mainfram

PostPosted: Thu Apr 16, 2020 10:43 pm
by prino
Manjucan wrote:Doing so ,the fields with leading zeroes are displayed without leading zeroes while opening the CSV file.

Opening it with what?

Re: Retain Leading Zeroes in CSV File exported from mainfram

PostPosted: Thu Apr 16, 2020 10:48 pm
by Robert Sample
If you are opening the file with Excel (and the critical information about which program you're using to open the file was omitted from your post), then you need to be aware that this is an EXCEL issue and NOT a mainframe issue. By default, Excel will remove leading zeros from numbers in CSV files -- if you want another behavior, I recommend you use Google for "leading zeros in CSV file" and click on some of the links provided (there's about 147,000 so you have plenty of choices).