yesterday
ChrisHemedinger
Community Manager
Member since
08-25-2015
- 5,268 Posts
- 3,806 Likes Given
- 555 Solutions
- 4,007 Likes Received
About
<p>Chris is the Director of SAS User Engagement. His talented team looks after SAS online communities, SAS user groups, developer experience and GitHub, tech newsletters, expert webinars and tutorials. Chris is a recovering software developer who helped build popular SAS products such as SAS Enterprise Guide. Inexplicably, Chris is still coasting on the limited fame he earned as an author of <em>SAS For Dummies</em>. </p>
You can follow Chris at <a href="http://blogs.sas.com/content/sasdummy">The SAS Dummy blog</a> and on Twitter as<a href="http://twitter.com/cjdinger"> @cjdinger</a>.</p>
-
Latest posts by ChrisHemedinger
Subject Views Posted 143 2 weeks ago 536 3 weeks ago 673 3 weeks ago 1990 3 weeks ago 2048 3 weeks ago 329 3 weeks ago 697 3 weeks ago 785 3 weeks ago 786 3 weeks ago 873 3 weeks ago -
Activity Feed for ChrisHemedinger
- Liked Re: Another way(and simpler) to solve practice question m104p11 on page 224 ,Macro1: Essentials pdf for quickbluefish. a week ago
- Liked Enhancements to the SAS Programming Run-Time Servers with SAS Viya Stable 2025.02 for EdoardoRiva. a week ago
- Liked Fun With SAS ODS Graphics: 2025 Academy Awards Best Picture Nominee Runtimes for tc. a week ago
- Got a Like for How to get support for SAS Viya on the Microsoft Azure Marketplace. a week ago
- Liked Keep track of who accessed SAS data sets in a compute server for BrunoMueller. 2 weeks ago
- Liked Re: Is there a limited, cheaper version of SAS? for SASKiwi. 2 weeks ago
- Liked Re: Is there a limited, cheaper version of SAS? for Patrick. 2 weeks ago
- Liked Changes to the NETENCRYPTALGORITHM (NETENCRALG) SAS system option for MargaretC. 2 weeks ago
- Posted Re: Disable the custom add-in in SAS Enterprise Guide for all users on Administration and Deployment. 2 weeks ago
- Liked Re: How do get log and output in separate page in EG 8.3? for velango. 3 weeks ago
- Liked Agenda is now available for SAS Innovate 2025 for AlexBeaver. 3 weeks ago
- Posted Re: How do get log and output in separate page in EG 8.3? on SAS Enterprise Guide. 3 weeks ago
- Got a Like for Re: macro Check_DataSet_Exist. 3 weeks ago
- Posted Re: How to export dataset to xlsx with copy files task on SAS Programming. 3 weeks ago
- Liked Re: Creating Dummy Variables for PaigeMiller. 3 weeks ago
- Liked Re: Creating Dummy Variables for data_null__. 3 weeks ago
- Got a Like for Re: Creating Dummy Variables. 3 weeks ago
- Posted Re: Creating Dummy Variables on SAS Programming. 3 weeks ago
- Got a Like for Re: Creating Dummy Variables. 3 weeks ago
- Posted Re: Creating Dummy Variables on SAS Programming. 3 weeks ago
-
-
My Liked Posts
Subject Likes Posted 3 3 weeks ago 4 3 weeks ago 1 3 weeks ago 1 3 weeks ago 2 a month ago
2 weeks ago
You can restrict many capabilities, including custom tasks, by using role-based assignments in SAS Management Console. See this topic in the EG admin guide.
... View more
3 weeks ago
If you're using SAS Enterprise Guide 8.3 (not 7.1), then try the various layouts under the View menu to get the arrangement you want.
... View more
3 weeks ago
@Tom wrote:
If your existing program + task structure works for text files it should work the same for XLSX files. (Note: If the copy files task as an option to download binary files differently than text file, like FTP does, you need to make sure to copy the files as binary.)
Good point! The Copy Files task has an option to treat as text and fix line-endings (Unix vs Windows). The default is a binary transfer, which saves on encoding hassles. You'll want to check the settings in your task within the project.
... View more
3 weeks ago
I think you might need an "unknown" category in that case:
Unknown = missing(race);
... View more
3 weeks ago
3 Likes
For a good article on using a SAS procedure, see this topic from @Rick_SAS :
The best way to generate dummy variables in SAS
... View more
3 weeks ago
4 Likes
If you want to check if a data set exists in a library, you don't need to open it. Use the EXIST function. This example will run the PROC MEANS only if SASHELP.CLASS is found.
%if %sysfunc(exist(sashelp.class)) %then %do;
proc means data=sashelp.class; run;
%end;
However, if you want to check for a condition where a particular variable exists, you do have to open the data set (or query the DICTIONARY tables like SASHELP.VCOLUMN -- plenty of papers/doc on that).
This example will include the variable height in the analysis only if it is found in the data set:
%macro VarExist(ds, var);
%local rc dsid result;
%let dsid = %sysfunc(open(&ds));
%if %sysfunc(varnum(&dsid, &var)) > 0 %then %do;
%let result = 1;
%put NOTE: Var &var exists in &ds;
%end;
%else %do;
%let result = 0;
%put NOTE: Var &var not exists in &ds;
%end;
%let rc = %sysfunc(close(&dsid));
&result
%mend VarExist;
proc means data=sashelp.class;
var age
%if %VarExist(sashelp.class, height) %then %do;
height
%end;
;
run;
Notice that both of these examples leverage the %if/%then[/%else] ability for using macro conditional expressions in open code, which has been a capability in the language for a long time now...but people forget that and tend to wrap everything in macro routines (force of habit and probably working off decades of old examples).
... View more
3 weeks ago
The only bit you need to change in your working code is Proc Export so it creates a Excel file instead of a Text file. @ChrisHemedinger already shared the code with you. I assume he copy/pasted your Proc Export code and then modified it for Excel output ...and just missed to remove the delimiter statement.
Whoops, yes. Fixed that!
... View more
3 weeks ago
The Copy Files task simply downloads your file from the SAS server file system, whatever its type. So instead of creating a text file, you need to create an XLSX file to download.
You can create an XLSX by changing your PROC EXPORT code from DBMS=DLM to DBMS=XLSX. This does require SAS/ACCESS to PC Files to be licensed on the server.
%let download_from =
%sysfunc(getoption(work))&delim.&datafile..xlsx;
filename src "&download_from.";
proc export data=&lib..&datafile.
dbms=xlsx
file=src
replace;
run;
... View more
3 weeks ago
1 Like
Hi Markus,
If you want to see the source code for a "real task", check out the samples I have on GitHub. Here's one:
https://github.com/cjdinger/SAS.Tasks.Cardinality
This particular task is simple (described here) -- it's a UI with a couple of options that feeds into a SAS macro. That's one way to build these, or you can use more explicit string-builder logic as @AlanC showed.
... View more
3 weeks ago
1 Like
Hi Markus,
When you make selections in the EG tasks, EG stores those settings in the EG project. When it comes time to run your project, the EG task builds the SAS code according to the settings. For example, if you run the Logistic Regression task and select that you want the ROC chart, the task generates the appropriate PLOTS= options on the PROC LOGISTIC statement.
There is a lot of code generation logic built into the tasks themselves, and this is used by EG to generate the code for each task as it runs in your flow.
... View more
a month ago
2 Likes
It's unusual that you would need to modify the JSON for processing in SAS. I work with many APIs that provide JSON responses, and if your SAS session is using UTF-8 you should not need to post-process the JSON for interpretation. So...are you using UTF-8 encoding in your SAS session (ENCODING option)? I certainly recommend that if you are working with APIs.
... View more
a month ago
Thank you for sharing your experience, Dr. Ott. For readability, I pulled the content of your PDF attachment into the body of the message so that more community members might see it. Others may comment with other sort tips and experiences.
... View more
02-07-2025
02:37 PM
1 Like
I think you want to do 2 things. First, specify the target timezone as a region, not a standard. 'America/Chicago' is for Central.
Then also specify the base time in your TZONEOFF function, so the date is taken into account.
data WANTED;
set HAVE;
cst_datetime = START_DATE + tzoneoff('America/Chicago',START_DATE);
FORMAT cst_datetime DATETIME26.6;
TIME_DIFF=START_DATE-cst_datetime;
FORMAT TIME_DIFF TIME8.;
run;
Edit: @Tom beat me to it with a similar but different answer. More than one way to do this...what could be more SAS than that?
... View more
02-07-2025
11:15 AM
@benjamin_2018 The patches had some type of backing glue, I think, and they heat-pressed them into place with a device right in front of you.
I do sometimes get lost in those geek shirt sites -- but my bureau drawers are full of (mostly SAS related) tees already 😉
... View more
02-07-2025
09:53 AM
1 Like
Fun! SAS nerds unite!
Last year at SAS Innovate we had a "custom cap" station with several designs. Pick your own cap and a patch, and they assembled it for you. Here's mine:
Here's another design that was available:
A couple of years ago I designed this shirt and put it on a t-shirt marketplace. Hundreds of SAS users and employees have since got their own.
... View more