Column can 't be determine??

Reply
Super Contributor
Posts: 297

Column can 't be determine??

Hello, I am trying to simulate the data below but keep having issue column cant be determine.

%macro surv(replicates=);

%do p=1 %to &replicates;

data tes_&p;

seed=-1;

alpha1 = 1.00;

  beta1 = 0.50;

  beta2= 0.25;

  do i = 1 to 250;

   X=5+(.25)*rannor(1));

 

    output;

  end;

run;

%end;

%mend surv;

data pattern; X=0; run;

%surv(replicates=1);

ods html;

28   %surv(replicates=1);

22: LINE and COLUMN cannot be determined.

NOTE 242-205: NOSPOOL is on. Rerunning with OPTION SPOOL might allow recovery of the LINE and

              COLUMN where the error has occurred.

ERROR 22-322: Syntax error, expecting one of the following: !, !!, &, *, **, +, -, /, ;, <, <=,

              <>, =, >, ><, >=, AND, EQ, GE, GT, IN, LE, LT, MAX, MIN, NE, NG, NL, NOT, NOTIN, OR,

              ^, ^=, |, ||, ~, ~=.

200: LINE and COLUMN cannot be determined.

NOTE: NOSPOOL is on. Rerunning with OPTION SPOOL might allow recovery of the LINE and COLUMN where

      the error has occurred.

ERROR 200-322: The symbol is not recognized and will be ignored.

NOTE: The SAS System stopped processing this step because of errors.

WARNING: The data set WORK.TES_1 may be incomplete.  When this step was stopped there were 0

         observations and 15 variables.

NOTE: DATA statement used (Total process time):

      real time           0.00 seconds

      cpu time            0.00 seconds

29   ods html;

NOTE: Writing HTML Body file: sashtml.htm

NOTE: This SAS session is using a registry in WORK.  All changes will be lost at the end of this

      session

Super User
Posts: 10,466

Re: Column can 't be determine??

Why isn't this a question instead of a discussion?

X=5+(.25)*rannor(1)); Has too many )

X=5+(.25)*rannor(1); should work.

Super Contributor
Posts: 297

Re: Column can 't be determine??

Thanks both correct

Super Contributor
Posts: 297

Re: Column can 't be determine??

Thanks

Super User
Super User
Posts: 7,392

Re: Column can 't be determine??

I believe it is this line:

   X=5+(.25)*rannor(1));

Should be something like:

   X=(5+.25)*rannor(1);

Good idea to comment parts of the program out and re-run then you can isolate the line which causes the problem.

Also, I tend to avoid using the * for comments as its had to read, use Control + / and Control + Shift + / to comment rows/uncomment them.

Super User
Posts: 10,466

Re: Column can 't be determine??

And in a macro should be %*comment; for best behavior.

Ask a Question
Discussion stats
  • 5 replies
  • 11628 views
  • 2 likes
  • 3 in conversation