r/code • • Oct 08 '23

Help Please What’s wrong with my IF statement?

Post image

I’m creating new variables. My first variable, Age_Grp went through easily, but every variable after I get the 180-322 error, “Statement is not valid or it is used out of proper order” How?!??! It is almost the same code as my Professor and i just CANNOT pin point what is wrong. The highlight is where the error begins, at my Ped_Act variable. I used proc import and formatting, which all went smoothly. HELP

0 Upvotes

5 comments sorted by

View all comments

Show parent comment

2

u/spliffen Oct 09 '23

really wasnt trying to be condescending tho, Im mighty tired atm, that might have had an effect, but... honestly the amount of people that makes very poor attempts at getting help, and then being unhappy when it dont happen, is way too high around here, and just to make my point, never done any SAS code, the if then else structure made me think of qbasic... so wouldnt have been much help anyways :D

0

u/massexposure Oct 09 '23

I’m not unhappy with the sub haha, I’m glad I did a little independent trouble shooting, it helps me grasp this stuff better. Sorry my attempt was perceived as ‘very poor’. My unsolicited advice would be to ditch all the ellipsis, it comes off a bit self righteous.