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 (November 1999, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 18 Nov 1999 17:54:28 -0500
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
Subject:      Re: Do Over in v7+
Comments: To: John Iwaniszek <john_iwaniszek@WORLDNET.ATT.NET>
Content-Type: text/plain; charset=US-ASCII


I don't know about your code, but here is a log from version 7.

NOTE: Copyright (c) 1998 by SAS Institute Inc., Cary, NC, USA. NOTE: SAS (r) Proprietary Software Version 7 (TS P1) Licensed to westat, Site XXXXXXXXXXXX. NOTE: This session is executing on the WIN_95 platform.

NOTE: SAS initialization used: real time 27.84 seconds

1 data w ; 2 array x x1 - x4 ; 3 do over x ; 4 x = ranuni (68605 ) ; 5 end ; 6 run ;

NOTE: The data set WORK.W has 1 observations and 4 variables. NOTE: DATA statement used: real time 1.87 seconds

Ian Whitlock <>

____________________Reply Separator____________________ Subject: Do Over in v7+ Author: John Iwaniszek <john_iwaniszek@WORLDNET.ATT.NET> Date: 11/18/1999 9:12 AM

I just found out that the DO OVER construct is not supported in version 7 (per SAS OnlineDoc, v7-1). Has anyone used this form in a verson 7+ setting? I use it in a macro that initializes retained variables. Clearly I can live without he form but it would be annoying to lose it for what appears to be no good reason.


/* - This macro initializes a set of like type (example - all numeric) variable to some common initial value on the first. of a legal by variable.

john Iwaniszek 7/2/99 2:18PM */

%macro fdot( _vlist, firstby=, initial=);

%global _arr ; %if &_arr= %then %let _arr=0;

%let _arr=%eval( &_arr+1);

array _f_&_arr &_vlist;

if first.&firstby then do; do over _f_&_arr; _f_&_arr=%unquote(&initial); end; end; %put NOTE: &_vlist set to &initial on first &firstby in by group.;

%mend fdot;

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