BookmarkSubscribeRSS Feed
CarlyM207
Calcite | Level 5

Hello,

I am receiving the following error when I try running any SAS callable SUDAAN procedures:

 

PROC DESCRIPT data=TEMP filetype=SAS design=WR;
----
22
76
NOTE: An external program, not a SAS procedure, is being executed.

ERROR 22-322: Syntax error, expecting one of the following: ;, AUDIT, CC, CLEANUP.
ERROR 76-322: Syntax error, statement will be ignored.

 

*****

I just had SUDAAN installed, and am not sure if the errors are because of my code or a problem with the installation. I have SAS 9.4, SUDAAN 11.0. Any help is appreciated!

3 REPLIES 3
ballardw
Super User

Which versions of SUDAAN are actually callable by SAS are version dependent. A lot. Not just by version number but by bit (32 bit SUDAAN won't run with 64 bit SAS ).

 

You might also check any code submitted previously. This:

ERROR 22-322: Syntax error, expecting one of the following: ;, AUDIT, CC, CLEANUP.

may indicate that something previously was not ended correctly. It has been a while since I used SAS with SUDAAN but I think that the SUDAAN procs like Descript may be a bit pickier about requiring an actual RUN; to end the procedure than the native SAS procedures. If things are unstable enough that might require closing down SAS and restarting.

 

 

Best practice is to copy the log and paste into a code box opened on the forum with the </> icon to preserve formatting and position of any of the SAS diagnostics.

 

 

 

 

CarlyM207
Calcite | Level 5

Thanks for your reply. Here is the error as it appears in the log:

8    proc descript data = demo_f filetype = sas design = wr;
                   ----
                   22
                   76
NOTE: An external program, not a SAS procedure, is being executed.

ERROR 22-322: Syntax error, expecting one of the following: ;, AUDIT, CC, CLEANUP.
ERROR 76-322: Syntax error, statement will be ignored.
9    weight wtint2yr;
10   nest sdmvstra sdmvpsu / missunit;
11   var ridageyr;
12   run;

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE DESCRIPT used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds

I've tried restarting SAS and running others' code to check that it wasn't just an error with my code, but I keep getting the same message, regardless. 

ballardw
Super User

Can you run ANY SUDAAN code without errors?

The underscores under DATA means SAS finds the Data = to be incorrect syntax. Which may mean your SUDAAN has an install issue or is not actually SAS callable.

 

Can you use Proc Records and the Print option to display a few records from the data set?

 

You might also try adding the library to the data set name. I don't remember if SUDAAN defaults to WORK or not.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

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