If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

How do I get rid of spaces in a CSV file?

Started by hmills, 03 Oct 2007 10:35:43 PM

Previous topic - Next topic

hmills

Hi,

I am outputting a report to a CSV file which looks like the following when opened in textpad:

saacct,lbmatstat,party_cd,sasplitid,lbtrntyp,snsecref,lbsecref,lbsecdesc,lbtraddate,lbsetdate,
231085          ,CANCELLED       ,AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,1215628201,BUY             ,
231085          ,CANCELLED       ,AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,1215628202,BUY             ,
231085          ,CANCELLED       ,BBBBBBBBBBBBBBBBBBBBBBBBBBBB    ,1217285601,SS              ,
231085          ,CANCELLED       ,BBBBBBBBBBBBBBBBBBBBBBBBBBBB    ,1218962701,BUY             ,
231085          ,CANCELLED       ,CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC ,1218067901,BUY             ,
231085          ,CANCELLED       ,CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC ,1218621001,SEL             ,
231085          ,CANCELLED       ,DDDDDDDDDDDDDDDDDD              ,1214783201,BUY             ,
231085          ,CANCELLED       ,DDDDDDDDDDDDDDDDDD              ,1214783202,BUY             ,

I need to be able to clip the fields somehow and get rid of the spaces before the commas.

Any suggestions?