Date: Fri, 6 Jun 2003 04:23:35 -0700
Reply-To: Bill Österlund <billiboj@YAHOO.SE>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Bill Österlund <billiboj@YAHOO.SE>
Organization: http://groups.google.com/
Subject: Re: Proc sort -
Content-Type: text/plain; charset=ISO-8859-1
This is a way to do it. You need to create an OBS variable by yourself.
proc sort data=map out=map2;
by groups;
run;
data map3;
set map2;
retain obs;
by groups;
if first.groups then obs=1;
else obs+1;
proc print noobs;
by groups;
var obs discip;
run;
Cheers
Bill
silvano@UEL.BR (Silvano) wrote in message news:<003801c32b6d$653f9040$4816550a@uel.br>...
> Hi folks,
>
> suppose that I have 3 groups: C, F and E and many results for every
> groups. I use the program to list them:
> Proc sort data=map;
>
> by groups;
>
>
> Proc print data=map;
>
> by groups;
>
> run;
>
>
> One variable, called OBS is create for SAS:
>
> ***************************** Group=C ********************************
>
> OBS discip
> 1 2map
> 2 1map
> 3 3map
>
> ***************************** Group=E ********************************
>
> OBS discip
> 4 2map
> 5 1map
> 6 3map
>
>
> ***************************** Group=F ********************************
>
> OBS discip
> 7 2map
> 8 1map
> 9 3map
>
>
>
> But I would like that OBS will be the count inside of variables, like:
>
>
>
> ***************************** Group=C ********************************
>
> OBS discip
> 1 2map
> 2 1map
> 3 3map
>
> ***************************** Group=E ********************************
>
> OBS discip
> 1 2map
> 2 1map
> 3 3map
>
>
> ***************************** Group=F ********************************
>
> OBS discip
> 1 2map
> 2 1map
> 3 3map
>
>
> How could I to do this????
>
>
> TIA.
>
>
>
>
> Atenciosamente,
>
> Silvano Cesar da Costa
> Universidade Estadual de Londrina
> Departamento de Matem tica Aplicada
> Campus Universit rio
> Cx. Postal 6001
> CEP 86051-990
> Londrina - PR
>
> Fone: (43) 3371 4346
|