Raynald's SPSS Tools
  • Syntax
    • SPSS Syntax Home
    • Sample Syntax Library
    • Learning Syntax
    • Debugging SPSS Syntax
    • Standard Data Files
  • Macros
    • SPSS Macros — Home
    • Sample Macro Library
    • Learning Macros
    • Debugging Macros
    • Kirill's SPSS Macros Page
  • Scripts
    • SPSS Scripts — Home
    • Sample Scripts Library
    • Learning Scripts
    • The Asynchronous Problem
  • Python
    • Python Scripts Home
    • Sample Python Library
  • R
    • R Scripts — Home
    • Sample R Library
  • Resources
    • Resources Overview
    • Blog
    • Links to SPSS (and not only SPSS) resources
    • SPSS Programming and Data Management Book
  • Sitemap
  • Feedback
  • en
    • Русский
    • Español
    • Portugues
    • Deutsch
    • Français
    • Italiano
  1. Home
  2. Syntax
  3. Sample Syntax Library
  4. Read, Write or Create Data

Read, Write or Create Data

  • Adding new cases using syntax
  • Add variable equal to function of an existing Var
  • Copy some variables from each record type 1 to add a new record of type 0
  • A few simple examples of INPUT PROGRAM
  • Create consecutive records at the end of the file
  • Create constants for each non missing date
  • Define new variables in empty data set
  • Define varx to vary
  • Duplicate cases n times where n is variable
  • Expand crosstab data into original data file
  • Expand data x and y times
  • Fill the gaps when Aggregate has empty categories
  • Generate random dates
  • INPUT program (to generate a random data file)
  • Insert missing cases (within id)
  • Insert missing dates(within id)
  • Printing date time in output
  • Read ASCII (logical case is made up of 5 rows of 10 cases)
  • Read ASCII file using FILE TYPE
  • Read ASCII file using INPUT PROGRAM
  • Read ASCII file with a forward slash delimiter
  • Read a variable number of records per case
  • Example of data list
  • Example of INPUT program
  • Read data inline File Type MIXED Records
  • Read ASCII file with comma or dash delimited data
  • Read ASCII file with comma separated data (within quotes)
  • Read ASCII file with fixed and free data
  • Read ASCII file with FIXED Data
  • Read ASCII with comma and dot separated decimals
  • Read text file where n columns are to be ignored
  • Skip first 6 Records
  • Skip one line of data
  • Read ASCII file with REPEATING data
  • Read complex file
  • Read data files that has no carriage returns
  • Read data produced by CGI script
  • Read data where each case has 4 numeric records and a variable number of string records
  • Write comma or tab delimited file
  • Write frequency percentages to data file
  • Write missing values as a dot
  • Write special ASCII file
  • Writing value labels instead of values
  • Read comma delimited fields with commas inside quoted strings
  • Read comments between the lines of data
  • Read data list free with consecutive commas
Related pages

...

Navigate from here
  • Sample Syntax Library
  • Random Sampling
  • Regression, Repeated Measures
  • Adding new cases using syntax
  • Get random page
  • Back to top

 


 

Raynald's SPSS Tools © 2001–2025, Raynald Levesque, Anton Balabanov. Click to learn more: About the project