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 (March 2003)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 4 Mar 2003 19:49:41 -0500
Reply-To:     Raynald Levesque <rlevesque@videotron.ca>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Raynald Levesque <rlevesque@videotron.ca>
Subject:      Re: SELECTION CASE IN A LOOP
In-Reply-To:  <40bd976a159e9c87.159e9c8740bd976a@unitec.edu>
Content-type: text/plain; charset=US-ASCII

Hi

The question is not crystal clear but this should get you going:

*////////////. DEFINE !use (beg=!TOKENS(1) /end=!TOKENS(1) /incr=!TOKENS(1)) !LET !delta=!SUBSTR(!BLANK(!incr),2)

!DO !cnt=!beg !TO !end !BY !incr !LET !cnt2=!LENGTH(!CONCAT(!BLANK(!cnt),!delta)) USE !cnt THRU !cnt2. !DOEND !ENDDEFINE. *////////////.

SET MPRINT=yes. !use beg=1 end=50 incr=5. * gives. 2681 M> USE 1 THRU 5. 2682 M> USE 6 THRU 10. 2683 M> USE 11 THRU 15. 2684 M> USE 16 THRU 20. 2685 M> USE 21 THRU 25. 2686 M> USE 26 THRU 30. 2687 M> USE 31 THRU 35. 2688 M> USE 36 THRU 40. 2689 M> USE 41 THRU 45. 2690 M> USE 46 THRU 50.

!use beg=7 end=48 incr=6. * gives. 2707 M> USE 7 THRU 12. 2708 M> USE 13 THRU 18. 2709 M> USE 19 THRU 24. 2710 M> USE 25 THRU 30. 2711 M> USE 31 THRU 36. 2712 M> USE 37 THRU 42. 2713 M> USE 43 THRU 48.

Regards

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 Cesar Ortega Sent: March 4, 2003 10:07 AM To: SPSSX-L@LISTSERV.UGA.EDU Subject: SELECTION CASE IN A LOOP

EXECUTE .

But instead of a fixed value number 1 and 5, I need them to be 2 variables in a DO loop incrementing in for intance 5.

use 6 thru 10 use 11 thru 15 use 16 thru 20

and so on for 1000 iterations.

Thanks for your kind response,

Cesar

>


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