From: Joe Matise on 30 Nov 2009 13:12 That is easy to deal with: 1. Change all quotation marks to a character not present in your data. 2. Change all pipes to quotation marks. 3. Import through normal DSD rules. 4. Revert the quotation marks. I wonder if you could do it a bit easier by skipping the input/output and actually changing the character map table (PROC TRANTAB, I believe) to make SAS think | is " and " is =BD or something. Then import, and then revert t= o the normal translation table... -Joe On Mon, Nov 30, 2009 at 12:07 PM, Dan T Keating <keatingd(a)washpost.com>wrot= e: > A dataset I need to regularly import is comma-delimited and then uses > pipes as the text qualifier rather than quotes (because the data itself i= s > laden with both quotes and commas). I lobbied for just pipe-delimited bu= t > the providers noted that both MS Access and mysql have for many years mad= e > it very easy to designate the text qualifier as any character when > importing delimited data. The data imports easily into both of them. > > If DSD would recognize pipes rather than quotes, it would work perfectly. > To replicate the funtionality of DSD, I have to program my own version of > scan that ignores commas enclosed within pipes. The bigger and better sca= n > (9.2) does not include this -- its q operator only envisions quotes as th= e > text qualifer. > > The SAS solution I think I have to shoot for is regular expression patter= n > matching. > > But a good SAS solution would be some flexibility in what DSD uses as its > text qualifier. Am I wrong in concluding that the flexibility is not ther= e > now? > > Thanks. > > Dan > _________________________________ > Dan Keating > Graphics Editor/Data, The Washington Post > (202) 334-5047, keatingd(a)washpost.com >
|
Pages: 1 Prev: competing risks proportional Next: Latent Class Analysis - Question |