Here is my program: 1472 data first_use4; 1473 set wkspace.first_use3; 1474 end_f = srvc_dt+11; 1475 format end_f mmddyy10.; 1476 array months_12 (120) $ buyin01 - buyin120; 1477 drug_index = month(srvc_dt) + (12 * (year(srvc_dt) - 2006)); 1478 end_index = month(end_f) + (12 * (year(end_f)- 2006));/*This will ensure at least 12 1478! months of follow-up*/ 1479 cov_ab_12=1; 1480 do j = (drug_index - 12) to end_index; 1481 if months_12 {j} in ("0","1","2","A","B") then do; 1482 cov_ab_12=0; /* exclude the current patient */ 1483 leave; /* break out of the DO loop */ 1484 end; 1485 end; I am getting the following error. ERROR: Array subscript out of range at line 1481 column 8. I ran the same program successfully a day ago and now I am getting this error. I changed the following statements: 1480 do j = (drug_index - 12) to end_index; /* (previously) do j=(drug_index-6) to end_index;*/ 1481 if months_12 {j} in ("0","1","2","A","B") then do; /* (previously) if months_12 {j} not in ("3","C");*/ Any input will be very helpful.
... View more