Welcome to the Simplilearn Community

Want to join the rest of our members? Sign up right away!

Sign Up

DS-SAS | Nov 10 - Dec 09 | Prateek Sharma

Nishant_Singh

Well-Known Member
Staff member
Simplilearn Support
Hi Learners,

This thread is for you to discuss the queries and concepts related to Data Science with SAS.

Happy Learning !!

Regards,
Team Simplilearn
 

Lori Roberts

New Member
Hi Learners,

This thread is for you to discuss the queries and concepts related to Data Science with SAS.

Happy Learning !!

Regards,
Team Simplilearn
Hi Learners,

This thread is for you to discuss the queries and concepts related to Data Science with SAS.

Happy Learning !!

Regards,
Team Simplilearn
Hi Learners,

This thread is for you to discuss the queries and concepts related to Data Science with SAS.

Happy Learning !!

Regards,
Team Simplilearn
 

Prateek_64

Member
Alumni
Trainer
can we use BY statement twice or many times in do loop?

Hi,

Yes we can use by statement twice or many times in a do loop.
If there are two do loops, then we can use 2 by statements.
Eg. using 1 by statement.

/*eg. of 1 do loop*/
data one;
do i=1 to 5 by 1;/* creates a variable i which gets incremented by 1*/
a=2*i; /*for each value of i, we need to create a variable which equals 2*i*/
output ;/*writes the value of a and i to the output data set, if we dont write output statement, then only the last
value of a and i will be written to the dataset*/
end; /*ends the do loop*/
run;


/* Eg of nested loops */
data do_loop_eg;
do i=1 to 10 by 2;/* creates a variable i which gets incremented by 2*/
a=2*i;/*for each value of i, we need to create a variable which equals 2*i*/
do j=20 to 30 by 3;/* creates a variable j which gets incremented by 3*/
b=3*j;/*for each value of j, we need to create a variable which equals 3*j*/
output;
end;
end;
run;

As you can see, we have included two by statements inside a do loop.
We need to include the end statement as many times we have included a do loop.
 

Prateek_64

Member
Alumni
Trainer
Hi Guys,

I have uploaded the assignments in the Google drive,
Please attempt it at let me know in case of any problem.

happy learning!!
 

_33035

New Member
Hello Prateek,

This is Tatyana.
I am not sure if I am the only one experiencing this, but assignment solution file is blanc.
 

_26245

Member
Hi Parteek,
I am enrolled in Data science with SAS . I need a help. Can you please share google drive access. Thank you.
 

_40811

New Member
HI Prateek,
As I mentioned yesterday in the class that I am getting blue underlined values in my output. Attaching a screen shot. If you can help why would that be for?
 

Attachments

  • Blue Underlined.PNG
    Blue Underlined.PNG
    11.9 KB · Views: 5
Top