Home › Forums › Ask Anything Random Here › create sequential number
-
create sequential number
-
Easy. Create a ID say numeric X by a do loop first, 1,2,3….. then convert it to char and pad with leading zeros using Z6. format. Finally, combine them together. You get it?
Data AAA;
Do X=1 to N;
ID= “aa59” II put(X, Z6.);
Output;
End;
Run;
Log in to reply.