以下是目录:
目录
第一部分 column input 4
一 Writing a DATA Step Program 4
1 Writing a DATA Step Program 4
2 Column Input 4
3 Describing the Data 4
4 Specifying Variable Names 5
二 Submitting the DATA Step Program 5
1 Verifying the Data 5
2 Checking DATA Step Processing 6
3 Listing the Data Set 6
4 Invalid Data 6
三 Creating and Modifying Variables 6
1 Syntx: 6
2 Using Operators in SAS Expressions 6
3 Date Constants 7
四 Subsetting Data 8
五 Reading Instream Data 8
六 Creating a Raw Data File 9
1 Specifying the Raw Data File 9
2 Describing the Data 9
七 Additional Features 10
八 summary 10
1 Reading Data from an External File or Reading Instream Data 10
2 Creating a Raw Data File 10
3 Sample Programs 11
第二部分 format input 12
一 Review of Column Input 12
1 Column Input Features 12
二 Identifying Nonstandard Numeric Data 13
三 Using Formatted Input 13
1 The General Form of Formatted Input 13
2 Using the @n Column Pointer Control 13
3 The +n Pointer Control 14
四 Using Informats 15
1 Reading Character Values 15
2 Reading Standard Numeric Data 15
3 Reading Nonstandard Numeric Data 16
4 DATA Step Processing of Informats 16
五 Record Formats 17
1 Variable-Length Records 17
2 The PAD Option 18
六 SUMMARY 18
第三部分 list input 20
一 Free-Format Data 20
二 Using List Input 20
1 Processing List Input 21
2 Working with Delimiters 21
3 Reading a Range of Variables 22
4 Limitations of List Input 23
三 Reading Missing Values 23
1 Reading Missing Values at the End of a Record 23
2 Reading Missing Values at the Beginning or Middle of a Record 24
四 Specifying the Length of Character Values 25
五 Modifying List Input 26
1 Reading Values That Contain Embedded Blanks 26
2 Using the & Modifier with a LENGTH Statement 27
3 Using the & Modifier with an Informat 27
4 Reading Nonstandard Values 27
5 Processing the DATA Step 28
6 Comparing Formatted Input and Modified List Input 28
六 Creating Free-Format Data 29
1 Specifying a Delimiter 30
2 Using the DSD Option 30
3 Reading Values That Contain Delimiters Within a Quoted String 31
七 Mixing Input Styles 32
八 Additional Features 32
九 SUMMARY 33
第四部分 Read date and time 34
一 How SAS Stores Date Values 34
二 Reading Dates and Times with Informats 34
1 MMDDYYw. Informat 34
2 DATEw. Informat 35
3 TIMEw. Informat 35
4 DATETIMEw. Informat 35
5 YEARCUTOFF= SAS System Option 36
三 Using Dates and Times in Calculations 37
四 Using Date and Time Formats 37
1 The WEEKDATEw. Format 37
2 The WORDDATEw. Format 38
五 SUMMARY 39
第五部分 Create record from multiple records 40
一Using Line Pointer Controls 40
1 The Forward Slash (/) Line Pointer Control 40
2 Sequential Processing of Multiple Records in the DATA Step 40
二 Reading Multiple Records Non-Sequentially 41
三 Combining Line Pointer Controls 41
四 SUMMARY 42
第六部分 Create multiple records from one record 43
一 Reading Repeating Blocks of Data 43
1 Holding the Current Record with a Line-Hold Specifier 44
2 Using the Double Trailing At Sign (@@) to Hold the Current Record 44
二 Reading the Same Number of Repeating Fields 45
1 Using the Single Trailing At Sign (@) to Hold the Current Record 45
2 More Efficient Programming 46
3 Processing a DATA Step That Contains an Iterative DO Loop 46
三 Reading a Varying Number of Repeating Fields 47
1 Using the MISSOVER Option 47
2 Executing SAS Statements While a Condition Is True 48
3 Creating a Counter Variable 48
4 Completing the DO WHILE Loop 48
5 Processing a DATA Step That Has a Varying Number of Repeating Fields 48
第七部分 Read Hierarchical files 50
一Creating One Observation per Detail Record 50
1 Retaining the Values of Variables 50
2 Processing a DATA Step That Creates One Observation per Detail Record 51
二 Creating One Observation per Header Record 53
三 Lesson Summary 55
第八部分 READ VARLENGTH FILE 56
一 Reading Variable-Length Fields 56
二 Reading Records That Have a Varying Number of Fields 57