Roy wrote the editors of Search400.com recently, looking for help with a CSV file. He said:
"I'm using CRTCSVF to create a csv file. My problem is that my customer number is alphanumeric, but they want it to be numeric (without the quotes) in the CSV file and with the leading zeros intact.
"Is there a way to convert character to numeric without suppressing the zeros?"
-- Michelle Davidson, editor, Search400.com
Software/Hardware used:
ASKED:
September 26, 2005 9:58 AM
UPDATED:
November 14, 2009 1:05 AM
Best way is not to use CRTCSVF (whatever that is), but rather do it yourself.
If you’re comfortable with Qshell, you might use the db2 utility to string character fields and numeric fields that you convert to characters together, separated by commas and with whatever quotes you might want wherever you might them. Pipe the output through sed to strip out any heading lines and redirect the outputput to a .CSV file.
You can include leading zeros when you want, or drop them from anywhere. You can do anything that SQL can do to any column.
Tom