Skip to main content

ZBUSPCODE_1.1.2

Back to C20072

Field description Field abbreviation Field version Field length Field type
Postcode of self-employment / own business ZBUSPCODE 1.1.2 8 Char

Valid entries

Code Label
. A valid full, outward or area postcode consistent with the November version of the ONS Postcode Directory (ONSPD)

Dependent fields

  • XBUSLOCUC
  • XBUSLOCGR

Depend upon fields

  • BUSEMPPCODE

Additional information

This algorithm cleans up the postcode provided by a graduate responding to the Graduate Outcomes survey question "What was the postcode of your business or the main business you were working for during census week?" (BUSEMPPCODE). It uses the latest November version of the ONS Postcode Directory (ONSPD) data.

ZBUSPCODE will be a full postcode of length 8 (with a space in position 5); length 7 (with a space in position 4); length 6 (with a space in position 3); an outward postcode of length 3 or 4 (no space); an area postcode of length 1 or 2 (no space) or 99999999 (missing).

Contains OS data, © Crown copyright and database right 2020
Contains Royal Mail data, © Royal Mail copyright and database right 2020
Source: Office for National Statistics licensed under the Open Government Licence v.3.0

Geographical mappings for Northern Ireland are based upon Crown Copyright and are reproduced with the permission of Land Property Services under delegated authority from the Keeper of Public Records, Crown copyright and database right 2020. NIMA MOU577.4

Technical Specification

The algorithm uses the HESA Data Management table D_postcode which is created from the ONS Postcode Directory (ONSPD) and restricted to the November YYYY update (postcode mapping is valid at this date), where YYYY represents the year following the academic year of collection. For graduate outcomes 2017/18, the November 2019 ONSPD data is used. The table includes the following fields: Full Postcode (PostCode, VARCHAR(8)), Outward Postcode (OutwardPostcode, VARCHAR(4)) and Area Postcode (AreaCode, VARCHAR(2)).

1. Convert the string from BUSEMPPCODE to upper case.

2. Trim white space from beginning and end of the string.

3. Remove special characters using list below*.

4. Remove all spaces within string.

5. Where length of string is greater than 7 set to 99999999.

6. Where the string is not NULL or the empty string:

  • Where length of string = 7, insert a space in position 5.
  • Where length of string = 6, insert a space in position 4.
  • Where length of string = 5, insert a space in position 3.

7. Correct postcode formats: Replace a zero in the first position for O and replace zeros in the second position which follow the letters P, S, C and Y with O. So, for example, 0X, P0, S0, C0 and Y0 become OX, PO, SO, CO and YO.

8. Where length of resulting string = 6,7 or 8, lookup to the values in D_postcode.PostCode:

  • if the string exists in the field D_postcode.PostCode, retain the string.
  • else truncate the string up to the space, leaving the outward postcode.

9. Where length of the resulting string = 2, 3 or 4, lookup to the values in D_postcode.OutwardPostcode:

  • if the string looks up to the D_postcode.OutwardPostcode, retain the string.
  • else truncate the string up taking only the first letters of the string (this will be one or two letters).

10. Where length of the resulting string = 1 or 2, lookup to the values in D_Postcode.AreaCode:

  • if the string looks up to D_Postcode.AreaCode, retain the string.
  • else set to 99999999.

*Special characters include: ! " # $ % & ' ( ) * + , \ - . / : ; < = > ? @ [ ] ^ _ ` { | } ~

Revision history

Date Version Notes
2020-03-18 1.1.2 Copyright information added

Contact Liaison by email or on +44 (0)1242 388 531.