lnMaxRowWidth = 345 lnFields = ceiling(lnMaxRowWidth/254) dimension arrFields[lnFields,4] arrFields = 0 for ix=1 to lnFields arrFields[ix,1] = 'f'+ltrim(str(ix)) arrFields[ix,2] = 'C' arrFields[ix,3] = iif(ix=lnFields,lnMaxRowWidth-(254*(ix-1)),254) ENDFOR create cursor junkpos from array arrFields append from test.sdf type SDF GO top dimension myfields(1,4) lnlength = 0 lilength = 0 lncount = 1 DIMENSION myfields(lncount,4) myFields[lncount,1] = 'f'+ltrim(str(lncount)) myFields[lncount,2] = 'C' myfields[lncount,3] = 10 myfields[lncount,4] = 0 for i = 1 TO LEN(junkpos.f1)+1 lnlength = lnlength + 1 IF ASC(SUBSTR(junkpos.f1,i,1))=44 lncount = lncount + 1 DIMENSION myfields(lncount,4) myFields[lncount,1] = 'f'+ltrim(str(lncount)) myFields[lncount,2] = 'C' myfields[lncount,3] = lnlength-1 myfields[lncount,4] = 0 IF lnlength > lilength lilength = lnlength ENDIF lnlength = 0 ENDIF ENDFOR FOR i = 1 TO ALEN(myfields,1) IF myfields(i,3) < lilength myfields(i,3) = lilength ENDIF ENDFOR create cursor junkpos from array myFields APPEND FROM test.sdf DELIMITED WITH "" WITH CHARACTER ',' browseI'm sure there is a better way. You can certainly improve this down and dirty code! :o)