Re: Counting #16033 (3/9/2010 6:16:00 PM) comp.soft-sys.sas Hi chowdary, You could use PROC FREQ and PROC TRANSPOSE and one or more data steps, but the following is a rather simple solution: DATA Want; SET Have; BY ID; * must already be sorted! ; IF (FIRST.ID) THE... jim
Re: Check if a Variable is Null or not #3046 (3/9/2010 9:56:37 AM) comp.soft-sys.sas Hi SL, I would do a PROC FREQ (to an output dataset) on such a variable to see the available values. If just one value is available and it is missing the variable name might be removed from a list of variables... jim
Re: Running SAS on PC, need to delete old compiled macro #3033 (3/9/2010 9:40:38 AM) comp.soft-sys.sas Hi Dan, Once SAS finds a/your source code macro for the first time it compiles it (to its work macro catalog) and never again searches for it during the run (the SAS session); that is quite logical. So it won'... jim
Re: Pass a variable as a macro parameter.015 (3/8/2010 1:44:32 PM) comp.soft-sys.sas Hi JS, If you goal is to double a string value using a macro it might be: %macro myMacro(strInput); TRIM(&strInput) || TRIM(&strInput) /* no semicolon */ %mend; data _null_; LENGTH myString2 $ 32; * ... jim
Re: OT: Chance to Make SAS-L History: Did You Know That... #262014 (3/8/2010 10:47:03 AM) comp.soft-sys.sas Hi Art, I don't quite understand the significance of your code. Could you indicate what you want to do with it? What is it's specific advantage? Your code resolves to: proc sort data=sashelp.class out=want; ... jim
Re: PROC TABULATE1243 (3/4/2010 4:39:59 PM) comp.soft-sys.sas Hi Mark,
It ain't easy, is it?
Confusing that DATA in the data and proc steps, just different!
Remove:
>Data Tabulate;
>set sales;
and change the PROC TABULATE statement to:
proc tabulate data=WEEK... jim
Re: converting a SSA datafile into Excel file #5048 (3/3/2010 5:39:55 PM) comp.soft-sys.sas Hi Mark, 1. are you sure the directory the SAS dataset is in is called "c:\demaoA2.xls"? 2. never forget the elementary (but indeed illogical) meaning of the DATA and the SET statement: the SET statement speci... jim
388169224 (3/13/2009 7:37:24 AM) comp.soft-sys.sas Every VTF_id occur 2 or three times in this database I would like to create a variable "count" added to each observation giving information about how many observations there is for each Vtf_id i have a sas sas... lars.ladfors(3)
Log Error1156 (3/1/2010 9:49:13 AM) comp.soft-sys.sas kindly help me in Log Error:-
libname sc 'c:\Sas';
proc reg data=sc.sales;
Model Score=Processor Memory Disk Video Battery / selection=stepwise
sle=.05
sld=.05;
plot student.*(Processor Memory Disk ... mark.chase91(19)
insert a decimal point1463 (3/2/2010 3:41:37 PM) comp.soft-sys.sas Hello all,
I have this import statement below and need to insert a decimal point
where there is non for the 7-digit variable COMP_RT_TA_CST_WRK and
the and the 9-digit variable amt. For example:
Varia... msussman(24)
converting a SSA datafile into Excel file5160 (3/2/2010 11:48:58 PM) comp.soft-sys.sas hello ,
I have a SAS datafile called " sales.sas7bdat ". I used the code -
libname sc "c:\demaoA2.xls";
data sc.sales;
set work.sales;
run;
proc print data = sales;
run;
The datafile is all rig... sidhukhanna9(1)
Pass a variable as a macro parameter.3599 (3/8/2010 12:56:14 PM) comp.soft-sys.sas Hi there,
I was wondering if anyone could help me with the following.
Imagine I have a simple macro that does some text manipulation e.g.
%macro myMacro(strInput);
%let strInput2 = &strInput &strI... js8765(10)
Check if a Variable is Null or not2357 (3/8/2010 5:56:18 PM) comp.soft-sys.sas Hello all,
I can see and check if a dataset is missing or not using something like
this,
%let dsid=%sysfunc(open(work.test,in));
%let nobs=%sysfunc(attrn(&dsid,nobs));
%if &dsid > 0 %then %let rc=%sysf... proccontents
Running SAS on PC, need to delete old compiled macro2171 (3/8/2010 8:15:11 PM) comp.soft-sys.sas Hi. SASLers:
I have been running SAS using VMS and batch submit for some time. I am
switching to SAS windows interactively. At present when I run the program,
I have logs accumulate from last time run. Tha... deniseyu001(68)
Counting1118 (3/9/2010 4:17:20 PM) comp.soft-sys.sas HI,
I have dataset as follows
data have;
id a
1 1
1 0
1 1
2 0
2 1
3 0
3 0
;
data want;
id a count1 count0;
1 1 2
2 1 1
3 0 2
;
I want number of '0' s in field ' a' as count0 and '1' s... aramakrishna.chowdary(24)