Skip to content

8 Data Input and Output ​

Data are the focus of the PSPP language. Each datum belongs to a case (also called an observation). Each case represents an individual or “experimental unit”. For example, in the results of a survey, the names of the respondents, their sex, age, etc. and their responses are all data and the data pertaining to single respondent is a case. This chapter examines the PSPP commands for defining variables and reading and writing data. There are alternative commands to read data from predefined sources such as system files or databases (See GET DATA.)

Note: These commands tell PSPP how to read data, but the data will not actually be read until a procedure is executed.

• BEGIN DATAEmbed data within a syntax file.
• CLOSE FILE HANDLEClose a file handle.
• DATAFILE ATTRIBUTESet custom attributes on data files.
• DATASETManage multiple datasets.
• DATA LISTFundamental data reading command.
• END CASEOutput the current case.
• END FILETerminate the current input program.
• FILE HANDLESupport for special file formats.
• INPUT PROGRAMSupport for complex input programs.
• LISTList cases in the active dataset.
• NEW FILEClear the active dataset.
• PRINTDisplay values in print formats.
• PRINT EJECTEject the current page then print.
• PRINT SPACEPrint blank lines.
• REREADTake another look at the previous input line.
• WRITEDisplay values in write formats.

基于 GNU PSPP 2.0.1 手册与入门教程整理