- Jul 16, 2001
- 7,567
- 156
- 106
I've got an input file that's supposed to come in once per month, and I've been working on some SAS code that would work on this file and output something meaningful. It's a comma delimited input file that looks like this...
user_id=1234,user=joe,page=home,company=AMD
user_id=2345,user=adam,page=support,company=INTEL
If the file were actually this simple I'd just create four fixed variables and read in user_id, user, page, and company, but unfortunately, it's not. There are going to be roughly 100-150 variables, and the bad part is that month to month, this number may change. For instance, this month I get in that file and each line contains 120 variables. Next month, the file might contain 125 variables, and in October, contain 115 variables.
Do you guys have any thoughts on a way I could write the input code to smartly catch all variables every month without having to re-hardcode the program every month?
user_id=1234,user=joe,page=home,company=AMD
user_id=2345,user=adam,page=support,company=INTEL
If the file were actually this simple I'd just create four fixed variables and read in user_id, user, page, and company, but unfortunately, it's not. There are going to be roughly 100-150 variables, and the bad part is that month to month, this number may change. For instance, this month I get in that file and each line contains 120 variables. Next month, the file might contain 125 variables, and in October, contain 115 variables.
Do you guys have any thoughts on a way I could write the input code to smartly catch all variables every month without having to re-hardcode the program every month?