*Copyright @ www.mycsg.in;


Using DO loops for data creation in SAS

Create data containing a list of 10 patients with patient numbers from 1 to 10

Create data containing a list of 10 patients with patient numbers from 101 to 110

Create data containing a list of 100 patients with patient numbers from 1001 to 1100

Create data containing a list of 3 patients with patient numbers 1001, 2001, and 3001

Create data containing a list of 15 patients with patient numbers 1001 to 1005, 2001 to 2005, and 3001 to 3005

Create data containing a list of 4 patients with patient numbers incremented by a value of 5

Create data containing a list of 4 patients with patient numbers decremented by a value of 5

Create data containing a list of 3 patients with patient numbers A001, B001, and C001

Create data containing a list of 3 patients with patient numbers 1001, 2001, 3001 and 3 visits for each subject

Create data containing a list of 3 patients with patient numbers 1001, 2001, 3001 and 3 visits for each subject, and within each visit 3 tests

Key points to remember