DO IF NOT(SYSMIS)

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

DO IF NOT(SYSMIS)

Maria Suchard
Hello Fellow Listers,

I need help with the following code.
What I need this to do- is recode a variable based on if another variable has a value- therefore, the variable (subjidtfs_supp) not missing.
I am getting an error that says SYSMIS is an incorrect variable name.

Can anyone help me with what I am doing wrong with my code?
DO IF NOT(SYSMIS)(SUBJIDTFS_SUPP).
RECODE SURVTYPE (1=3) (2=4).
END IF.

With appreciation,
Maria
Reply | Threaded
Open this post in threaded view
|

Re: DO IF NOT(SYSMIS)

Bruce Weaver
Administrator
Take a look in the Command Syntax Reference manual (aka the FM).  Look under:

Universals > Missing values > Missing value functions > SYSMIS


Maria Suchard wrote
Hello Fellow Listers,

I need help with the following code.
What I need this to do- is recode a variable based on if another variable has a value- therefore, the variable (subjidtfs_supp) not missing.
I am getting an error that says SYSMIS is an incorrect variable name.

Can anyone help me with what I am doing wrong with my code?
DO IF NOT(SYSMIS)(SUBJIDTFS_SUPP).
RECODE SURVTYPE (1=3) (2=4).
END IF.

With appreciation,
Maria
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Re: DO IF NOT(SYSMIS)

Maria Suchard
Hi Bruce,

Thank you for your quick response.  I figured it out- my () we off.  Ref manual is good advice.  I will look there first next time.

Thanks again.
M
Reply | Threaded
Open this post in threaded view
|

Re: DO IF NOT(SYSMIS)

Gary Rosin
In reply to this post by Maria Suchard
You need to use Sysmis as a function. Take out the ")" after "SYSMIS" and
put it before the "."

DO IF NOT(SYSMIS(SUBJIDTFS_SUPP)).
RECODE SURVTYPE (1=3) (2=4).
END IF.


    ---

Prof. Gary S. Rosin                            Email:  [hidden email]
South Texas College of Law
1303 San Jacinto                                Voice:  (713) 646-1854
Houston, TX  77002-7000                    Fax:  (713) 646-1766



-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Maria Suchard
Sent: Thursday, June 26, 2014 4:19 PM
To: [hidden email]
Subject: DO IF NOT(SYSMIS)

Hello Fellow Listers,

I need help with the following code.
What I need this to do- is recode a variable based on if another variable
has a value- therefore, the variable (subjidtfs_supp) not missing.
I am getting an error that says SYSMIS is an incorrect variable name.

Can anyone help me with what I am doing wrong with my code?
DO IF NOT(SYSMIS)(SUBJIDTFS_SUPP).
RECODE SURVTYPE (1=3) (2=4).
END IF.

With appreciation,
Maria



--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/DO-IF-NOT-SYSMIS-tp5726597.htm
l
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: DO IF NOT(SYSMIS)

PRogman
In reply to this post by Maria Suchard
I belive the syntax
DO IF NOT MISSING(SUBJIDTFS_SUPP).
...
END IF.

would catch both system missing and user defined missing values

See: Command Syntax Reference > Universals>Missing values > Missing value functions
/PR
Reply | Threaded
Open this post in threaded view
|

Re: DO IF NOT(SYSMIS)

Mario Giesel
Why not just ...?

RECODE SURVTYPE (1=3) (2=4) INTO SURVTYPE_recoded.

Good luck,
  Mario


PRogman <[hidden email]> schrieb am 11:16 Mittwoch, 2.Juli 2014:


I belive the syntax
DO IF NOT MISSING(SUBJIDTFS_SUPP).
...
END IF.

would catch both system missing and user defined missing values

See: Command Syntax Reference > Universals>Missing values > Missing value
functions
/PR



--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/DO-IF-NOT-SYSMIS-tp5726597p5726637.html

Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD


===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Mario Giesel
Munich, Germany