BookmarkSubscribeRSS Feed
devarayalu
Fluorite | Level 6

11   data one;

12      string = ',leading, trailing,and multiple,,delimiters,,';

13      length word $20;

14   do until(word='');

15    count+1;

16    word=scan(string, count, ',', 'm');

           ----

           72

ERROR 72-185: The SCAN function call has too many arguments.

17    output;

18   end;

2 REPLIES 2
Haikuo
Onyx | Level 15

Works as being expected for me on SAS 9.2, Winxp 64bit.

65     data one;

66        string = ',leading, trailing,and multiple,,delimiters,,';

67        length word $20;

68     do until(word='');

69      count+1;

70      word=scan(string, count, ',', 'm');

71     output;

72     end;

73     run;

NOTE: The data set WORK.ONE has 1 observations and 3 variables.

NOTE: DATA statement used (Total process time):

      real time           0.00 seconds

      cpu time            0.00 seconds

Although after you stressed 'm' modifier, you only get one missing 'word'.

Haikuo

Tom
Super User Tom
Super User

Looks like you are running an older version of SAS where SCAN function does not support the modifiers.

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 choose a machine learning algorithm

Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1625 views
  • 0 likes
  • 3 in conversation