you can use the group-processing nodes in SAS EM to do this. You use a Start Group and an End-Group Node and put the nodes that need to be included in the loop in between the start and end node. Set the property "Mode" in the Start group node to "Stratify" and then open the Variables window. In there set the property "Grouping Role" of your index variable to "Stratification". For example, a variable like gender with 2 classes would then create 2 models automatically.
For more information refer to the SAS EM online help in the section Node Reference --> Utility --> Start Group Node.