BookmarkSubscribeRSS Feed
sanyam13
Fluorite | Level 6

Data test;

title = ' A tale of two cities , charles J. dickens' ;

word = scan( title, 3 , ',');

run;

 

what will be the value of the variable word in output data set , my answer is missing char. value but in mock test answer is ' of ' we have a comma after cities and in syntax i have mentioned that take ' , ' comma as delimiter  so in that case 3rd word should be missing . can u plz explain this question .

3 REPLIES 3
PaigeMiller
Diamond | Level 26

You are correct. (Of course this assumes you have not made a typing error, and the scan function really have ',' as the third argument and not ' ,' which has a space in it).

 

This is not something that needs to be posted in the SAS communities, as you can run the code yourself and see what the result is. This is a question you need to ask whomever created this test in the first place.

--
Paige Miller
ybolduc
Quartz | Level 8

Hi Sanyam,

 

     Where are you taking those mock questions from? This is the second thread you start about those mock question pointing out that they appear to have wrong answers. Are you taking these from a recongnized source?

 

Thanks.

Reeza
Super User

You get what you pay for. If you have to verify your course materials, its not really a good use of your time.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 945 views
  • 4 likes
  • 4 in conversation