SAS逐字导入

问题描述 投票:1回答:1

我有一个(也许是愚蠢的)问题。我有一个文本(它来自一个更长的xml)文件,看起来像:

<Hi>
|<interview><rul| |ebook><name>EQU| |OTE_RULES</name| |><version>aaaa| |ON 
QUOTE TR2 v2| |.14</version></| |rulebook><creat| |edDate>2017-10-| 
|23`16:00:16.581| | UTC</createdDa| |te><status>IN_P| |ROGRESS</$10tus| 
|>`<lives>`<life n| |umber="1" clien| |tId="1" status=| |"IN_PROGRESS"><| 
|pages>`<page cod| | e="QD_APP" numb| |er="1" name="Pl| |an type" create| 
|dDate="2017-10-| </Hi>

我想知道是否有任何方法可以逐字导入,因此我可以清除文本中的删除字符,如$或保留空格如

|umber="1" clien| 
| e="QD_APP" numb|

谢谢您的帮助

圣诞节

import sas word
1个回答
0
投票

SAS当然可以通过单词输入,而不是通过......输入任何其他内容。实际上,最简单的导入方式是:

data want;
  infile "yourfile.xml";
  length word $1024; *or whatever the longest feasible "word" would be;
  input word $ @@;
run;

如果你不告诉SAS如何分割单词,它会假设空格。

© www.soinside.com 2019 - 2024. All rights reserved.