![]() Chapter Contents |
![]() Previous |
![]() Next |
| DATALINES |
| Valid: | in a DATA step |
| Category: | File-handling |
| Type: | Declarative |
| Aliases: | CARDS, LINES |
| Restriction: | Data lines cannot contain semicolons. Use DATALINES4 when your data contain semicolons. |
Syntax |
| DATALINES; |
Use the DATALINES statement with an INPUT statement to read data that you enter directly in the program, rather than data stored in an external file.
| Details |
SAS handles data line length with the CARDIMAGE system
option. If you use CARDIMAGE, SAS processes data lines exactly like 80-byte
punched card images padded with blanks. If you use NOCARDIMAGE, SAS processes
data lines longer than 80 columns in their entirety. Refer to
CARDIMAGE
for details.
The DATALINES statement does not provide input options for reading data. However, you can access some options by using the DATALINES statement in conjunction with an INFILE statement. Specify DATALINES in the INFILE statement to indicate the source of the data and then use the options you need. See Reading In-stream Data with Options.
| Comparisons |
| Examples |
data person; input name $ dept $; datalines; John Sales Mary Acctng ;
data person; infile datalines delimiter=','; input name $ dept $; datalines; John,Sales Mary,Acctng ;
| See Also |
Statements:
| |||||
System
Option:
|
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.