Choose Language Hide Translation Bar

recoding & conditional function

I am a recent convert to JMP and SAS from SPSS and am trying to recode data entry errors in script in order to document the decisions and changes made to the data file. I am trying to use conditional functions to do so but am not seeing the anticipated results.

For example, I want to change 888 values to 0 (but keep all other values the same) for a numeric variable 'detainer' and use the following script:

detainer = If(detainer==888,0, detainer);

When I run the script and check the data file for changes, I don't see the change and I don't get an error message.

What am I missing?

0 Kudos

Re: recoding & conditional function

Try this instead:

for each row(

In JMP, the "else" case can be omitted if you don't want to do anything.
0 Kudos

Re: recoding & conditional function

brilliant -- thank you so much!

is there a guide that would have shown me this? i am trying to get a handle on the scripting language and am at a loss of which reference might be the most help?

thanks again!
0 Kudos

Re: recoding & conditional function

The JMP Scripting Guide is invaluable if you're trying to get a handle on scripting. If you don't have a hardcopy of it, you can find it under Help->Books->Scripting Guide.
0 Kudos