Discussion:
Import csv
(too old to reply)
l***@gmail.com
2018-06-07 08:14:47 UTC
Permalink
I have a data set "A" as follow
Id Name_Row
ID101,Jack|Albert|Rice
ID102,Geroge|Rodman
--
I want to importy "B" as
ID Name
ID101 Jack
ID101 Albert
ID101 Rice
ID102 George
ID102 Rodman
--------------

Data B;
infile 'A.csv' delimiter=',|' MISSOVER DSD Lrecl=32767;
retain ID;
input ID $ ;
input Name $;
output;

RUN;

How to fix my code?
Barry Schwarz
2018-06-07 16:46:26 UTC
Permalink
Post by l***@gmail.com
I have a data set "A" as follow
Id Name_Row
ID101,Jack|Albert|Rice
ID102,Geroge|Rodman
--
I want to importy "B" as
ID Name
ID101 Jack
ID101 Albert
ID101 Rice
ID102 George
ID102 Rodman
--------------
Data B;
infile 'A.csv' delimiter=',|' MISSOVER DSD Lrecl=32767;
retain ID;
input ID $ ;
input Name $;
output;
RUN;
How to fix my code?
Import it as is and then convert it in a data step as described in my
response two days ago two your previous request on this subject.
--
Remove del for email
Loading...