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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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