I'm trying to parse a CSV file and convert in to a fixed length data fields. I'm able to achieve that successfully. When the data has a "," as in "$2,814", I am using PAIR=QUOTE to have that retained as part of the data.
But I do not need the quotation marks ("") in the output. I did a search on this in the forums here. I tried to use
Code:
IFTHEN=(WHEN=INIT,FINDREP=(IN=C'"',OUT=C'')),
to replace that quotes. But I am getting an error.
The details has been provided below.
Input File :
Code:
AmeriGas Partners L.P.,030975106,053302880,A18,MS CO C F, - ,$99 ,132655998
EV Energy Partners L.P.,26926V107,558749459,A18,MS CO C F, - ,"$2,814 ",132655998
purusothaman,
I don't have Syncsort but few points to note below...
1) You are using symbols as UNITS but in the sort card you refer UNIT. Note 'S' is missing here. You are using UNIT in PARSE (first IFTHEN) as well as BUILD (second IFTHEN).
2) Try to use BUILD with PARSE and FINDREP with second IFTHEN WHEN INIT.
3) Are you sure CONVERT is allowed with OUTREC? Check your manual and make sure CONVERT is allowed with OUTREC if not change OUTREC to OUTFIL.
Try this totally untested and see if it works for you...
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
Quote:
Are you sure CONVERT is allowed with OUTREC?
sqlcode1,
Syncsort supports OUTREC CONVERT format. The problem seems to be with the PARSE not followed by BUILD/OVERLAY in the first IFTHEN as you pointed out and the misspelled symbol.