|
MATCH FILES /FILE=’..aims file’ /TABLE=’………..learner file’ /BY L01 L03.
/* CYGLH ROUTINE***. /* There are two CYGLHs, expected and actual, /* The expected CYGLH is equal to the expected time spent on the aim in the current year divided by the total expected time to be spent on the aim, multiplied by the total GLH for that aim. /* Follows a similar methodology to previous years, but doesn't use census dates /* Uses the dates for the current academic year, i.e. 1 Aug to 31 July.
comp A_InYr_Expected_GLH=-1.
comp totexp=datedif(a28, a27, “days”)+1. comp totact=datedif(a31, a27, “days”)+1.
do if A_Active=1.
/* Sandwich courses. Modify the total expected duration if the sandwich course is greater than the period 365 days,/* assumes that they have spent some time on work experience, i.e. not with the provider.
do if A17=4 and totexp>365. comp totexp=totexp-rnd(totexp/3). comp totact=totact-rnd(totact/3). end if.
end if.
/* Expected CYGLH.
/* When the aim hasn’t been completed the total expected days are used, /* but when the aim has been completed, the total actual days are used. do if A34<>2. /* If the start date is before the start of the current year, used 1/8 in the calculation. do if A27<date.dmy(1,8,current academic year). /* If the expected end date is in the current year use expected end date, if not use 31/7. do if A28>=date.dmy(1,8,current academic year) and A28<=date.dmy(31,7,current academic year+1). comp A_InYr_Expected_GLH=((datedif(A28,date.dmy(1,8,current academic year),”days”)+1)/totexp)*A32. else. comp A_InYr_Expected_GLH=((datedif(date.dmy(31,7,current academic year+1),date.dmy(1,8,current academic year),”days”)+1)/totexp)*A32. end if. else. /* If the start date is within the current year use that in the calculation. do if A28>=date.dmy(1,8,current academic year) and A28<=date.dmy(31,7,current academic year+1). comp A_InYr_Expected_GLH=((datedif(A28,A27,”days”)+1)/totexp)*A32. else. comp A_InYr_Expected_GLH=((datedif(date.dmy(31,7,current academic year+1),A27,”days”)+1)/totexp)*A32. End if. End if. Else. /* aim has been completed so the total actual days are used. do if A27<date.dmy(1,8,current academic year). do if A28>=date.dmy(1,8,current academic year) and A28<=date.dmy(31,7,current academic year+1). comp A_InYr_Expected_GLH=((datedif(A28,date.dmy(1,8,current academic year),”days”)+1)/totact)*A32. else. comp A_InYr_Expected_GLH=((datedif(date.dmy(31,7,current academic year+1),date.dmy(1,8,current academic year,),”days”)+1)/totact)*A32. end if. else. do if A28>=date.dmy(1,8,current academic year) and A28<=date.dmy(31,7,current academic year+1). comp A_InYr_Expected_GLH=((datedif(A28,A27,”days”)+1)/totact)*A32. else. comp A_InYr_Expected_GLH=((datedif(date.dmy(31,7,current academic year+1),A27,”days”)+1)/totact)*A32. End if. End if. End if.
if A_InYr_Expected_GLH>a32 A_InYr_Expected_GLH =A32.
/* If the aim is set to absent for the year then both expected and actual are set to zero. do if A17=6. comp A_InYr_Expected_GLH=0. end if.
End if.
RECODE A_INYR_EXPECTED_GLH (SYSMIS=-1) |