Need help to write sas program

Reply
Occasional Contributor
Posts: 12

Need help to write sas program

I am Creating a table such as student name, class ,roll no

roll no is set as identity,information of student is being saved in on table such as student name,class,roll no

i want such that

Student Name    Class   Roll No

   Snehal         1      1

    Alok          1      2

   Sandeep        1      3

  Swapnil         1      4

   Kunal          1      5

   Amit           1      6

  Nitin           2      1

Sudhanshu        2      2

  Lokesh          1      7

  Swati           2      3

  Rajesh          1      8

roll no is identity i want that roll no should change when class changes it should start with 1 when no records further added belongs to that class or if further records belongs to that class are added then it should continue from the last number

Please guide to write a sas program for  this where the roll number increments accordingly to the classeed

Ask a Question
Discussion stats
  • 0 replies
  • 155 views
  • 0 likes
  • 1 in conversation