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 (May 2005, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 4 May 2005 19:50:41 GMT
Reply-To:   Max <PostResponse@HERE.TNX>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Max <PostResponse@HERE.TNX>
Subject:   Re: Syntax Question
Comments:   To: sas-l@uga.edu

Necia,

Thanks a lot for your explanations. Question:

> > There may be nothing wrong with the syntax, but "transformations" will not > get executed until SPSS encounters a procedure,

What is considered by SPSS as "procedure"?

OR, an execute command if > you have no procedure immediately following the transformations. Execute > would probably only be needed after the end of the END REPEAT, but you can > force execution with multiple execute commands if you like.

It appears I have no clue when to use "exec"!

> > The syntax you have shown has NO procedure listed. Have you ever noticed > the message "execution pending" while running a program? It's waiting for > something, like EXECUTE or a procedure, to trigger the running of the > "transformations". > > HTH. I really did like the days of syntax! > Cheers, > Necia > > Necia A. Black, Ph.D. e-mail: black@buffalo.edu > 246 Computing Center Web URL:http://www.acsu.buffalo.edu/~black > SUNY-Buffalo FAX: (716) 645-3734 > Buffalo, New York 14260 Phone: (716) 645-3572 > > On Tue, 3 May 2005, Max wrote: > >> Hi all, >> >> What is wrong with following syntax (SPSS 12)? It complains about "exec" >> inside DO REPEAT, but without "exec" values are not calculated for meds: >> >> /*------------------------------start----------------. >> compute meds = 0 . >> exec . >> >> DEFINE calc_meds (arg1 = !TOKENS(1)) >> compute dummy = 0. >> exec. >> IF (!arg1 ~= LAG(!arg1)) dummy = dummy+1 . >> exec. >> IF (dates >= DATE.DMY(13, 7, 1999)) dummy = dummy+LAG(dummy) . >> exec. >> compute meds = meds + dummy . >> exec. >> !ENDDEFINE. >> >> DO REPEAT medic = apo_acetaminophen TO spectrum.29 . >> calc_meds arg1 = medic . >> END REPEAT print. >> exec. >> /*----------------------------------end---------------. >> >> >> >> >


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