LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (April 2004)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 15 Apr 2004 08:40:15 +0200
Reply-To:   Spousta Jan <JSpousta@CSAS.CZ>
Sender:   "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:   Spousta Jan <JSpousta@CSAS.CZ>
Subject:   Re: Selecting cases
Content-Type:   text/plain; charset="iso-8859-2"

Hi Jose, I think that your advice is correct, but unnecessary complicated. If you write simply

select if index(yourvar,'CBC') > 0. exe.

(or - in case you need to be case insensitive - select if index(upcase(yourvar),'CBC') > 0. exe.)

then it will solve the task too and the code will be easy to produce and easy to read. Greetings Jan

-----Original Message----- From: Jose G. Benuzillo [mailto:jose.benuzillo@hci.utah.edu] Sent: Wednesday, April 14, 2004 7:36 PM To: SPSSX-L@LISTSERV.UGA.EDU Subject: Re: Selecting cases

* example data. Data list fixed /yourvar 1-20(A). begin data Basic Metabolic Panel CBC panel CBC CBC DBG cbc panel IGE end data.

compute flag=0. compute #flag1=INDEX(upcase(yourvar),'CBC')>0. if #flag1=1 flag=1. val lab flag 1 "present" 0 "absent". form flag (f1.0). list.

sel if flag=1.

Greetings,

Jose Benuzillo, M.A. Huntsman Cancer Institute Cancer Control and Population Sciences 2000 Circle of Hope Salt Lake City, UT 84112 801.585.6610

-----Original Message----- From: Collier, Debra M. (CIV) [mailto:collierd@nehc.med.navy.mil] Sent: Wednesday, April 14, 2004 11:02 AM To: SPSSX-L@LISTSERV.UGA.EDU Subject: Selecting cases

Hope all are well.

I wanted to know if anyone knew how to select cases for certain words that may be contained in a certain field? For example for you have:

Basic Metabolic Panel CBC panel CBC CBC DBG IGE

I want to be able to select all cases containing CBC regardless of what comes before it or after it. Can anyone help?

Thank you Debra

Huntsman Cancer Institute wishes to promote open communication while protecting confidential and/or privileged information. If you have received this message in error, please inform the sender and delete all copies.


Back to: Top of message | Previous page | Main SPSSX-L page