Current Year Guided Learning Hours (CYGLH) Sample Code

Note: This page is from an older version of the Data Dictionary and may therefore contain information that is now out of date. It is included here for reference only.


1 The following pseudo code and SPSS code is provided to illustrate the Current Year Guided Learning Hours data definition.

A_ACT_B

2 The following table shows the steps required to derive A_ACT_B.

Step

Condition

Action if true

Action if false

1

Is collection ACL

Go to 3

Go to 2

2

Does A17 = 4

Go to 5

Go to 3

3

Is TEMPACT < 1/10/ relevant academic year and A34 = 3

Set A_ACT_B to 0 and Go to 10

Go to 4

4

Does A34 = 2

Set A_ACT_B = A32*(PRD_ACT/TOTPDACT) and Go to 10

Set A_ACT_B = A32*(PRD_ACT/TOTPDEXP) and Go to 10

5

Is TEMPACT < 1/10/ relevant academic year and A34 = 3

Set A_ACT_B to 0

Go to 6

6

Does A34 = 2

Go to 7

Go to 8

7

Is TOTPDACT > 3

Set A_ACT_B to A32*(PRD_ACT/TOTPDACT-truncation of (TOTPDACT/3)) and Go to 10

Set A_ACT_B = A32*(PRD_ACT/TOTPDACT) and Go to 10

8

Is TOTPDEXP > 3

Set A_ACT_B to A32*(PRD_ACT/TOTPDEXP -truncation of (TOTPDEXP /3)) and Go to 10

Set A_ACT_B to A32*(PRD_ACT/TOTPDEXP) and Go to 10

9

Does A17 = 6

Set A_ACT_B to 0

Go to 10

10

Is A_ACT_B < 0

Set A_ACT_B to 0

3 The following SPSS code illustrates how to derive A_ACT_B

