DATA Step, Macro, Functions and more

MCQ

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

MCQ

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.


Accepted Solutions
Highlighted
Solution
a week ago
Super User
Posts: 10,280

Re: MCQ

[ Edited ]
Posted in reply to abhishekganguly

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.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code

View solution in original post


All Replies
Valued Guide
Posts: 580

Re: MCQ

Posted in reply to abhishekganguly

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

New Contributor
Posts: 2

Re: MCQ

Posted in reply to andreas_lds

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

Highlighted
Solution
a week ago
Super User
Posts: 10,280

Re: MCQ

[ Edited ]
Posted in reply to abhishekganguly

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.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 65 views
  • 1 like
  • 3 in conversation