- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
I am new to SAS and trying to understand what does Put _infile_ Statement means?
Also If someone can help to understand what does input; means? As we have not declared any variable.
data _null_;
infile XYZ;
input ;
put _infile_;
run;
Warm Regards,
Saket
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Input tells SAS to read a line from the file.
_infile_ is the automatic variable that contains the input - usually the entire line but you can run into issues if the line is longer than expected.
See the documentation of PUT with the variable _infile_.
_INFILE_
writes the last input data record that is read either from the current input file or from the data lines that follow a DATELINES statement.
Tips:_INFILE_ is an automatic variable that references the current INPUT buffer. You can use this automatic variable in other SAS statements.
If the most recent INPUT statement uses line-pointer controls to read multiple input data records, PUT _INFILE_ writes only the record that the input pointer is positioned on.
Example:This PUT statement writes all the values of the first input data record:
input #3 score #1 name $ 6-23;
put _infile_;
Example:Writing the Current Input Record to the Log
_ALL_
writes the values of all variables, which includes automatic variables, that are defined in the current DATA step by using named output.
See:Named Output
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Input tells SAS to read a line from the file.
_infile_ is the automatic variable that contains the input - usually the entire line but you can run into issues if the line is longer than expected.
See the documentation of PUT with the variable _infile_.
_INFILE_
writes the last input data record that is read either from the current input file or from the data lines that follow a DATELINES statement.
Tips:_INFILE_ is an automatic variable that references the current INPUT buffer. You can use this automatic variable in other SAS statements.
If the most recent INPUT statement uses line-pointer controls to read multiple input data records, PUT _INFILE_ writes only the record that the input pointer is positioned on.
Example:This PUT statement writes all the values of the first input data record:
input #3 score #1 name $ 6-23;
put _infile_;
Example:Writing the Current Input Record to the Log
_ALL_
writes the values of all variables, which includes automatic variables, that are defined in the current DATA step by using named output.
See:Named Output