Validate Pressure Fields with a Missing-Value Code

A pressure logger stores measurements in kPa. A sentinel is a reserved code representing a missing measurement; this logger uses -999. Validate each raw field using the following rules, stopping as soon as a status is assigned.

  1. Assign missing if the field is empty or contains exactly -999.
  2. Otherwise, assign format if the entire field cannot be read as a finite decimal number. A unit written inside the field is not permitted.
  3. Otherwise, assign range if the number is outside 0≤p≤3000 \leq p \leq 300 kPa.
  4. Assign accept if all three checks pass.

The label EMPTY represents a field containing no characters. All other entries show the exact field contents. Enter exactly one of accept, missing, format or range for each row.


Four connected boxes show missing-value, numeric-format and inclusive-range checks followed by acceptance.


RecordRaw fieldStatus
A0
B300
C300.1
D-999
E18 kPa
FEMPTY
G-0.5

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Data Validation Questions: