can any one explain do loop working sceneria in follwing citation
data xx;
do i= 01 to 04;
j=01 to 04;
output;
end;
run;
There is no "working scenario", because:
20 | do i= 01 to 04; |
21 | |
22 | j=01 to 04; |
__ | |
388 | |
202 |
ERROR 388-185: Expecting an arithmetic operator.
ERROR 202-322: The option or parameter is not recognized and will be ignored.
I think the program is either trying to do this:
data xx;
do i= 01 to 04;
j=i;
output;
end;
run;
or:
data xx;
do i= 01 to 04;
do j= 01 to 04;
output;
end;
end;
run;
As per the code provided by @yeliu , first the internal do loop of j will execute and then the outer loop of i.
Thanks
Jag
thanks for clarifying code however i am asking how works do loops in sas with diffrnc scenerios likewe put "output" after "end"and before "end"
Why not just runs some test programs and find out?
i had run some test programs but i can't understand do loop working method in sas
can any one send link foe base do loops working method in
sas
Post an example of the code you tested and a specific question about it.
A simple iterative DO loop like in your original question work the same as in any other language.
The DO statement in SAS actual has many variations and can be extremely powerful, but without more details of what you are trying to do it is hard to give specific advice.
Here is link to on-line document for the iterative form of DO.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.
Find more tutorials on the SAS Users YouTube channel.