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 (February 2002)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 22 Feb 2002 17:35:30 +0100
Reply-To:     Hanna Zaremba <h.zaremba@cbos.pl>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Hanna Zaremba <h.zaremba@cbos.pl>
Subject:      add command to the macro
Content-Type: text/plain; charset="iso-8859-2"

Dear List,

Does anybody know a way to add command to the macro. Raynald Levesque bild a macro wicg solv my problem of listin errors. The macro is grate, a have modify it and if works fine. I notice that some kind of errors coul be recode outomaticly , by adding if command before listing errors. Could someone help with addig following satement to this macro.

if ((w=0) & (z=0) ) z=v. if ((v=0) & (z=0) ) z=w.

here is the macro:

> > SET MPRINT=no. > *////////////////. > DEFINE !lsterr (stem=!TOKENS(1) > /vbeg=!TOKENS(1) > /wdelta=!TOKENS(1) > /zdelta=!TOKENS(1) > /vend=!TOKENS(1) > /step=!TOKENS(1)) > > !DO !vidx=!vbeg !TO !vend !BY !step > !LET !widx=!LENGTH(!CONCAT(!BLANK(!wdelta),!BLANK(!vidx))) > !LET !zidx=!LENGTH(!CONCAT(!BLANK(!zdelta),!BLANK(!vidx)))

here shoul be command outomaticly recodding erros- something like that

if ((w=0) & (z=0) ) z=v. if ((v=0) & (z=0) ) z=w. if ( (!CONCAT(!stem,!widx)=0) & (!CONCAT(!stem,!zidx)=0)) !CONCAT(!stem,!zidx)=!CONCAT(!stem,!vidx). if ( (!CONCAT(!stem,!vidx)=0) & (!CONCAT(!stem,!zidx)=0)) !CONCAT(!stem,!zidx)=!CONCAT(!stem,!widx).

But it doesn't wont to work. Coul someone correct it.

> TEMPORARY. > SELECT IF !CONCAT(!stem,!vidx)+!CONCAT(!stem,!widx)<>!CONCAT(!stem,!zidx). > LIST v1 !CONCAT(!stem,!vidx) !CONCAT(!stem,!widx) !CONCAT(!stem,!zidx). > !DOEND > !ENDDEFINE.

I thank in advance for every suggestion.

Hanna Zaremba CBOS, Warszawa ul. Zurawia 4a,

> Hi Hanna > > The following shows how to solve your first series of tests. A similar > approach can be used for the other test. > > DATA LIST LIST /a. > BEGIN DATA > 1 > END DATA. > > NUMERIC v1 TO v200(F8.0). > > > SET MPRINT=no. > *////////////////. > DEFINE !lsterr (stem=!TOKENS(1) > /vbeg=!TOKENS(1) > /wdelta=!TOKENS(1) > /zdelta=!TOKENS(1) > /vend=!TOKENS(1) > /step=!TOKENS(1)) > > !DO !vidx=!vbeg !TO !vend !BY !step > !LET !widx=!LENGTH(!CONCAT(!BLANK(!wdelta),!BLANK(!vidx))) > !LET !zidx=!LENGTH(!CONCAT(!BLANK(!zdelta),!BLANK(!vidx))) > TEMPORARY. > SELECT IF !CONCAT(!stem,!vidx)+!CONCAT(!stem,!widx)<>!CONCAT(!stem,!zidx). > LIST v1 !CONCAT(!stem,!vidx) !CONCAT(!stem,!widx) !CONCAT(!stem,!zidx). > !DOEND > !ENDDEFINE. *////////////////. > > SET MPRINT=yes. > !lsterr stem=v vbeg=44 wdelta=2 zdelta=4 vend=574 step=10. > > HTH > > Raynald Levesque rlevesque@videotron.ca > Visit my SPSS Pages http://pages.infinit.net/rlevesqu/index.htm > > > -----Original Message----- > From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU]On Behalf Of > Hanna Zaremba > Sent: February 20, 2002 7:42 AM > To: SPSSX-L@LISTSERV.UGA.EDU > Subject: listing errors > > > Dear List, > > We need to list cases & variables with errors from a file with hundreds of > variables. > > For example, for some variables(v,w,z) we need to verify if the equations > V+W=Z are thru, > > If not - list caseid (=v1) V,W,Z. > > > > > > **I BLOK of varables. > > > > ** VECTOR V=v43 to v573 by 10. > > ** VECTOR W=v45 to v575 by 10. > > ** VECTOR Z=v47 to v577 by 10. >


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