Start Period 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 Start Period data definition.

A_STARTP

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

Step

Condition

Action if true

Action if false

1

Is A27<= 1 Aug Relevant Academic year

Set A_STARTP to -99

Go to 2

2

Is the month of A27 = Aug

Set A_STARTP to 1

Go to 3

3

Is the month of A27 = Sep

Set A_STARTP to 2

Go to 4

4

Is the month of A27 = Oct

Set A_STARTP to 3

Go to 5

5

Is the month of A27 = Nov

Set A_STARTP to 4

Go to 6

6

Is the month of A27 = Dec

Set A_STARTP to 5

Go to 7

7

Is the month of A27 = Jan

Set A_STARTP to 6

Go to 8

8

Is the month of A27 = Feb

Set A_STARTP to 7

Go to 9

9

Is the month of A27 = Mar

Set A_STARTP to 8

Go to 10

10

Is the month of A27 = Apr

Set A_STARTP to 9

Go to 11

11

Is the month of A27 = May

Set A_STARTP to 10

Go to 12

12

Is the month of A27 = Jun

Set A_STARTP to 11

Go to 13

13

Is the month of A27 = Jul

Set A_STARTP to 12

3 The following SPSS code illustrates how to derive A_LEAVEP.

GET FILE=’……….Aims dataset’.

IF A27 < DATE>DMY(1,8, relevant academic year) A_STARTP=-99.
DO IF XDATE.YEAR(A27)=relevant academic year.
 IF XDATE.MON(A27)=8 A_STARTP=1.
 IF XDATE.MON(A27)=9 A_STARTP=2.
 IF XDATE.MON(A27)=10 A_STARTP=3.
 IF XDATE.MON(A27)=11 A_STARTP=4.
 IF XDATE.MON(A27)=12 A_STARTP=5.
ELSE IF XDATE.YEAR(A27)=relevant academic year+1.
 IF XDATE.MON(A27)=1 A_STARTP=6.
 IF XDATE.MON(A27)=2 A_STARTP=7.
 IF XDATE.MON(A27)=3 A_STARTP=8.
 IF XDATE.MON(A27)=4 A_STARTP=9.
 IF XDATE.MON(A27)=5 A_STARTP=10.
 IF XDATE.MON(A27)=6 A_STARTP=11.
 IF XDATE.MON(A27)=7 A_STARTP=12.
END IF.

VARIABLE LABELS A_STARTP "DV - Period Started in".
VALUE LABELS A_STARTP -99 "Before 1 August 04"
 1 "Period 1"
 2 "Period 2"
 3 "Period 3"
 4 "Period 4"
 5 "Period 5"
 6 "Period 6"
 7 "Period 7"
 8 "Period 8"
 9 "Period 9"
 10 "Period 10"
 11 "Period 11"
 12 "Period 12".

E_STARTP

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

Step

Condition

Action if true

Action if false

1

Is E08<= 1 Aug Relevant Academic year

Set E_STARTP to -99

Go to 2

2

Is the month of E08 = Aug

Set E_STARTP to 1

Go to 3

3

Is the month of E08 = Sep

Set E_STARTP to 2

Go to 4

4

Is the month of E08 = Oct

Set E_STARTP to 3

Go to 5

5

Is the month of E08 = Nov

Set E_STARTP to 4

Go to 6

6

Is the month of E08 = Dec

Set E_STARTP to 5

Go to 7

7

Is the month of E08 = Jan

Set E_STARTP to 6

Go to 8

8

Is the month of E08 = Feb

Set E_STARTP to 7

Go to 9

9

Is the month of E08 = Mar

Set E_STARTP to 8

Go to 10

10

Is the month of E08 = Apr

Set E_STARTP to 9

Go to 11

11

Is the month of E08 = May

Set E_STARTP to 10

Go to 12

12

Is the month of E08 = Jun

Set E_STARTP to 11

Go to 13

13

Is the month of E08 = Jul

Set E_STARTP to 12

5 The following SPSS code illustrates how to derive E_LEAVEP.

GET FILE=’……….ESF dataset’.

IF E08 < DATE>DMY(1,8, relevant academic year) E_STARTP=-99.
DO IF XDATE.YEAR(E08)=relevant academic year.
 IF XDATE.MON(E08)=8 E_STARTP=1.
 IF XDATE.MON(E08)=9 E_STARTP=2.
 IF XDATE.MON(E08)=10 E_STARTP=3.
 IF XDATE.MON(E08)=11 E_STARTP=4.
 IF XDATE.MON(E08)=12 E_STARTP=5.
ELSE IF XDATE.YEAR(E08)=relevant academic year+1.
 IF XDATE.MON(E08)=1 E_STARTP=6.
 IF XDATE.MON(E08)=2 E_STARTP=7.
 IF XDATE.MON(E08)=3 E_STARTP=8.
 IF XDATE.MON(E08)=4 E_STARTP=9.
 IF XDATE.MON(E08)=5 E_STARTP=10.
 IF XDATE.MON(E08)=6 E_STARTP=11.
 IF XDATE.MON(E08)=7 E_STARTP=12.
END IF.

VARIABLE LABELS E_STARTP "DV - Period Started in".
VALUE LABELS E_STARTP -99 "Before 1 August 04"
 1 "Period 1"
 2 "Period 2"
 3 "Period 3"
 4 "Period 4"
 5 "Period 5"
 6 "Period 6"
 7 "Period 7"
 8 "Period 8"
 9 "Period 9"
 10 "Period 10"
 11 "Period 11"
 12 "Period 12".

Creator

Analysis and MI Team

Date issued

28 September 2006

Date created

8 December 2005

Document ref.

G:\Organisational Data\DCA\A&MI\Documentation\web data dictionary\200607\DataDefinitions\SampleCode\nat-startperiodsamplecode-report-28sep2006.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: 29 Sep 06