/* Firstly carry out routine for where the collection is ACL. This is because the FE routine uses the variable A17, which is not collected for ACL, so we need an alternative coding for ACL.
DO IF UPCASE(SUBSTR(COLLECTION,1,1))='C'.

/* If the actual end date is before the first census date and the aim is marked as withdrawn, then the actual cyglh is set to 0.
 DO IF TEMPACT < DATE.DMY(1,10,CURRENT YEAR) AND A34=3.
  COMPUTE A_ACT_B=0.
 ELSE.

/* If the aim is completed, then the actual cyglh is equal to the number of glh in which it is planned to deliver the learning aim, multiplied by the ratio of current year actual terms to total actual terms.
  DO IF A34 = 2.
   COMPUTE A_ACT_B=A32 * (PRD_ACT/TOTPDACT).

/* If the aim hasn’t been completed then the actual cyglh is equal to the number of glh in which it is planned to deliver the learning aim, multiplied by the ratio of current year expected terms to total expected terms.
  ELSE.
   COMPUTE A_ACT_B=A32 * (PRD_EXP/TOTPDEXP).
  END IF.
 END IF.

/* A similar routine is then carried out for collections which are not ACL, i.e. FE and UfI.
ELSE IF UPCASE(SUBSTR(COLLECTION,1,1)) <> 'C'.

/* If the aim is not a sandwich course, then
/* If the actual end date is before the first census date and the aim is marked as withdrawn, the actual cyglh is set to 0.
 DO IF A17 <> 4.
  DO IF TEMPACT < DATE.DMY(1,10,CURRENT YEAR) AND A34=3.
   COMPUTE A_ACT_B=0.
  ELSE.

/* If the aim is completed, then the actual cyglh is equal to the number of glh in which it is planned to deliver the learning aim, multiplied by the ratio of current year actual terms to total actual terms.
   DO IF A34 = 2.
    COMPUTE A_ACT_B=A32 * (PRD_ACT/TOTPDACT).

/* If the aim hasn’t been completed then the actual cyglh is equal to the number of glh in which it is planned to deliver the learning aim, multiplied by the ratio of current year actual terms to total expected terms.
   ELSE.
    COMPUTE A_ACT_B=A32 * (PRD_ACT/TOTPDEXP).
   END IF.
  END IF.
 END IF.

/* The rest of the routine is carried out for FE, UfI and ACL.
/* Firstly for aims which are sandwich courses.
 DO IF A17=4.

/* If the sandwich course has lasted for 3 term or less, then the learner has been at the provider for the duration, if the course lasts for more than 3 terms,
/* then the learner has been undertaking the work experience part of the aim, which will be in a different place to the provider.
/* If the end date is before the first census date and the aim is marked as withdrawn, the actual and expected cyglh are set to 0.
  DO IF TEMPACT < DATE.DMY(1,10,CURRENT YEAR) AND A34=3.
   COMPUTE A_ACT_B=0.
  ELSE.

/* If the aim has been completed then
   DO IF A34 = 2.

/* If the total actual terms is greater than 3, i.e. the sandwich course has lasted more that one year, then the actual cyglh is equal to
/* the number of glh in which it is planned to deliver the learning aim, multiplied by the ratio of current year actual terms to
/* (total actual terms minus the (total actual terms divided by three and rounded down to the nearest whole number).
    DO IF TOTPDACT > 3.
     COMPUTE A_ACT_B=A32*(PRD_ACT/(TOTPDACT-TRUNC(TOTPDACT/3))).
    ELSE.

/* If the total actual terms are not greater than three then, the expected cyglh is equal to the number of glh in which it is planned to deliver the learning aim, multiplied by the ratio of current year actual terms to total actual terms.
     COMPUTE A_ACT_B=A32*(PRD_ACT/TOTPDACT).
    END IF.
   ELSE.

/* If the aim has not been completed then
/* If the total expected terms is greater than 3.
    DO IF TOTPDEXP > 3.

/* The actual cyglh is equal to the number of glh in which it is planned to deliver the learning aim, multiplied by the ratio of current year actual terms to
/* (total expected terms minus the (total expected terms divided by three and rounded down to the nearest integer).
     COMPUTE A_ACT_B=A32*(PRD_ACT/(TOTPDEXP-TRUNC(TOTPDEXP/3))).

/* If the total expected terms are not greater than 3, then the actual cyglh is equal to the number of glh in which it is planned to deliver the learning aim, multiplied by the ratio of current year actual terms to total expected terms.
    ELSE.
     COMPUTE A_ACT_B=A32*(PRD_ACT/TOTPDEXP).
    END IF.
   END IF.
  END IF.
 END IF.
END IF.

/* If the collection is not ACL and the learner is marked as being absent for the year, then the actual cyglh is set to 0.
DO IF UPCASE(SUBSTR(COLLECTION,1,1)) <> 'C'.
 IF (A17=6) A_ACT_B=0.
END IF.

/* If the actual cyglh is somehow negative, then it is set to 0.
IF (A_ACT_B < 0) A_ACT_B=0.

L_ACT_B

4 The following table shows the steps required to derive L_ACT_B.

Step

Condition

Action if true

Action if false

1

Is A_ACT_B = 0

Set A_ACT_B to 0.01 and Go to 2

Go to 2

2

Is A_LIVE_B >1

Set L_ACT_B = sum(A_ACT_B)

5 The following SPSS code illustrates how to derive L_ACT_B

/* Assign nominal guided learning hours to those currently with 0. This is so when the values in these fields
/* are aggregated it recognises each record.
IF (A_ACT_B=0) A_ACT_B=0.01.

/* Exclude those aims which are not included for analytical purposes and aggregate individual aim records up to learner level.
SELECT IF (A_LIVE_B > 0).
AGGREGATE OUTFILE=*
 /BREAK=L01 L03
 /L_ACT_B=SUM(A_ACT_B).

A_EXP_B

6 The following table shows the steps required to derive A_EXP_B.

Step

Condition

Action if true

Action if false

1

Is collection ACL

Go to 3

Go to 2

2

Does A17 = 4

Go to 5

Go to 3

3

Is TEMPACT < 1/10/ relevant academic year and A34 = 3

Set A_EXP_B to 0 and Go to 10

Go to 4

4

Does A34 = 2

Set A_EXP_B = A32*(PRD_EXP/TOTPDACT) and Go to 10

Set A_EXP_B = A32*(PRD_EXP/TOTPDEXP) and Go to 10

5

Is TEMPACT < 1/10/ relevant academic year and A34=3

Set A_EXP_B to 0

Go to 6

6

Does A34 = 2

Go to 7

Go to 8

7

Is TOTPDACT > 3

Set A_EXP_B to A32*(PRD_EXP/TOTPDACT-truncation of (TOTPDACT/3)) and Go to 10

Set A_EXP_B = A32*(PRD_EXP/TOTPDACT) and Go to 10

8

Is TOTPDEXP > 3

Set A_EXP_B to A32*(PRD_EXP/TOTPDEXP-truncation of (TOTPDEXP /3)) and Go to 10

Set A_EXP_B to A32*(PRD_EXP/TOTPDEXP) and Go to 10

9

Does A17 = 6

Set A_EXP_B to 0

Go to 10

10

Is A_EXP_B < 0

Set A_EXP_B to 0

7 The following SPSS code illustrates how to derive A_EXP_B.

/* Firstly carry out routine for where the collection is ACL. This is because the FE routine uses the variable A17, which is not collected for ACL, so we need an alternative coding for ACL.
DO IF UPCASE(SUBSTR(COLLECTION,1,1))='C'.

/* If the actual end date is before the first census date and the aim is marked as withdrawn, then the expected cyglh is set to 0.
 DO IF TEMPACT < DATE.DMY(1,10,CURRENT YEAR) AND A34=3.
  COMPUTE A_EXP_B=0.
 ELSE.

/* If the aim is completed, then the expected cyglh is equal to the number of glh in which it is planned to deliver the learning aim, multiplied by the ratio of current year expected terms to total actual terms.
  DO IF A34 = 2.
   COMPUTE A_EXP_B=A32 * (PRD_EXP/TOTPDACT).

/* If the aim hasn’t been completed then the expected cyglh is equal to the number of glh in which it is planned to deliver the learning aim, multiplied by the ratio of current year expected terms to total expected terms.
  ELSE.
   COMPUTE A_EXP_B=A32 * (PRD_EXP/TOTPDEXP).
  END IF.
 END IF.

/* A similar routine is then carried out for collections which are not ACL, i.e. FE and UfI.
ELSE IF UPCASE(SUBSTR(COLLECTION,1,1)) <> 'C'.

/* If the aim is not a sandwich course, then
/* If the actual end date is before the first census date and the aim is marked as withdrawn, the expected cyglh is set to 0.
 DO IF A17 <> 4.
  DO IF TEMPACT < DATE.DMY(1,10,CURRENT YEAR) AND A34=3.
   COMPUTE A_EXP_B=0.
  ELSE.

/* If the aim is completed, then the expected cyglh is equal to the number of glh in which it is planned to deliver the learning aim, multiplied by the ratio of current year expected terms to total actual terms.
   DO IF A34 = 2.
    COMPUTE A_EXP_B=A32 * (PRD_EXP/TOTPDACT).

/* If the aim hasn’t been completed then the expected cyglh is equal to the number of glh in which it is planned to deliver the learning aim, multiplied by the ratio of current year expected terms to total expected terms.
   ELSE.
    COMPUTE A_EXP_B=A32 * (PRD_EXP/TOTPDEXP).
   END IF.
  END IF.
 END IF.

/* The rest of the routine is carried out for FE, UfI and ACL.
/* Firstly for aims which are sandwich courses.
 DO IF A17=4.

/* If the sandwich course has lasted for 3 term or less, then the learner has been at the provider for the duration, if the course lasts for more than 3 terms,
/* then the learner has been undertaking the work experience part of the aim, which will be in a different place to the provider.
/* If the end date is before the first census date and the aim is marked as withdrawn, the actual and expected cyglh are set to 0.
  DO IF TEMPACT < DATE.DMY(1,10,CURRENT YEAR) AND A34=3.
   COMPUTE A_EXP_B=0.
  ELSE.

/* If the aim has been completed then.
   DO IF A34 = 2.

/* If the total actual terms is greater than 3, i.e. the sandwich course has lasted more that one year, then the expected cyglh is equal to
/* the number of glh in which it is planned to deliver the learning aim, multiplied by the ratio of current year expected terms to
/* (total actual terms minus the (total actual terms divided by three and rounded down to the nearest whole number).
    DO IF TOTPDACT > 3.
     COMPUTE A_EXP_B=A32*(PRD_EXP/(TOTPDACT-TRUNC(TOTPDACT/3))).
    ELSE.

/* If the total actual terms are not greater than three then, the expected cyglh is equal to the number of glh in which it is planned to deliver the learning aim, multiplied by the ratio of current year expected terms to total actual terms.
     COMPUTE A_EXP_B=A32*(PRD_EXP/TOTPDACT).
    END IF.
   ELSE.

/* If the aim has not been completed then
/* If the total expected terms is greater than 3.

    DO IF TOTPDEXP > 3.

/* The expected cyglh is equal to the number of glh in which it is planned to deliver the learning aim, multiplied by the ratio of current year expected terms to
/* (total expected terms minus the (total expected terms divided by three and rounded down to the nearest integer).
     COMPUTE A_EXP_B=A32*(PRD_EXP/(TOTPDEXP-TRUNC(TOTPDEXP/3))).

/* If the total expected terms are not greater than 3, then the expected cyglh is equal to the number of glh in which it is planned to deliver the learning aim, multiplied by the ratio of current year expected terms to total expected terms.
    ELSE.
     COMPUTE A_EXP_B=A32*(PRD_EXP/TOTPDEXP).
    END IF.
   END IF.
  END IF.
 END IF.
END IF.

/* If the collection is not ACL and the learner is marked as being absent for the year, then the expected cyglh is set to 0.
DO IF UPCASE(SUBSTR(COLLECTION,1,1)) <> 'C'.
 IF (A17=6) A_EXP_B=0.
END IF.

/* If the expected cyglh is somehow negative, then it is set to 0.
IF (A_EXP_B < 0) A_EXP_B=0.

L_EXP_B

8 The following table shows the steps required to derive L_EXP_B.

Step

Condition

Action if true

Action if false

1

Is A_EXP_B = 0

Set A_EXP_B to 0.01 and Go to 2

Go to 2

2

Is A_LIVE_B >1

Set L_EXP_B = sum(A_EXP_B)

9 The following SPSS code illustrates how to derive L_EXP_B.

/* Assign nominal guided learning hours to those currently with 0. This is so when the values in these fields
/* are aggregated it recognises each record.
IF (A_EXP_B=0) A_EXP_B=0.01.

/* Exclude those aims which are not included for analytical purposes and aggregate individual aim records up to learner level.
SELECT IF (A_LIVE_B > 0).
AGGREGATE OUTFILE=*
 /BREAK=L01 L03
 /L_EXP_B=SUM(A_EXP_B).

Creator

Analysis and MI Team

Date issued

25 January 2006

Date created

21 December 2005

Document ref.

\\records.lsc.local\NAT\23 LrngSkillsPolicyInfrastr\23-07 DataCollectAlysis\23-07-03 LrnrDataAlysisDiss\nat-cyglhsamplecode-report-25jan2006.doc

LSC office

Learning and Skills Council
Cheylesmore House Quinton Road Coventry CV1 2WT
T 0845 019 4170 F 024 7682 3675 www.lsc.gov.uk/

Last Modified: 27 Jan 06