|
- Constructing DO Loops (3)
DO Loop Execution Using the form of the DO loop just presented, let's see how the DO loop executes in the DATA step This example calculates the interest earned each month for a one-year investment data finance earnings; Amount=1000; Rate= 075 12; do month=1 to 12; Earned+(amount+earned)*(rate); end; run; This DATA step does not read data from another source When submitted, it compiles and
- Modifying List Input (1)
You can make list input more versatile by using modified list input There are two modifiers that can be used with list input The ampersand ( ) modifier is used to read character values that contain embedded blanks The colon (:) modifier is used to read nonstandard data values and character values longer than eight characters, but without embedded blanks
- Accumulating Totals (2)
The sum statement adds the result of the expression on the right side of the plus sign (+) to the numeric variable on the left side of the plus sign Then the sum statement retains the new value for use in subsequent observations To find the total dollar amount for loan payments, you need a variable (in this example, TotalLoan) whose value begins at 0 and increases by the amount of the
- SAS OnlineTutor: Main Menu
Copyright© 2002 SAS Institute Inc , Cary, NC, USA All rights reserved Terms of Use Legal Information|Privacy Statement
- Line-Hold Specifiers
Trailing At Sign (@) Normally, each INPUT statement in a DATA step reads from a new record But when you use the @, the following occurs: the input pointer remains at the same line, rather than moving down to the next record
- Specifying Footnotes
where n is a number from 1 to 10 that specifies the footnote line and footnote-text is the actual footnote to be displayed
- Match-Merge Processing (3)
The Execution Phase: Match-Merging Observations After compiling the DATA step, SAS software sequentially match-merges observations by moving the pointers down each observation of each data set and checking to see whether the BY values match If Yes, the observations are written to the PDV in the order the data sets appear in the MERGE statement (Remember that values of any like-named variable
- Issuing SAS Commands
Some commands are specific to particular SAS windows In SAS OnlineTutor practices, for example, you should issue the COPY command from the command bar when the Program Editor window is active (or from the command line of the Program Editor window)
|
|
|