|
8
9
10 data _null_;
11 do i = 1 to 3, 6 to 8;
12 put i=;
13 end;
14 run;
i=1
i=2
i=3
i=6
i=7
i=8
-----Original Message-----
From: owner-sas-l@listserv.uga.edu
[mailto:owner-sas-l@listserv.uga.edu]On Behalf Of Eric B
Sent: Wednesday, February 22, 2006 9:12 AM
To: sas-l@uga.edu
Subject: non-consecutive do loop
hi all,
I'm interested in doing a non-consecutive do loop, meaning I would like
this code:
do i = 1 to 12;
...
end;
do i = 21 to 32;
...
end;
to be a little more compact, to say something like this:
do i = (1 to 12) and (21 to 32)
...
end;
any ideas ?
Thanks
_______________________________________________________________________
This e-mail may be privileged and/or confidential, and the sender does not waive any related rights and obligations.
Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized.
If you received this e-mail in error, please advise me (by return e-mail or otherwise) immediately.
Ce courrier électronique est confidentiel et protégé. L'expéditeur ne renonce pas aux droits et obligations qui s'y rapportent.
Toute diffusion, utilisation ou copie de ce message ou des renseignements qu'il contient par une personne autre que le (les) destinataire(s) désigné(s) est interdite.
Si vous recevez ce courrier électronique par erreur, veuillez m'en aviser immédiatement, par retour de courrier électronique ou par un autre moyen.
|