As a generic 'handy hint', the following code will reset a SAS session which has become corrupted and keeps erroring out:
;;;; * ( ( %* ' " ) ) */; %mend; run cancel;
Cheers,
Chris
Hi Bhanu. Not sure your dataset is structured too wonderfully, but this code will work providing your data is EXACTLY as you say - i.e. always having pairs of records where day is D-01 or D001 deprending on PRE- or POST-
data data2; set data1;
newvar=substr(hours,1,6);
run;
proc sort data =...
Intriguing question. I haven't tested this code, which I found here:
http://www.science.gmu.edu/stat362/02f/sas12.htm
but worth a try...
%MACRO MovAve(ds,v,ln);
%* This adds to the specified dataset, the moving
average of the specified variable over a given
length.
The name of the...
Hi
If it's the SAS log that's filling up, the following link gives a few options to prevent the messages from appearing...
http://support.sas.com/kb/5/888.html
Cheers,
Chris
Actually, thinking about it, a simpler way to get the same result would be to use proc sql, (no proc print required as sql output is automatically printed) - try this...
proc sql;
select
variable1, variable2, etc
from your_dataset
where mod(monotonic(),100000)=0
;
quit;
Hi - I think you need to create an observation number on your source dataset before doing the proc print. Try a variation of this:
data xx; set whatever;
zz=_n_;
run;
proc print data=xx;
where mod(zz,100000)=0;
run;
Hi all - basics of the problem are as follows:
I have a dataset with many records. Each contains 12 variables, representing the status of an account at the end of each month in a given year. Is there an easy way to compare these variables (without a lot of if - else statements).
I need to...
OK. The source dataset looks like this
1 10 50
2 10 10
3 20 60
4 10 10
5 20 10
6 10 70
7 10 40
8 30 30
9 20 10
12 10 10
It loops through fine until the value of IntLookUpValue hits 10, then the error is triggered at the statement
If IsError(myVar =...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.