DATA Step, Macro, Functions and more

MULTIPLE DELIMITERS

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 17
Accepted Solution

MULTIPLE DELIMITERS

Hi, i have a problem regarding the following data

 


101-lily,5000
102=jasmine*3000
103_daniel'9000

 

the following is the solution i tried. but in the  dlm='- , = * _'   i am unable to insert   '   in the dlm.


data b;
infile "/folders/myfolders/sasuser.v94/task2today.txt" dlm='- , = * _' dsd;
input id name : $9. sal;
run;

 

this is my output. the third row is not visible. please help me fix this . thanks in advance.

101 lily 5000

102 jasmine 3000

 


Accepted Solutions
Solution
‎01-09-2018 03:43 AM
PROC Star
Posts: 1,193

Re: MULTIPLE DELIMITERS

Posted in reply to VISHNU239

Use double quotes Smiley Happy

View solution in original post


All Replies
SAS Super FREQ
Posts: 806

Re: MULTIPLE DELIMITERS

Posted in reply to VISHNU239

change 

dlm='- , = * _' 

to, note the double quotes

dlm="- , = '* _" 

this should work

Occasional Contributor
Posts: 17

Re: MULTIPLE DELIMITERS

Posted in reply to Bruno_SAS

yes, it worked. thank you.

Solution
‎01-09-2018 03:43 AM
PROC Star
Posts: 1,193

Re: MULTIPLE DELIMITERS

Posted in reply to VISHNU239

Use double quotes Smiley Happy

Occasional Contributor
Posts: 17

Re: MULTIPLE DELIMITERS

yes it worked .thank you.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 230 views
  • 2 likes
  • 3 in conversation