data _null_;
set sashelp.class nobs=n;
where sex='M' ;
do i= 1 to 5 ;
put @5 name @20 sex @28 i;
output;
end;
run;
Hi Experts,
I am trying below output same seq for each name with sex='M' records
required output
Name
Sex
Group_seq
Alfred
M
1
Alfred
M
1
Alfred
M
1
Alfred
M
1
Alfred
M
1
Henry
M
2
Henry
M
2
Henry
M
2
Henry
M
2
Henry
M
2
James
M
1
James
M
3
James
M
3
James
M
3
James
M
3
Jeffrey
M
4
Jeffrey
M
4
Jeffrey
M
4
Jeffrey
M
4
Jeffrey
M
4
John
M
5
John
M
5
John
M
5
John
M
5
John
M
5
Philip
M
6
Philip
M
6
Philip
M
6
Philip
M
6
Philip
M
6
... View more