This is added immediately after the set statement, so that it is certain that SAS will encounter the length statement before it encounters any other mention of the variable. The length statement tells SAS that the new variable will be a string variable (if you add the dollar sign ($) as we have) and the length that should be allotted to the variable (in our example, 4). If SAS encounters an instant of the new variable before it encounters the length statement, it will set the maximum length of the variable as the length of the variable in that instance and this cannot be modified. In other words, if SAS encounters "Bill" as a the instance of name, it will set the length of the variable name to four (because "Bill" has four characters). If SAS later encounters a name with more than four characters, it will truncate it to four characters. If the length of name is set after SAS has encountered "Bill", it will ignore the length statement. Consider this simple data file having 9 subjects (sub) in 3 groups (iv) with a score on the dv (dv).