a month ago
simmwa
Fluorite | Level 6
Member since
03-02-2020
- 10 Posts
- 14 Likes Given
- 1 Solutions
- 1 Likes Received
-
Latest posts by simmwa
Subject Views Posted 383 04-06-2025 11:15 PM 994 06-19-2023 12:32 AM 1019 06-18-2023 11:52 PM 1350 07-07-2021 01:55 AM 1379 07-06-2021 11:47 PM 1415 07-06-2021 10:38 PM 1387 03-23-2021 11:35 PM 1488 03-23-2021 06:58 PM 488 03-10-2020 05:49 PM 601 03-02-2020 06:56 PM -
Activity Feed for simmwa
- Posted Re: SAS EG 4.2: Dropping objects from process flow on SAS Enterprise Guide. 04-06-2025 11:15 PM
- Tagged Re: SAS EG 4.2: Dropping objects from process flow on SAS Enterprise Guide. 04-06-2025 11:15 PM
- Liked Re: csv import with text qualifier for RacheLGomez123. 09-10-2023 11:55 PM
- Liked Re: Auto Indenter bug ? for Patrick. 09-08-2023 01:52 AM
- Liked Re: Automatically open output when running query in project in SAS EG 8 for RPYee. 09-08-2023 01:47 AM
- Liked Automatically open output when running query in project in SAS EG 8 for tdswart. 09-08-2023 01:24 AM
- Liked Re: Automatically open output when running query in project in SAS EG 8 for carran084. 09-08-2023 01:24 AM
- Liked Re: Proc Import delimiters using SAS Prompts for SASKiwi. 06-19-2023 01:33 AM
- Liked Re: Can I define global variables to a project across process flows? for TomKari. 06-19-2023 01:24 AM
- Posted Re: Proc Import delimiters using SAS Prompts on SAS Programming. 06-19-2023 12:32 AM
- Tagged Proc Import delimiters using SAS Prompts on SAS Programming. 06-18-2023 11:53 PM
- Tagged Proc Import delimiters using SAS Prompts on SAS Programming. 06-18-2023 11:53 PM
- Tagged Proc Import delimiters using SAS Prompts on SAS Programming. 06-18-2023 11:53 PM
- Posted Proc Import delimiters using SAS Prompts on SAS Programming. 06-18-2023 11:52 PM
- Liked Re: Export multiple sas file into multiple excel worksheet of a single workbook for Kurt_Bremser. 04-16-2023 09:24 PM
- Liked Re: Aggregate rows based on groups for PeterClemmensen. 05-03-2022 07:49 PM
- Liked Re: accidental change in my cursor for Shmuel. 01-17-2022 11:59 PM
- Posted Re: How to output two dimensional array? on SAS Programming. 07-07-2021 01:55 AM
- Liked Re: How to output two dimensional array? for Astounding. 07-07-2021 12:50 AM
- Posted Re: How to output two dimensional array? on SAS Programming. 07-06-2021 11:47 PM
-
Posts I Liked
Subject Likes Author Latest Post 1 1 1 1 1 -
My Liked Posts
Subject Likes Posted 1 03-10-2020 05:49 PM
04-06-2025
11:15 PM
I have been looking for a solution for this for years. Just realised today that the easiest way for me is to CTRL-A select everything in your process flow, then CTRL-select to deselect the programs/outputs you want to keep and hit delete. You can visually check from the supplied list that you are deleting the unwanted outputs.
... View more
- Tags:
- delete drop
06-19-2023
12:32 AM
Below seems to work with double quotes (not sure why single quotes fails) with the Prompt setting mydelim to either 09, 7E or 2C proc import
datafile=&in_file.
out=outfile
dbms=dlm
replace;
delimiter="&mydelim."x;
run;
... View more
06-18-2023
11:52 PM
I wish to use the below code to import txt files with one of the following delimiters : '09'x '7E'x '2C'x This works fine if I use e.g. %let mydelim='09'x; directly in my code. But I want to assign one of the delimiters using SAS Prompts and it wont work with hex values. Any suggestions? proc import
datafile=&in_file.
out=outfile
dbms=dlm
replace;
delimiter=&mydelim.;
run;
... View more
07-07-2021
01:55 AM
Not completely sure why, but this mod seems to work. Thanks !!! Proc Tabulate - Using a character variable in the VAR Statement proc format library=work;
invalue mtype
'@' = 1
'&' = 2
'%' = 3
;
value mtype
1 = '@'
2 = '&'
3 = '%'
;
run;
data wantdev3;
informat myname mtype.;
format myname mtype.;
do rows = 'aaa', 'bbb', 'ccc', 'ddd';
do cols = 'eee', 'fff', 'ggg';
if cols in ('fff', 'ggg') and rows = 'bbb' then myname = 1;
else myname= 2;
output;
end;
end;
run;
proc tabulate data=wantdev3 ;
var myname;
class rows cols;
table rows, cols*myname=' '*sum=' '*f=mtype.;
run;
... View more
07-06-2021
11:47 PM
Thanks Astounding, but what if I want the 0,1 to be character not numeric? In fact you could change the '0'to '@'
... View more
07-06-2021
10:38 PM
I want to use proc print or something to display a table like this below. I have been trying to use arrays, but maybe I'm on the wrong track. aaa bbb ccc ddd eee 0 0 0 0 fff 0 1 0 0 ggg 0 1 0 0 This is my code so far which doesnt work. data want (keep=C1-C12);
array fname {4} $ 3 ('aaa', 'bbb', 'ccc', 'ddd');
array sname {3} $ 3 ('eee', 'fff', 'ggg');
array C3SP {4,3} $ 1 C1-C12;
do i = 1 to 4;
do j = 1 to 3;
if sname[j] in ('fff', 'ggg') and fname[i] = 'bbb' then myname = '1';
else myname= '0';
C3SP[i,j] = myname;
put C3SP[i,j]=;
output;
end;
end;
run;
... View more
03-23-2021
11:35 PM
Thanks @qoit it works perfectly !
... View more
03-23-2021
06:58 PM
I need some code that will loop through all variables in a dataset, and check each variable for missing values. If any missing are found then fill with # characters (or value 9) based on the length of that particular variable. Here is my poor attempt: data want;
dsid=open("have", "i");
n_vars=attrn(dsid, "nvars");
do i=1 to n_vars;
Name=varname(dsid, i);
Type=vartype(dsid, i);
set have;
if missing(Name) then do;
if Type = 'C' then
Name = repeat('#', length(Name));
else
Name = repeat(9, length(Name));
end;
end;
rc=close(dsid);
run;
... View more
- Tags:
- missing
03-10-2020
05:49 PM
1 Like
SAS Technical support were able to replicate and are now working on a fix.
... View more
03-02-2020
06:56 PM
The following "do I=1 to 2" code will fail after Auto Indenter is run using CTRL-I on SAS EG. The error only occurs when the do loop is part of an "else if" condition. data have;
input col1$ col2;
datalines;
a 0123
b 345
b 456
d 711189
x
u 3033
w 1234567890
run;
data want1;
set have;
if col1 = 'b' then do;
new = cats('b', col2); output; end;
else if col1 = 'd' then do i= 1 to 2;
if i = 1 then do; new = cats('d', col2); output; end;
if i = 2 then do; new = cats('db', col2); output; end;
end;
run;
data want2;
set have;
if col1 = 'b' then do i= 1 to 2;
if i = 1 then do; new = cats('b', col2); output; end;
if i = 2 then do; new = cats('bc', col2); output; end;
end;
else if col1 = 'd' then do;
new = cats('d', col2); output; end;
run; After CRTL-I there is an extra semi colon between the do and I = 1 to 2 data want1;
set have;
if col1 = 'b' then
do;
new = cats('b', col2);
output;
end;
else if col1 = 'd' then
do;
i= 1 to 2;
if i = 1 then
do;
new = cats('d', col2);
output;
end;
if i = 2 then
do;
new = cats('db', col2);
output;
end;
end;
run; Is there some Indenter option I have set incorrectly ?
... View more