BookmarkSubscribeRSS Feed
Harish
Calcite | Level 5

1.Data Test;
INPUT accnum $ fname $ lname $ @@ ;
cards;
122232 Johny Smith 132343 Peter Smith 142434 Thomas Joseph;
run;

Which of the following statement is correct?

a. Output record set will have only one record

b. Output record set will have 3 records

c. Data step incomplete due to incorrect syntax error.

D.Variables will have missing values.

2.

Following program is submitted.

Data test1;

set test;

total+wage;

if last.id=1;

run;

When will the value of zero(0) is assigned to variable total.

A. At execution step.

B. At first iteration of datastep.

C. value of zero(0) is not assigned to variable total.

D. at compilation step.

Thanks.........

3 REPLIES 3
Hima
Obsidian | Level 7

To answer the first question, c. Data step incomplete due to incorrect syntax error.

Question:

122232 Johny Smith 132343 Peter Smith 142434 Thomas Joseph;

Correct:

122232 Johny Smith 132343 Peter Smith 142434 Thomas Joseph

;

Loko
Barite | Level 11

Hello,

While for the second one the correct answer is D

Ksharp
Super User

Vote for D ?

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
  • 572 views
  • 0 likes
  • 4 in conversation