Your code is creating only a single dummy variable named EDUCAGD. You do assign it, and re-assign its value several times.
Instead, you need to assign values to three different dummy variables:
IF _educag = 1 THEN educagd1=1; ELSE educagd1 = 0; IF _educag = 2 THEN educagd2=1; ELSE educagd2 = 0; IF _educag = 3 THEN educagd3=1; ELSE educagd3 = 0;
Also note, most of the time it is not necessary to create these at all. The procedure that you use might be able to create the right number of dummy variables automatically. (See if the procedure you use will support a CLASS statement.)
... View more