• <Helps for GetStart>
  • CSPro User's Guide
    • The CSPro System
    • Data Dictionary Module
    • The CSPro Language
    • Data Entry Module
    • Batch Editing Applications
    • Tabulation Applications
    • CSPro Statements and Functions
      • Statement Format Symbols
      • Alphabetical List of Functions and Statements
      • List of Reserved Words
      • Deprecated Features
      • Declaration Statements
      • Array Object
      • Audio Object
      • Barcode
      • File Object
      • HashMap Object
      • List Object
      • Map Object
      • Path
      • Pff Object
      • SystemApp Object
      • ValueSet Object
      • Program Control Statements
      • Assignment Statements
      • Data Entry Statements and Functions
      • Batch Edit Statements
        • EndCase Statement
        • Export Statement
        • GetDeck Function
        • PutDeck Function
        • Set Behavior Export Statement
        • SetOutput Function
        • Skip Case Statement
      • Numeric Functions
      • String Functions
      • Multiple Occurrence Functions
      • General Functions
      • Date and Time Functions
      • External File Functions
      • Synchronization Functions
    • Templated Reporting System
    • Appendix
  • <Helps for CSEntry>
  • <Helps for CSBatch>
  • <Helps for CSTab>
  • <Helps for DataViewer>
  • <Helps for TextView>
  • <Helps for TblView>
  • <Helps for TRSWin>
  • <Helps for CSDeploy>
  • <Helps for CSPack>
  • <Helps for CSFreq>
  • <Helps for CSSort>
  • <Helps for CSExport>
  • <Helps for CSReFmt>
  • <Helps for CSDiff>
  • <Helps for CSConcat>
  • <Helps for TRSSetup>
  • <Helps for ParadataViewer>
  • <Helps for ParadataConcat>
  • <Helps for CSIndex>
  • <Helps for Excel2CSPro>
  • <Helps for CSWeb>

PutDeck Function

Format:

f = putdeck(array-name,numeric-expression[,override-dim1,override-dim2,override-dim3]);

 

Description:

The putdeck function updates the value in the DeckArray hotdeck using the current values in the items identified by the value sets used in the declaration of the DeckArray. The function automatically recodes the values and accesses the proper cell in the hotdeck, where it places the value of the numeric-expression. If any of the dimensions of the DeckArray are not value set dimensions, you must specify the numeric index when calling the function.

 

If a (+) is specified after the array-name, the "leftover" rows for the hotdeck will also be updated with the value. See the leftover rows page for more information.

 

Return value:

The function returns 1 if successful or DEFAULT in the case that the values supplied are not valid entries in the value sets and thus could not be recoded to a proper cell in the hotdeck.

 

Example:

array education_HD_SexAge(SEX_VS,AGE_FOR_EDUCATION_HD_VS) save;

...

PROC EDUCATION

    putdeck(education_HD_SexAge,EDUCATION); // use current values for sex and age
    putdeck(education_HD_SexAge,EDUCATION,1); // override sex only
    putdeck(education_HD_SexAge,EDUCATION,,28); // override age only
    putdeck(education_HD_SexAge,EDUCATION,1,28); // override both value and age

 

See also: DeckArrays, DeckArray Leftover Rows, Getdeck Function