• <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
        • ValueSet Statement
        • ValueSet.add Function
        • ValueSet.remove Function
        • ValueSet.clear Function
        • ValueSet.length Function
        • ValueSet.randomize Function
        • ValueSet.show Function
        • ValueSet.sort Function
      • Program Control Statements
      • Assignment Statements
      • Data Entry Statements and Functions
      • 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>

ValueSet.remove Function

Format
i = valueset_remove.remove(code);
Description
The ValueSet.remove function removes all values from a ValueSet object that have a code matching the specified numeric or string expression code. The type of the code must match the type of the value set.
When using a numeric value set with ranges—both from and to codes are defined—or defined special values, the function will remove a value only if it is the from value or if it is the special value.
Return Value
The function returns the number of values with the matching code that were removed from the value set. If the value set is read-only, the function returns default.
Example
PROC SECOND_FAVORITE_DRINK

preproc

   
ValueSet drink_valueset = FAVORITE_DRINK_VS;

    drink_valueset.
remove(FAVORITE_DRINK);

   
setvalueset(SECOND_FAVORITE_DRINK, drink_valueset);
See also: ValueSet Object, ValueSet.clear Function