09-01-2015
Ken_oy
Fluorite | Level 6
Member since
06-23-2011
- 128 Posts
- 18 Likes Given
- 0 Solutions
- 1 Likes Received
-
Latest posts by Ken_oy
Subject Views Posted 4840 05-08-2014 11:31 AM 23431 03-28-2014 04:24 PM 25581 03-28-2014 03:18 PM 5941 03-28-2014 02:05 PM 5941 03-28-2014 11:02 AM 6649 03-28-2014 10:36 AM 2019 03-26-2014 10:51 PM 2303 03-26-2014 07:37 PM 8702 01-16-2014 10:17 AM 9054 01-16-2014 10:09 AM -
Activity Feed for Ken_oy
- Got a Like for Re: how to avoid forever "collecting" status?. 12-07-2021 12:34 PM
- Posted how to use "do loop" with skips? on SAS Procedures. 05-08-2014 11:31 AM
- Posted Re: How to check if a macro variable is blank on SAS Programming. 03-28-2014 04:24 PM
- Liked Re: How to check if a macro variable is blank for ballardw. 03-28-2014 04:23 PM
- Posted How to check if a macro variable is blank on SAS Programming. 03-28-2014 03:18 PM
- Posted Re: Cannot modify a dataset after using %SYSFUNC on SAS Procedures. 03-28-2014 02:05 PM
- Liked Re: Cannot modify a dataset after using %SYSFUNC for art297. 03-28-2014 02:01 PM
- Posted Re: Cannot modify a dataset after using %SYSFUNC on SAS Procedures. 03-28-2014 11:02 AM
- Posted Cannot modify a dataset after using %SYSFUNC on SAS Procedures. 03-28-2014 10:36 AM
- Liked Re: Fill missing data points in table, need help for data_null__. 03-27-2014 02:02 PM
- Posted Re: Fill missing data points in table, need help on SAS Procedures. 03-26-2014 10:51 PM
- Posted Fill missing data points in table, need help on SAS Procedures. 03-26-2014 07:37 PM
- Liked Re: how to drop a series of variables in SAS for art297. 01-16-2014 05:48 PM
- Liked Re: how to drop a series of variables in SAS for Linlin. 01-16-2014 10:56 AM
- Posted Re: how to drop a series of variables in SAS on SAS Programming. 01-16-2014 10:17 AM
- Posted how to drop a series of variables in SAS on SAS Programming. 01-16-2014 10:09 AM
- Posted STARTPAGE= option on ODS RTF statement causes titles and footnotes to disappear on SAS Procedures. 01-09-2014 05:00 PM
- Posted Re: adding group number, use retain? or do loop? on SAS Programming. 11-20-2013 10:01 AM
- Liked Re: adding group number, use retain? or do loop? for Peter_C. 11-20-2013 10:01 AM
- Liked Re: adding group number, use retain? or do loop? for Reeza. 11-20-2013 10:01 AM
-
Posts I Liked
Subject Likes Author Latest Post 1 2 2 5 1 -
My Liked Posts
Subject Likes Posted 1 05-29-2013 12:16 PM
05-08-2014
11:31 AM
I want to do: %DO i = 1 %to 100; but I want to skip some numbers, e.g. let said 9, and 50; My code is: %DO i = 1 %TO 8; %FUNC; %END; %DO i = 10 %TO 49; %FUNC; %END; %DO i = 51 %TO 100; %FUNC; %END; Is there any way to make it more efficient? Thanks!!
... View more
03-28-2014
04:24 PM
Thanks, BallardW! But just curious that SAS does not have its own function for this. :smileygrin:
... View more
03-28-2014
03:18 PM
I tried to do: data test; test1; Var1 = Column_&col1.; run; But if the "&col" is empty then I would get a error warning in the log file. Is there a way to check whether my macro variable "&col" is empty? I tried : %if %length(&col.) = 0 %then %let col=blank; but it turned out the %length(&col) = 4; Any suggestions? Thanks!
... View more
03-28-2014
02:05 PM
Thanks Arthur! Your code works. It seems like that I have to use %sysfunc(close() ) to close the opened file. Am I correct? I used the following code to do the test. If I did not apply the %sysfunc(close() ) line, I would still get the same error. -------------------------------------------- data temp_data2; input t1 t2 t3; datalines; 1 2 3 ;run; %let dsid=%sysfunc(open(work.temp_data2,i)); %let nvar=%sysfunc(attrn(&dsid.,nvars)); %let rc=%sysfunc(close(&dsid.)); %put &nvar;
... View more
03-28-2014
11:02 AM
It doesn't work. Getting the following error: ERROR: Argument 1 to function CLOSE referenced by the %SYSFUNC or %QSYSFUNC macro function is not a number. ERROR: Invalid arguments detected in %SYSCALL, %SYSFUNC, or %QSYSFUNC argument list. Execution of %SYSCALL statement or %SYSFUNC or %QSYSFUNC function reference is terminated. ------------------EDITED---------------- I also tried %sysfunc on my other datasets. Getting the same error when I tried to modify the dataset again.
... View more
03-28-2014
10:36 AM
I keep getting this message after using %SYSFUNC: ERROR: You cannot open WORK.OUT_14.DATA for output access with member-level control because WORK.TEMP_DATA.DATA is in use by you in resource environment DMS Process. I tried to make a macro variable to show how many columns in my SAS dataset. I used the code: %let nvar=%sysfunc(attrn(%sysfunc(open(work.temp_data,i)),nvars)); but after using this code, I cannot modify TEMP_DATA any more. Any suggestions? Thanks!!
... View more
03-26-2014
10:51 PM
Thanks Reeza. Your answer is really helpful! But in some of my datasets, I have more than 300 status. Creating a new variable might not be long enough to cover all status. I am still thinking of using a do loop to read the first "1" and the last "1", and then go and follow your instruction 4.
... View more
03-26-2014
07:37 PM
I cannot write my own %do %until code to do what I wanted to do. I have a dataset (please see the first table. I want to convert the first table into the second table. Any missing status in between two "1"s should be marked as "1". Any help? Thanks!! ----- ID Status 1 Status 2 Status 3 Status 4 Status 5 Status 6 1 1 . . 1 . . 2 . 1 . 1 . . 3 1 . . . . 1 4 . 1 . . . . o, neeStatus 1 ID Status 1 Status 2 Status 3 Status 4 Status 5 Status 6 1 1 1 1 1 . . 2 . 1 1 1 . . 3 1 1 1. 1. 1. 1 4 . 1 . . . . Status 1
... View more
01-16-2014
10:09 AM
I want to drop/delete F1_flag, F2_flag, F3_flag, .... F99_flag from my dataset. How can I do this efficiently? Thanks
... View more
01-09-2014
05:00 PM
I am using SAS 9.3 when I tried to use ods rtf startpage=no; The title and the footnote of the second table disappeared. I found a link which is for SAS 8.X :5620 - STARTPAGE= option on ODS RTF statement causes titles and footnotes todisappear But it does not work for SAS 9.3. Does anyone have this issue? How to fix it? Thanks!
... View more
11-20-2013
10:01 AM
I make my own version too, thank you all for the ideas! data want; set test; retain group 0; if lag( id ) ne id then group +1; run;
... View more
11-19-2013
05:16 PM
I want to add a group number to the first dataset (see the second one). Does anyone know how? I cannot use sort because some categories have the same name. I can only determine the group by the existing data order. Thanks! dataset 1: a a b b b c c d d d b b dataset 2: a 1 a 1 b 2 b 2 b 2 c 3 c 3 d 4 d 4 d 4 b 5 b 5
... View more
07-19-2013
12:01 PM
Hi, esjackso1. Sorry that I did not myself clear. I did try the same code in EG, and it worked well. My question is: How can I know the name for the procedure result, (for example "Summary statistics" in PROC MEANS). In the regular SAS I can look this up from the left "result" window. but in EG I don't know where I can find the procedure result name that I can use for the ODS OUTPUT statement. I couldn't always remember all those procedure result names. Thanks
... View more
07-19-2013
11:28 AM
In the original SAS program, I could use "ods output" to export some of the results from some Proc procedures, I could make those p-values from t-tests, or means or SDs into a new data sets For example: ods output "Summary statistics"=means; proc means data=meg1 mean stderr q1 q3; class num velocity; var p; run; ods output close; In this step I can export the Proc means result in to dataset "means". I could see "Summary statistics" was listed on the left side for the SAS program "Result" window, so I could use the ODS OUTPUT statement to export it into a new data set. But in SAS enterprise guide there is no such "result" window, how can I do it? How to export procedure results into new datasets? Thanks!
... View more