Re: a combination of two characters as one delimiter

  • Follow


> From: Adam [mailto:yadong_cui@YAHOO.COM]
> How to read delimited txt files into SAS; the txt files used
> a combination of two rare characters as delimiters such as '[~'.
>
> infile txtfile dlm='[~';   will treat either [ or ~ as a delimiter,
> not the combination.
>
> The reason for this combination is that either of them may be
> shown in some fields, so if I pick up either one as a
> delimiter, the txt file may not be read into SAS correctly.

so which is the major or outside delimiter?
read the var,
then scan for the minor or inside delimiter:

FinalVar = scan(FirstVar,2,'<minor or inside delimiter>');

Ron Fehd  the macro maven  CDC Atlanta GA USA RJF2@cdc.gov

Repetition obfuscates!
Repetition reduction enhances elegance!
Repetition reduction furthers finesse!
0
Reply rjf2 (3354) 7/11/2003 7:43:33 PM


0 Replies
34 Views

(page loaded in 0.029 seconds)


Reply: