InterviewSolution
| 1. |
State difference between Missover and Truncover in SAS. |
Answer»
Example: An external file with variable-length records, for example, contains the FOLLOWING records: 1 22 333 4444 55555Following are the steps to create a SAS data set using these data. The numeric informat 5 is used for this data step and the informatted length of the variable NUM is matched by only one input record. data readin; infile 'external-file' missover; input NUM 5.; run; PROC print data=readin; run;Output: Obs ID 1 . 2 . 3 . 4 . 5 55555Those values that were read from input records that were too short have been set to missing. This problem can be corrected by using the TRUNCOVER option in the INFILE statement:
Example: An external file with variable-length records, for example, contains the following records: 1 22 333 444455555Following are the steps to create a SAS data set using these data. The numeric informat 5 is used for this data step. data readin; infile 'external-file' truncover; input NUM 5.; run; proc print data=readin; run;Output: Obs ID 1 1 2 22 3 333 4 4444 5 55555Those values that were read from input records that were too short are not set to missing. |
|