DATA Step, Macro, Functions and more

blank delimiter do not truncate properly

Reply
N/A
Posts: 0

blank delimiter do not truncate properly

Hi,

Could you help with a dlm problem?

When I run the following program to get the variable names of a txt file in row,
I do not get the proper truncation?

data noms_var;
length x1-x&nbr_var. $60;
infile "U:\RFS\RFS_Gestion\Opcvm quantitatifs\Modele action\DATA\données hebdo historiques test\For_BV_Per_Share_2.txt" dlm=' ' obs=1 missover;
input (x1-x&nbr_var.) ($) ;
run;

I do get have in the txt file:
EC Name For_BV_Per_Share_11_12_04

I get in SAS
EC#Name#For_BV_Per_Share _11_12_04
(instead of the #, there are squares).


Could you help telling me what do I do wrong?

Many thanks and sorry for my level in english,

anais
Trusted Advisor
Posts: 2,115

Re: blank delimiter do not truncate properly

Posted in reply to deleted_user
There is a good chance that the delimiter in the file is NOT a space, but a character that doesn't display, so the text editor you are using shows it as a blank. To know for sure, you will need to display it in a hex editor.

Doc
N/A
Posts: 0

Re: blank delimiter do not truncate properly

Hi ,

First of all, thank you.

I know that it's a tab.
THe txt file is a converted xls file.
But I don't know how to flag it in SAS (I used dlm=tab but it didn't work).

Do you have another idea?

Anais
N/A
Posts: 0

Re: blank delimiter do not truncate properly

Posted in reply to deleted_user
Hi,

I tried the ASCII code '0x09' but it has to be: DLM=’09’x


See the TS-673 document.
http://support.sas.com/techsup/technote/ts673.html

Cheers,
Ask a Question
Discussion stats
  • 3 replies
  • 158 views
  • 0 likes
  • 2 in conversation