I'm creating a .csv file using CPYTOIMPF Command.. I have a numeric Field in the File. I want to remove the zeros since i am not using it regularly. Pls help me
Software/Hardware used:
ASKED:
December 2, 2010 8:52 AM
UPDATED:
December 3, 2010 12:57 AM
Whatever is in the file goes to the .csv ..
You could copy the file to one that doesn’t have that column and use that file to create the .csv.
Phil
I want to remove the zeros since i am not using it regularly.
What do you mean “regularly”?
Does it mean that you don’t often use the numeric field? Does it mean that you use the numeric field in an irregular way? Does it mean that you use the .CSV file in an irregular way?
CPYTOIMPF is intended as a DB2 database EXPORT function. It can be used for general .CSV creation, but that’s not how it should be expected to work. If it doesn’t work as you need, you have two general options.
First, don’t use CPYTOIMPF. Use a different function such as downloading to Excel and saving the result as a .CSV from Excel, or searching the internet for one of the various .CSV creation tools that others have made available. Because you are the one who knows your requirements, you are the one who would know which tool works as you need.
Or create a new file description that presents the data in the column without leading zeros. You can create a SQL VIEW for example, that would do that. Then use CPYTOIMPF to export that VIEW.
Tom