BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
VitoAmoroso
Calcite | Level 5

I cannot run nonparametric survival analysis with SAS OnDemand for Academics anymore.

It appears this error:

79
76
ERROR 79-322: Expecting a (.
ERROR 76-322: Syntax error, statement will be ignored.
 
Is there any solution?
1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User
I think the right syntax of proc lifetest is :

proc lifetest data=WORK.IMPORT;
time 'Overall survival (months)'n*Censura(0);
run;

Here 0 is a value of Cnesura which stands for the censored flag .

View solution in original post

6 REPLIES 6
Tom
Super User Tom
Super User

@VitoAmoroso wrote:

I cannot run nonparametric survival analysis with SAS OnDemand for Academics anymore.

It appears this error:

79
76
ERROR 79-322: Expecting a (.
ERROR 76-322: Syntax error, statement will be ignored.
 
Is there any solution?

Hard to tell since you did not share the full log for the step.

VitoAmoroso
Calcite | Level 5

Thanks for your reply. This is the full log:

 

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
NOTE: ODS statements in the SAS Studio environment may disable some output features.
69
70 /*
71 *
72 * Task code generated by SAS Studio 3.8
73 *
74 * Generated on '7/13/25, 11:07 PM'
75 * Generated by 'vitoamoroso0'
76 * Generated on server 'ODAWS02-EUW1.ODA.SAS.COM'
77 * Generated on SAS platform 'Linux LIN X64 5.14.0-284.30.1.el9_2.x86_64'
78 * Generated on SAS version '9.04.01M8P02222023'
79 * Generated on browser 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)
79 ! Chrome/138.0.0.0 Safari/537.36'
80 * Generated on web client
80 ! fojg3Y-odamid00-euw1'
81 *
82 */
83
84 ods noproctitle;
85 ods graphics / imagemap=on;
86
87 proc lifetest data=WORK.IMPORT;
88 time 'Overall survival (months)'n*Censura;
_
79
76
ERROR 79-322: Expecting a (.
ERROR 76-322: Syntax error, statement will be ignored.
89 run;
 
I noticed that the code 0 for censor is the problem. If I insert another value (i.e. 2) the analysis starts... 
ballardw
Super User

Here is proper log entry showing a similar error I generated. Best is to copy the text from the log for the entire procedure or data step, on the forum open a text box using the </> and paste the text. The result would look like:

100  data junk;
101     x = rand 'integer',5);
                 ---------
                 22
                 76
ERROR 22-322: Syntax error, expecting one of the following: (, [, {.

ERROR 76-322: Syntax error, statement will be ignored.

102  run;

The text box is important to preserve formatting as the forum software will reformat text so the indicators of where the error is detected, the underscore characters, will not appear where they should.

The fix is usually to enter a ( in the appropriate place:

103  data junk;
104     x = rand ('integer',5);
105  run;

NOTE: The data set WORK.JUNK has 1 observations and 1 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.00 seconds

 

 

Ksharp
Super User
I think the right syntax of proc lifetest is :

proc lifetest data=WORK.IMPORT;
time 'Overall survival (months)'n*Censura(0);
run;

Here 0 is a value of Cnesura which stands for the censored flag .
garivero70
Calcite | Level 5

 

Error in nonparametric survival analysis

 

HI 

 

I am getting this error message - suddenly, I lost ability to input from task and utility non parametric survival (0) all other numbers work well. Any help would be appreciated (see error message below) 

Gustavo 

 

 
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
NOTE: ODS statements in the SAS Studio environment may disable some output features.
69
70 /*
71 *
72 * Task code generated by SAS Studio 3.8
73 *
74 * Generated on '7/17/25, 10:46 AM'
75 * Generated by 'garivero0'
76 * Generated on server 'ODAWS02-USW2.ODA.SAS.COM'
77 * Generated on SAS platform 'Linux LIN X64 5.14.0-284.30.1.el9_2.x86_64'
78 * Generated on SAS version '9.04.01M8P02222023'
79 * Generated on browser 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko)
79 ! Chrome/136.0.0.0 Safari/537.36'
80 * Generated on web client
80 ! S-A-odamid00-usw2'
81 *
82 */
83
84 ods noproctitle;
85 ods graphics / imagemap=on;
86
87 proc lifetest data=HMAVEN.ALL;
88 time Overall_survival*Censor_OS;
_
79
76
ERROR 79-322: Expecting a (.
ERROR 76-322: Syntax error, statement will be ignored.
89 run;
Ksharp
Super User
you need put 0 or 1 which is the value of Censor_OS after it :

proc lifetest data=HMAVEN.ALL;
time Overall_survival*Censor_OS(0);
run;

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 6 replies
  • 772 views
  • 0 likes
  • 5 in conversation