Original site: www.cdc.gov/epiinfo/user-guide/check-code/syntax.html | RestoredCDC.org is an independent project, not affiliated with CDC or any federal entity. Visit CDC.gov for free official information. Due to archival on January 6, 2025, recent outbreak data is unavailable. Videos are not restored. Access data.restoredcdc.org for restored data. Use of this site implies acceptance of this disclaimer.

[More]
About Us Report Bug

RestoredCDC.org Comparison

Removed: Line removed from cdc.gov. Specific word removals are highlighted.
Added: Line added to cdc.gov. Specific word additions are highlighted.
Injected: Line or disclaimer added by RestoredCDC.org.
Unchanged: Line unchanged.
Original site: www.cdc.gov/epiinfo/user-guide/check-code/syntax.html | RestoredCDC.org is an independent project, not affiliated with CDC or any federal entity. Visit CDC.gov for free official information. Due to archival on January 6, 2025, recent outbreak data is unavailable. Videos are not restored. Access data.restoredcdc.org for restored data. Use of this site implies acceptance of this disclaimer.
[More]
About Us Report Bug Compare Content
Skip directly to site content Skip directly to search
Español | Other Languages
Here's how you know
An official website of the United States government Here's how you know
Epi Info™
Epi Info™
Centers for Disease Control and Prevention. CDC twenty four seven. Saving Lives, Protecting People Epi Info™
Search
Search Menu Navigation Menu
Submit
Epi Info™
* Getting Started
* Epi Info™ for Windows
* Epi Info™ for Web
* Support & Resources
+ BACK
Getting Started
Support & Resources
+ System Requirements
+ Downloads
+ Conventions Used in this Guide
o BACK
+ Navigating Epi Info 7
Downloads
+ Syntax Notations
o BACK
+ Tech Support and Contacts
Support & Resources Downloads
+ Acknowledgements
o
- BACK
Downloads
- BACK
Support & Resources Downloads
- Previous Versions
- Shapefiles
- Translations
- Epi Info™ Home
o Epi Info™ Home
+ User Guide
o BACK
User Guide
o BACK
Support & Resources User Guide
o Getting Started
o Form Designer
o Check Code
o Enter Data
o Web Survey
o Companion for Android
o Data Packager
o Visual Dashboard
o Classic Analysis
o Maps
o Nutritional Anthropometry
o StatCalc
o Command Reference
o Functions & Operators
o Epi Info™ Home
+ FAQs
+ Help Desk
+ User Community Q&A
+ Tutorials
+ Epi Info™ Home
* Form Designer
* Epi Info™ Annual Report
+ BACK
* The Epi Info™ Story
Form Designer
+ Introduction
+ Navigate the Workspace
+ Open a Recent Project
+ Create a New Project
+ Tips Before You Begin
+ New Project from Template
+ New Form in Existing Project
+ Open Existing Project
+ Close Project
+ Pages
+ Undo/Redo
+ Check Code
+ Entering Data
+ Fields
o BACK
Fields
o BACK
Form Designer Fields
o Label/Title
o Text
o Text Uppercase
o Multiline
o Number
o Phone Number
o Date
o Time
o Date-Time
o Checkbox
o Yes-No
o Option
o Command Button
o Image
o Mirror
o Grid
o Legal Value
o Comment Legal
o Codes
o Relate
o Group
o Field Attributes
o Epi Info™ Home
+ Tab Order
+ Templates
+ Insert Line
+ Upgrade a Project
+ Make a PRJ File
+ Delete Data Tables
+ Data Dictionary
+ Make Form from Data Table
+ Epi Info™ Home
* Check Code
+ BACK
Check Code
+ Program Editor
+ Navigating the Editor
+ Check Code Commands
+ More Commands
+ EpiWeek Function
+ Check Code Syntax
+ Epi Info™ Home
* Enter Data
+ BACK
Enter Data
+ Navigate the Workspace
+ Entering Data
+ Save a Page or Record
+ Find Records
+ Epi Info™ Home
* Web Survey
+ BACK
Web Survey
+ System Deployment
+ Designing Forms for Web
+ Supported Field Types
+ Supported Commands
+ Check Code Performance
+ Web Survey Compatibility
+ Initial Setup
+ Publish a Form
+ Invite Participants
+ Access the Survey URL
+ Submitting Responses
+ Saving a Partial Survey
+ Importing Survey Results
+ Epi Info™ Home
* Companion for Android
+ BACK
Companion for Android
+ Initial Set Up
+ Designing for Mobile
+ Copy Form to Mobile Device
+ Mobile Data Collection
+ Data Transfer
+ Cloud Synchronization
+ StatCalc on Mobile Devices
+ Analyze Data
+ Epi Info™ Home
* Data Packager
+ BACK
Data Packager
+ Package for Transport
+ Import from Package
+ Epi Info™ Home
* Visual Dashboard
+ BACK
Visual Dashboard
+ Select Data Source
+ Analysis Gadgets
o BACK
Analysis Gadgets
o BACK
Visual Dashboard Analysis Gadgets
o Line List
o Frequency
o Word Cloud
o Combined Frequency
o M x N / 2 x 2 Table
o Matched Pair Case-Control
o Means
o Duplicates List
o Charts
o Advanced Statistics
o Epi Info™ Home
+ Working with Canvases
+ Defining Variables
+ Data Filters
+ Display and Gadget Filters
+ Data Dictionary
+ Report Gadgets
+ Epi Info™ Home
* Classic Analysis
+ BACK
Classic Analysis
+ Manage Data
+ ASSIGN Command
+ Manage Variables
+ Select Records
+ Display Stats and Records
+ Manage Output
+ User-Defined Commands
+ Create User Interaction
+ Advanced Statistics
+ Epi Info™ Home
* Maps
+ BACK
Maps
+ Basic Tools
+ Basic Functions
+ Save
+ Add a Data Layer
+ Case Cluster
+ Choropleth/Dot Density Maps
+ Base Layer
+ Epi Info™ Home
* Translation
+ BACK
Translation
+ How to Translate Epi Info
+ Create New Language MDB
+ Use Existing Language MDB
+ Choose a Language to Use
+ Epi Info™ Home
* Nutritional Anthropometry
+ BACK
Nutritional Anthropometry
+ The Nutrition Project
+ NutStat Growth Charts
+ Nutrition Functions
+ Epi Info™ Home
* StatCalc
+ BACK
StatCalc
+ Introduction
+ Tables (2 x 2, 2 x n)
+ Population Survey or Descriptive Study
+ Cohort and Cross-Sectional
+ Unmatched Case-Control
+ Chi Square for Trend
+ Poisson
+ Binomial
+ Matched Pair Case-Control
+ Visual Dashboard
+ OpenEpi
+ Epi Info™ Home
* Command Reference
+ BACK
Command Reference
+ Analysis Commands
o BACK
Analysis Commands
o BACK
Command Reference Analysis Commands
o ASSIGN
o BEEP
o Cancel SELECT
o Cancel SORT
o CLOSEOUT
o COXPH
o DEFINE
o DEFINE DLLOBJECT
o DEFINE GROUP
o DELETE FILE/TABLE
o DELETE RECORDS
o DIALOG
o DISPLAY
o EXECUTE
o FREQ (Frequency)
o GRAPH
o IF-THEN-ELSE
o KMSURVIVAL
o LIST
o LOGISTIC
o MEANS
o MERGE
o PRINTOUT
o QUIT
o READ
o RECODE
o REGRESS
o RELATE
o ROUTEOUT
o RUNPGM
o SELECT
o SET
o SORT
o SUMMARIZE
o TABLES
o TYPEOUT
o UNDEFINE
o UNDELETE
o WRITE
o Epi Info™ Home
+ Check Code Commands
o BACK
Check Code Commands
o BACK
Command Reference Check Code Commands
o AFTER / END-AFTER
o ASSIGN
o AUTOSEARCH
o BEEP
o BEFORE / END-BEFORE
o CLEAR
o CLICK / END-CLICK
o COMMENTS (*)
o DEFINE
o DEFINE DLLOBJECT
o EXECUTE
o GOTO
o HIDE
o IF-THEN-ELSE
o NEWRECORD
o UNHIDE
o Epi Info™ Home
+ Epi Info™ Home
* Functions & Operators
* Epi Info™ Home
Epi Info™
Epi Info™ Home
Check Code: Customizing the Data Entry Process
Check Code Syntax
Check Code: Customizing the Data Entry Process
Print
PAGE 7 of 9
‹View Table of Contents
Related Pages
Proper Check Code Syntax
Using the proper check code syntax is important based on the field type.
Here are some examples of the proper syntax to use based on the field type:
* Assign the “Age” field (numeric field type) the value 24
+ ASSIGN Age = 24
* Assign the ‘Ill’ field (Yes/No field type) the value No
+ ASSIGN Ill = (-)
* Assign the ‘AteChicken’ field (checkbox field type) the value Yes
+ ASSIGN AteChicken = (+)
* Assign the ‘DateOfInterview’ field (Date field type) the value 5/5/2012
+ ASSIGN DateOfInterview = 5/5/2012
* Assign the ‘CaseStatus’ field (legal values field type) the value “Confirmed”
+ ASSIGN CaseStatus = “Confirmed”
* Assign the ‘Gender’ field (Comment Legal field) the value “F”. The field is coded as M-Male, F-Female.
* Assign the ‘Sex’ field (Comment Legal field) the value “F”. The field is coded as M-Male, F-Female.
+ ASSIGN Gender = “F”
+ ASSIGN Sex = “F”
Check Code
1. Check Code Introduction
2. Accessing Check Code Program Editor
3. Navigate the Check Code Program Editor
4. Check Code Commands
5. Additional Check Code Commands
6. How to use EpiWeek Function
7. ›Proper Check Code Syntax
8. Chapter 3: Check Code – Full Chapter [PDF - 1M]
9. Chapter 3: Check Code – Full Chapter [DOCX - 7M]
Last Reviewed: September 16, 2022, 12:00 pm
Last Reviewed: September 16, 2022, 12:00 PM
Source: Office of Public Health Data, Surveillance, and Technology
* Facebook
* Twitter
* LinkedIn
* Syndicate
home User Guide
home Epi Info™
* Getting Started plus icon
* Epi Info™ for Windows
+ System Requirements
* Epi Info™ for Web
+ Conventions Used in this Guide
* Support & Resources plus icon
+ Navigating Epi Info 7
+ Downloads plus icon
+ Syntax Notations
o plus icon
+ Tech Support and Contacts
- Previous Versions
+ Acknowledgements
- Shapefiles
* Form Designer plus icon
- Translations
+ Introduction
+ User Guide plus icon
+ Navigate the Workspace
o Getting Started
+ Open a Recent Project
o Form Designer
+ Create a New Project
o Check Code
+ Tips Before You Begin
o Enter Data
+ New Project from Template
o Web Survey
+ New Form in Existing Project
o Companion for Android
+ Open Existing Project
o Data Packager
+ Close Project
o Visual Dashboard
+ Pages
o Classic Analysis
+ Undo/Redo
o Maps
+ Check Code
o Nutritional Anthropometry
+ Entering Data
o StatCalc
+ Fields plus icon
o Command Reference
o Label/Title
o Functions & Operators
o Text
+ FAQs
o Text Uppercase
+ Help Desk
o Multiline
+ User Community Q&A
o Number
+ Tutorials
o Phone Number
* Epi Info™ Annual Report
o Date
* The Epi Info™ Story
o Time
o Date-Time
o Checkbox
o Yes-No
o Option
o Command Button
o Image
o Mirror
o Grid
o Legal Value
o Comment Legal
o Codes
o Relate
o Group
o Field Attributes
+ Tab Order
+ Templates
+ Insert Line
+ Upgrade a Project
+ Make a PRJ File
+ Delete Data Tables
+ Data Dictionary
+ Make Form from Data Table
* Check Code plus icon
+ Program Editor
+ Navigating the Editor
+ Check Code Commands
+ More Commands
+ EpiWeek Function
+ Check Code Syntax
* Enter Data plus icon
+ Navigate the Workspace
+ Entering Data
+ Save a Page or Record
+ Find Records
* Web Survey plus icon
+ System Deployment
+ Designing Forms for Web
+ Supported Field Types
+ Supported Commands
+ Check Code Performance
+ Web Survey Compatibility
+ Initial Setup
+ Publish a Form
+ Invite Participants
+ Access the Survey URL
+ Submitting Responses
+ Saving a Partial Survey
+ Importing Survey Results
* Companion for Android plus icon
+ Initial Set Up
+ Designing for Mobile
+ Copy Form to Mobile Device
+ Mobile Data Collection
+ Data Transfer
+ Cloud Synchronization
+ StatCalc on Mobile Devices
+ Analyze Data
* Data Packager plus icon
+ Package for Transport
+ Import from Package
* Visual Dashboard plus icon
+ Select Data Source
+ Analysis Gadgets plus icon
o Line List
o Frequency
o Word Cloud
o Combined Frequency
o M x N / 2 x 2 Table
o Matched Pair Case-Control
o Means
o Duplicates List
o Charts
o Advanced Statistics
+ Working with Canvases
+ Defining Variables
+ Data Filters
+ Display and Gadget Filters
+ Data Dictionary
+ Report Gadgets
* Classic Analysis plus icon
+ Manage Data
+ ASSIGN Command
+ Manage Variables
+ Select Records
+ Display Stats and Records
+ Manage Output
+ User-Defined Commands
+ Create User Interaction
+ Advanced Statistics
* Maps plus icon
+ Basic Tools
+ Basic Functions
+ Save
+ Add a Data Layer
+ Case Cluster
+ Choropleth/Dot Density Maps
+ Base Layer
* Translation plus icon
+ How to Translate Epi Info
+ Create New Language MDB
+ Use Existing Language MDB
+ Choose a Language to Use
* Nutritional Anthropometry plus icon
+ The Nutrition Project
+ NutStat Growth Charts
+ Nutrition Functions
* StatCalc plus icon
+ Introduction
+ Tables (2 x 2, 2 x n)
+ Population Survey or Descriptive Study
+ Cohort and Cross-Sectional
+ Unmatched Case-Control
+ Chi Square for Trend
+ Poisson
+ Binomial
+ Matched Pair Case-Control
+ Visual Dashboard
+ OpenEpi
* Command Reference plus icon
+ Analysis Commands plus icon
o ASSIGN
o BEEP
o Cancel SELECT
o Cancel SORT
o CLOSEOUT
o COXPH
o DEFINE
o DEFINE DLLOBJECT
o DEFINE GROUP
o DELETE FILE/TABLE
o DELETE RECORDS
o DIALOG
o DISPLAY
o EXECUTE
o FREQ (Frequency)
o GRAPH
o IF-THEN-ELSE
o KMSURVIVAL
o LIST
o LOGISTIC
o MEANS
o MERGE
o PRINTOUT
o QUIT
o READ
o RECODE
o REGRESS
o RELATE
o ROUTEOUT
o RUNPGM
o SELECT
o SET
o SORT
o SUMMARIZE
o TABLES
o TYPEOUT
o UNDEFINE
o UNDELETE
o WRITE
+ Check Code Commands plus icon
o AFTER / END-AFTER
o ASSIGN
o AUTOSEARCH
o BEEP
o BEFORE / END-BEFORE
o CLEAR
o CLICK / END-CLICK
o COMMENTS (*)
o DEFINE
o DEFINE DLLOBJECT
o EXECUTE
o GOTO
o HIDE
o IF-THEN-ELSE
o NEWRECORD
o UNHIDE
* Functions & Operators
Related Links
* Epi Info™ 7 Tutorial Videos
* Epi Info™ 7 User Guide
* Epi Info™ Community Questions & Answers
* ActivEpi Web - explains concepts and methods
* OpenEpi - makes computations
* About CDC
* Contact Us
* 800-232-4636
Facebook Twitter Instagram LinkedIn Youtube Pinterest Snapchat
Facebook Twitter Instagram LinkedIn Youtube Pinterest Snapchat RSS
* CONTACT CDC
Contact Us
Call 800-232-4636
Email Us
* ABOUT CDC
+ About CDC
+ Jobs
+ Funding
* POLICIES
+ Accessibility
+ External Links
+ Privacy
+ Policies
+ Web Policies
+ No Fear Act
+ FOIA
+ OIG
+ No Fear Act
+ Nondiscrimination
+ Vulnerability Disclosure Policy
+ CDC Archive
+ Public Health Publications
+ HHS.gov
+ USA.gov
* CONNECT WITH US
+ Facebook
+ Twitter
+ Instagram
+ LinkedIn
+ Youtube
+ Pinterest
+ Snapchat
+ Email
* LANGUAGES
+ Español
+ 繁體中文
+ Tiếng Việt
+ 한국어
+ Tagalog
+ Русский
+ العربية
+ Kreyòl Ayisyen
+ Français
+ Polski
+ Português
+ Italiano
+ Deutsch
+ 日本語
+ فارسی
+ English
* U.S. Department of Health & Human Services
* Accessibility
* External Links
* Privacy
* Policies
* Web Policies
* FOIA
* OIG
* No Fear Act
* FOIA
* Nondiscrimination
* OIG
* Vulnerability Disclosure Policy
* CDC Archive
* Public Health Publications
* HHS.gov
* USA.gov
Content Credential
×
This image was edited or created using GenAI (generative artificial intelligence).
Our experts review all images in an effort to ensure accuracy and quality before use.
Learn more about CDC's usage of GenAI.
Note: Comparison ignores leading/trailing whitespace and certain script/tracking codes. Word-level highlighting (optional above) only applies to changed lines.