I'm am reletively new to SAS and i am trying to write some code to split up a character string and import it into a table. Most of what i have done works ok but i am having problems with the following:
The file that i am reading from contains a few thousend rows like this:
The problem comes when its gets to the ,, fields. It ignores the fact that it is empty and just pushes everything along one column. I have tried writing IF statements to fill the empty cells but that did not help.
Welcome to the wonderful (full of wonder) rich world of SAS and SAS programming.
SAS was originally written for non-programmers, so there is generally an easy or easier way of doing things.
You are doing this the hard way.
The easy way is
INFILE indata delimiter=',' dsd;
INPUT Username balance pending_bonus_balance total_bonus poker_nickname has_played_poker_download last_bonus last_bonus_date poker_rates;
This code example is not perfect, I haven't tested it.
Find the Web online documentation for BaseSAS for 9.1.x or your version of SAS and begin reading.
SAS is not your normal programming language. It is data centric and meant to simplify the programming process of reading data in, processing the data, and reporting on the results of the processing. It is very rich in features, it is so extensive, I expect no one knows all of it in complete detail.