Greetings, first time poster, novice/intermediate user. I have a SAS data set consisting of the following variables: NIIN PLANT SLOC replen2 COUNT NUM NIIN is the part number, all distinct entries PLANT is the source, all the same (2001) SLOC is the responsible entity for that NIIN (271 distinct entries) COUNT is the numeric count of individual SLOC in the file (i.e. SLOC ABCD has 76,890 entries, EFGH has 250, etc.) NUM is the count from 1 to total observations in the file (1,922,802) From this data, I need to create SAS data sets based on the following criteria: Total NUM in the new datasets can't exceed 500,000 per data set The SLOC entry can't be divided between the data sets (all ABCD must go into one data set...while not exceeding the 500,000 obs limit per set) The issue is when I extract the first 500,000 obs, it falls right in the middle of one of the SLOCs. How do I configure SAS to create datasets based on the criteria mentioned above? The input file (NIIN PLANT SLOC replen2 COUNT NUM) will change each time I run the program. Thanks in advance for any assistance.
... View more