• <GetStart>
  • CSPro User's Guide
    • The CSPro System
    • Data Dictionary Module
    • The CSPro Language
    • Data Entry Module
    • Batch Editing Applications
    • Tabulation Applications
    • Data Sources
    • CSPro Statements and Functions
      • Statement Format Symbols
      • Alphabetical List of Functions and Statements
      • List of Reserved Words
      • Deprecated Features
      • Declaration Statements
      • Symbol Functions
      • Item Functions
      • Array Object
      • Audio Object
      • Barcode and QR Codes
      • Case Object
      • Document Object
      • File Object
      • Freq Object
      • Geometry Object
      • HashMap Object
      • Image Object
      • List Object
      • Map Object
      • Path
      • Pff Object
      • SystemApp Object
      • ValueSet Object
      • Program Control Statements
      • Assignment Statements
      • Data Entry Statements and Functions
        • Accept Function
        • Advance Statement
        • Ask Statement
        • ChangeKeyboard Function
        • Connection Function
        • DeMode Function
        • Display Orientation
        • EditNote Function
        • EndLevel Statement
        • EndGroup Statement
        • Enter Statement
        • GetCaptureType Function
        • GetCaseLabel Function
        • GetDeviceID Function
        • GetImage Function
        • GetNote Function
        • GetOperatorId Function
        • GetOS Function
        • GetRecord Function
        • GetUserName Function
        • GPS Function
        • Interactive GPS Modes
        • HideOcc Function
        • Highlighted Function
        • InAdvance Function
        • IsPartial Function
        • IsVerified Function
        • Move Statement
        • NoInput Statement
        • OnChangeLanguage Global Function
        • OnChar Global Function
        • OnKey Global Function
        • OnStop Global Function
        • OnSystemMessage Global Function
        • Prompt Function
        • Protect Function
        • PutNote Function
        • RandomizeVS Function
        • Reenter Statement
        • SavePartial Function
        • SelCase Function
        • Set Attributes Statement
        • Set Behavior CanEnter Statement
        • SetCapturePos Function
        • SetCaptureType Function
        • SetCaseLabel Function
        • Set ErrMsg Statement
        • SetFont Function
        • SetOperatorId Function
        • Show Function
        • ShowArray Function
        • ShowOcc Function
        • Skip Statement
        • Userbar Function
        • VisualValue Function
      • Batch Edit Statements
      • Numeric Functions
      • String Functions
      • Multiple Occurrence Functions
      • General Functions
      • Date and Time Functions
      • External File Functions
      • Synchronization Functions
    • Templated Reporting System
    • HTML and JavaScript Integration
    • Action Invoker
    • Appendix
  • <CSEntry>
  • <CSBatch>
  • <CSTab>
  • <DataViewer>
  • <TextView>
  • <TblView>
  • <CSFreq>
  • <CSDeploy>
  • <CSPack>
  • <CSDiff>
  • <CSConcat>
  • <Excel2CSPro>
  • <CSExport>
  • <CSIndex>
  • <CSReFmt>
  • <CSSort>
  • <ParadataConcat>
  • <ParadataViewer>
  • <CSCode>
  • <CSDocument>
  • <CSView>
  • <CSWeb>

Skip Statement

Formats
skip ʃtoʅ field_name;

skip ʃtoʅ next ʃmultiply_occurring_field_nameʅ;

skip;
Description
The skip statement skips to the field_name given. The field must be forward in the path; that is, it must be located after the current field. The argument field_name is either the name of a field, or it is a string variable specifying the name of the field. If the field you wish to skip to has multiple occurrences and you are not skipping from a field within the same repeating form or roster, the target occurrence number must be specified to skip to the correct occurrence.
The next keyword skips to the next occurrence of multiply_occurring_field_name. If the target field is on the same repeating form or roster as the current field, control will move to the next occurrence of the target field. If not, control will move to the first occurrence of the target field. Occurrence numbers cannot be used with the next keyword.
When using the next keyword without the optional target field, control passes to the next occurrence of the current repeating form or roster, with the target field as the first field in that form or roster. This is a useful way to skip to the beginning of the next occurrence.
If using skip without specifying a target field, then control passes to the next field in the application. This targetless skip can only occur in the preproc of a field, roster, form, or user-defined function. CSPro will automatically figure out what the target field should be, as it does with an ask statement.
The target field can be located in any record at the same level as the current field, but it cannot be located at a different level. The field must be later on the path than the current field, meaning that it is a field that has not yet been entered. If the field has already been entered, an error message will be displayed during data entry. If you do not know whether the field is earlier in the data path, use the move statement.
When a skip statement is executed, the preproc of the target field will be executed but none of the statements between the skip statement and the preproc of the target field will be executed. Skipped fields are assigned the special value of notappl.
Note that the skip statement behaves differently from the advance statement, skipping past some number of fields, rather than moving over the fields.
Example 1
PROC ATTENDED_SCHOOL_YN

   
if ATTENDED_SCHOOL_YN = 2 then
       
skip to REASON_NEVER_ATTEND;
   
endif;
Example 2
PROC CHILDREN_EVER_BORN

preproc

   
if SEX = 1 or AGE < 12 then
       
skip to next;
   
endif;
Example 3
PROC MARRIAGE_AGE

preproc

   
if MARITAL_STATUS = 1 then
       
skip;
   
endif;
See also: Advance Statement, Ask Statement, Move Statement, Reenter Statement