Hi! I am trying to complete my code for assigning a status on individuals on their labourmarket status. My code is the following: data SPECIALE.merge_bf_self (compress=binary); set SPECIALE.merge_dpsgdp; array ydelser (*) $3 y_1901--y_2130; array spell (135) $2; array branche (*) $6 branche_2019_01--branche_2021_07; do i='31dec2018'd to '30jul2021'd; mdr=month(i); aar=year(i); dag=day(i); ugedag=weekday(i); dream=ceil(((i-'31dec2018'd)+1)/7); index=0; index=(aar-2019)*12 + mdr; if branche(index) not in ('','') then do; if ydelser(dream)=('') then spell(dream)="B"; end; if ydelser(dream)=('') and spell(dream)=('') then spell(dream)="SF"; end; run; However when I run the code, then there pops an error with the message that array subscript out of range at line 46 column 4 My data is contructed in the following way, where the data contains different codes depending on the individuals status ID y_1901 ... y_2130 branche_2019_01 ... branche_2021_07 spells 1 2 3 4 5 6 ... Hope somebody can help, since I can't locate the error
... View more