COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Topic started by: hmills on 03 Oct 2007 10:35:43 PM

Title: How do I get rid of spaces in a CSV file?
Post by: hmills on 03 Oct 2007 10:35:43 PM
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?