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

What does the following log indicate about your program?

proc print data=sasuser.cargo99
   var origin dest cargorev;
      22
      76

ERROR 22-322: Syntax error, expecting one of the following:

                 ;, (, DATA, DOUBLE, HEADING, LABEL,
                 N, NOOBS, OBS, ROUND, ROWS, SPLIT, STYLE,
                 UNIFORM, WIDTH.

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

 

 

all of the above

SAS identifies a syntax error at the position of the VAR statement.

SAS is reading VAR as an option in the PROC PRINT statement.

SAS has stopped processing the program because of errors.

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

SAS identifies a syntax error at the position of the VAR statement.

SAS is reading VAR as an option in the PROC PRINT statement.

SAS has stopped processing the program because of errors.

 

all are true.

 

Now you have to ask yourself: what could be the reason for SAS to find a syntax error where VAR appears in the code?

Hint: Maxim 1 (read the documentation): http://documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.3&docsetId=proc&docsetTarget=p10qiuo2..., see the examples section for selecting variables.

View solution in original post

3 REPLIES 3
andreas_lds
Jade | Level 19

Seems to be copied from an exam ... and what is your question?

abhishekganguly
Calcite | Level 5

Actually can you explain me the correct option. I have found this question in a sample set for sas base certification.

Kurt_Bremser
Super User

SAS identifies a syntax error at the position of the VAR statement.

SAS is reading VAR as an option in the PROC PRINT statement.

SAS has stopped processing the program because of errors.

 

all are true.

 

Now you have to ask yourself: what could be the reason for SAS to find a syntax error where VAR appears in the code?

Hint: Maxim 1 (read the documentation): http://documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.3&docsetId=proc&docsetTarget=p10qiuo2..., see the examples section for selecting variables.

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
  • 1045 views
  • 1 like
  • 3 in conversation