No external data is used. The script generates output text for demonstration purposes, using automatic variables from the SAS system.
1 Code Block
DATA STEP
Explanation : This DATA _NULL_ block does not create a SAS dataset but is used to direct output to the 'print' file. The FILE statement with options ll, line, page, ps, and ls activates and configures the automatic pagination and line variables. The DO loop executes the PUT statement 100 times, which writes a formatted text line, including the values of the automatic variables for page, line, and remaining lines.
Copied!
data _null_;
file print ll=linleft line=lin page=pagno ps=50 ls=80;
do x=1 to 100;
put 'Page ' pagno 'line number ' lin '- There are ' linleft 'lines left on this page';
end;
run;
put 'Page ' pagno 'line number ' lin '- There are ' linleft 'lines left on this page';
5
END;
6
RUN;
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. WeAreCAS is an independent community site and is not affiliated with SAS Institute Inc.
This site uses technical and analytical cookies to improve your experience.
Read more.