05-05-2023
snoopy369
Barite | Level 11
Member since
04-17-2013
- 409 Posts
- 170 Likes Given
- 29 Solutions
- 161 Likes Received
-
Latest posts by snoopy369
Subject Views Posted 4220 07-26-2022 01:21 PM 2765 06-14-2022 06:32 PM 1281 02-21-2022 06:55 PM 1569 02-14-2022 01:01 PM 851 02-14-2022 12:00 PM 1038 12-16-2021 02:58 PM 1213 10-07-2021 04:08 PM 1263 10-07-2021 02:11 PM 1782 10-07-2021 01:20 PM 1027 10-07-2021 01:13 PM -
Activity Feed for snoopy369
- Got a Like for Re: Finding a value in all datasets in all variables. 05-14-2023 04:56 AM
- Posted Re: What is the state of SASGF 2022? on SAS Global Forum Discussion. 07-26-2022 01:21 PM
- Got a Like for Re: Installing add-on package. 06-14-2022 06:45 PM
- Posted Re: Installing add-on package on Administration and Deployment. 06-14-2022 06:32 PM
- Got a Like for Re: proc sgpanel x-axis with multiple scales. 06-14-2022 02:32 PM
- Liked Re: Help with ods output statement for Tom. 02-22-2022 08:42 AM
- Got a Like for Re: Help with ods output statement. 02-21-2022 09:19 PM
- Posted Re: Help with ods output statement on SAS Programming. 02-21-2022 06:55 PM
- Posted Re: drill down from visual SAS Visual analytics on SAS Visual Analytics. 02-14-2022 01:01 PM
- Posted Applying control-based filters to subset of data on SAS Visual Analytics. 02-14-2022 12:00 PM
- Posted Re: EG 7.1 code lost during update on SAS Enterprise Guide. 12-16-2021 02:58 PM
- Liked Re: What is the state of SASGF 2022? for TashaChapWUSS. 11-03-2021 01:47 PM
- Posted Re: Is there a way to use FIRST and LAST options within an IF THEN statement? on SAS Programming. 10-07-2021 04:08 PM
- Liked Re: Editing the legend in a map for GraphGuy. 10-07-2021 03:56 PM
- Liked Editing the legend in a map for Batman. 10-07-2021 03:55 PM
- Posted Re: Conexão SAS com Python para executar uma rotina on SAS Enterprise Guide. 10-07-2021 02:11 PM
- Liked Make SAS Studio Log Window Honor the Alt Key for Kurt_Bremser. 10-07-2021 01:22 PM
- Liked Re: How to transpose many columns to one for Reeza. 10-07-2021 01:21 PM
- Posted Re: How to transpose many columns to one on SAS Programming. 10-07-2021 01:20 PM
- Posted Re: Using a SAS Dataset instead of an External file in this interesting Example on SAS Programming. 10-07-2021 01:13 PM
-
Posts I Liked
Subject Likes Author Latest Post 3 4 3 1 1 -
My Liked Posts
Subject Likes Posted 1 01-10-2018 11:18 AM 1 06-14-2022 06:32 PM 1 01-08-2018 10:08 AM 1 02-21-2022 06:55 PM 1 07-14-2021 11:12 AM -
My Library Contributions
Subject Likes Author Latest Post 4
07-26-2022
01:21 PM
Another option that I've seen is co-authoring the paper with someone who is attending the conference. I've presented papers on behalf of people outside the country who couldn't attend, as have others I've worked with in the past. Usually there will be someone who is familiar with the topic and is happy to collaborate, even if the collaboration is 90% presenting it and 10% talking it over.
... View more
06-14-2022
06:32 PM
1 Like
The instructions in the link are correct regardless of the IDE you're using, EG or DM. If you're running EG with a local install, it's just calling sas.exe the same as DM would be if you ran it directly. All you do is copy the .dll files to a particular folder. (You can also copy them to a different folder and add that folder to the PATH in your sas config, if you know how to do that.)
If you don't have a local install, then you can't install PROC TRAJ directly, you have to talk to your server admin and they have to install it on the server. It's the same concept (put it in the right folder and/or in another folder in the PATH), but it's on the server not on your computer.
... View more
02-21-2022
06:55 PM
1 Like
Not an expert at regression process, but you could try the PERSIST option (see https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/odsug/p0oxrbinw6fjuwn1x23qam6dntyd.htm) to see if it will keep it open as opposed to overwriting it.
... View more
02-14-2022
01:01 PM
This is done using linking.
First, you create a second page, which includes *all* of your detail data. Here, I use a separate dataset that has the detail data; you could do this entire report with just one dataset if you had a computed total, but this is slightly easier - I like to do summaries outside of VA.
data htemp.bike_usage;
input month miles;
datalines;
1 100
2 200
3 300
4 400
5 500
6 600
7 500
8 500
9 800
10 1200
11 1100
12 1200
;;;;
run;
data htemp.month_detail;
input month means_of_transport $ miles;
datalines;
9 Bicycle 200
9 Bus 200
9 Car 200
9 Van 200
10 Bicycle 300
10 Bus 400
10 Car 200
10 Van 300
;;;;
run;
Then load these to CAS if you haven't already, and then I make a report, using the month summary dataset for the chart you made (the bar chart), titled "Overview", and then a second tab, "Detail", which is a list table. You can of course do something other than list table, but the important thing is that it needs to have "month" as a field somewhere - it can be a "hidden" field, but it has to be associated with the chart somehow.
Then, go to the Overview report and select Actions, then the bar chart, and open Page Links. There should be a selection for Detail, and a note that you need to map the data (since it's from a different dataset).
Click on Map, and if the month variable is the same name in both datasets it'll auto-select as the mapping criteria - if not, pick the right mapping variable (think the variable which tells SAS which row should be mapped to which row from the left and right datasets).
Once you've mapped the variable, then bars should become clickable, and you'll get the drilldown you wanted! It will filter the Detail tab with the Month value from the bar. Note the breadcrumb at the top which lets you go back easily, and the filter button showing what was filtered by.
... View more
02-14-2022
12:00 PM
**This is for SAS VA 8.5.2 in a Viya 3.5 environment.**
I am building a map that we are going to use to assist managers in assigning cases to interviewers, and running into a challenge; wondering if SAS VA can support this workflow, or if it's not feasible.
We have two source datasets, Interviewers and Respondents. Both have lat/long for each, a variable for a strata (interviewers of one strata work respondents of same strata), and some other variables unique to the individual dataset. In the example below, those are represented by Available and Assigned; in the real data there are others. These variables cannot be combined into a single variable shared across the datasets (even though in the example data, that would probably be the easiest solution).
What options do we have for enabling showing, for example, all of the interviewers with only respondents selected "Assigned=0"? Or all of the respondents with only interviewers selected "Available=1"? Or both? For this purpose, the only solution I've found so far is switching from the button bar to the list (which allows multiple select), but that's not ideal, both because one of our actual filters has one option per record (interviewer name), and it requires the user to intentionally select the "missing" option. (Of course, we would use a drop-down list not a button bar in that case - using button bars here to make the example easier to see in a picture.) We also really like the idea of the drop down list due to the ability to type in and get a name autofilled - but that is a single select option, which would be fine if it also allowed missing.
I've thought some about trying to keep the datasets second (not using the "combined" dataset but using both datasets separately), but I don't see that it's possible to do that on a single map, even if I define a relationship between the fields.
Thanks!
Example code:
data fimap.example_interviewers;
set sashelp.zipcode;
length type $11;
keep x y type strata available;
where mod(zip,580) = 0;
type='Interviewer';
strata = mod(_n_,8) + 1;
available = mod(mod(_n_,3)+1,2);
run;
data fimap.example_respondents;
set sashelp.zipcode;
length type $11;
keep x y type strata assigned;
where mod(zip,53) = 0 and mod(zip,580) ne 0;
call streaminit(7);
strata = rand('Integer',1,8);
type='Respondent';
assigned = mod(_n_,10) gt 0;
run;
data fimap.example_combined;
set fimap.example_interviewers fimap.example_respondents;
run;
Example of what the map might look like:
... View more
12-16-2021
02:58 PM
I have had that issue back when I used 7.1. Best advice I have is upgrade to 8... doesn't seem to have that issue anymore.
... View more
10-07-2021
04:08 PM
Remember that the data step is row-by-row always, it (normally) can't seek about the dataset randomly. (There is a way to do that, but it's nearly always the wrong approach - it's very slow and loses a bunch of functionality.)
What `first.var` does is it tells you whether the row you're on is *different from the previous row*. That's it! And what `last.var` does is it tells you if the row you're on is *different from the next row*. (Yes, SAS does sort of peek at the next row for this, it's the exception to the rule.) Mentally, in english, it tells you if you're on the "first" row of a sequence of that ID. It just returns 1 or 0 - true or false.
Unfortunately, it only works with the `by` variables - so we need to make your data work for that. We do need to subset the data, but we don't need to do it in a separate step - we can do it on the fly.
1. Let's subset your dataset while we do this, using where to only include the Phase1 folks.
where findw(VISIT, 'PHASE#1') > 0;
2. Let's retain the start variables, because we'll need them to hang around until the last row.
retain trtsdt trtstm;
3. Let's save aside the trtsdt and trtstm when we are on a first.id row.
if first.id then do;
trtsdt = datepart(stdtc);
trtstm = timepart(stdtc);
end;
4. Let's then save the trtedt/trtetm when we're on a last.id row, and output that row.
if last.id then do;
trtedt = datepart(stdtc);
trtetm = timepart(stdtc);
output;
end;
All together we have:
data want;
set have;
where findw(VISIT, 'PHASE#1') > 0;
by id;
retain trtsdt trtstm;
if first.id then do;
trtsdt = datepart(stdtc);
trtstm = timepart(stdtc);
end;
if last.id then do;
trtedt = datepart(stdtc);
trtetm = timepart(stdtc);
output;
end; keep id trtsdt trtstm trtedt trtetm;
run;
... View more
10-07-2021
02:11 PM
@ErosGuedes wrote:
I'm starting now in SAS, I have a python robot that makes a copy of a file to the SAS server. I can make the connection via scp, and I make the copy this is ok.
I wanted via python to send a submit to run a SAS project on the server, but I'm not managing to make the connection. The Server uses SAS Guide, my machine has python 3.8.
I've read a lot of things, but I don't quite understand what I need to do to get the connection. Can anyone explain to me how to create this connection?
(Translated via Babelfish)
Are you using SASPy to connect to SAS 9, or are you using Viya?
SASPy has good documentation here: https://sassoftware.github.io/saspy/
Viya is a bit different, but for the most part easier, you can look at the documentation here: https://blogs.sas.com/content/sgf/2020/04/15/getting-started-with-python-integration-to-sas-viya-part-1-making-a-connection/
If this doesn't help, I recommend posting some more information - what kind of connection are you making? What library are you using? How do you log in to the SAS server (username/password, IOM, SSH, etc.)? What kind of server is it (linux/windows/etc.)? What kind of machine are you running Python on (linux/windows/etc.)?
... View more
10-07-2021
01:20 PM
You should just do this in the data step - easier and faster than coercing PROC TRANSPOSE to do what you want! Just make an array of your variables and then `output` new rows when you have a value.
data want;
set have;
array recs record1-record3;
do _i = 1 to dim(recs);
if not missing(recs[_i]) then do;
record = recs[_i];
output;
end;
end;
keep record id;
run;
... View more
10-07-2021
01:13 PM
Sure , you can do basically the same thing not using an external file. Your approach seems reasonable to me.
if numYieldConstraint gt 0 then
do;
do i = 1 to numYieldConstraint;
outputvalue=scan(Yield_Constraint,i,' ');
output;
end;
end;
keep outputvalue (... other things ...);
Using the `output` statement you can output multiple rows. You might want to output to a different dataset if you also want a one-row-per dataset (the FarmerAnalysis dataset you have now).
... View more
10-05-2021
11:23 AM
I have a SAS VA 7.5 installation (Windows) and have run into an odd issue.
When a user selects to create a new geography field, two things happen:
They get the red generic error message, which leads to a log entry that suggests there was a CrossDomainProxy error
They are only able to make a geography from longitude and latitude, nothing else (not from zipcode or county or etc.)
The odd thing is that the map itself loads fine with lat/long geographies! I've seen the CrossDomainProxy error before (and searching online, many others have) when the OSM maps can't be loaded properly, but we don't have that issue; there's no proxy it needs to use, just a firewall.
I'm guessing there is some issue with the program failing to get to an online dataset that it uses to look up coordinates, but I don't see where I can adjust this setting. In a prior install of SAS Visual Analytics 7.4 on another machine, we had no issue with this. I had assumed it was using SASHELP.ZIPCODE to look up zipcode centroids, not something online... so I'm further confused.
Does this suggest a firewall issue, and if so, how can I identify the issue and what port/etc. to open? Or is there a configuration setting wrong somewhere - like, does VA not know where SASHELP.ZIPCODE is and is trying to look somewhere that's causing this error (or maybe it's just an unrelated error...)?
Thanks!
... View more
08-27-2021
06:36 PM
I'm setting up our Add-In for MS Office installer, and want to deploy with a shared profile (the SDSControl.xml that we use from EG). It looks like it's possible to do that - but the documentation is shared between EG and the AMO ("The SAS Enterprise Guide and SAS Add-In for Microsoft Office clients update their profile (manually or automatically) from a shared profile stored in a central location"), and only mentions EG in the actual instructions.
https://documentation.sas.com/doc/en/bicdc/9.4/bidaag/p0yy6siuqppzmon1vf1ghpyw43kw.htm#n0foluzdvezttqn1bljw9n3qz6ws
Can I put the SDSControl.xml file in the Add-in for MS Office product folder, or does it go in a (not extant) Enterprise Guide folder in the depot ( \\depot-host\Depot_date_type\products\eguide__release_cd915__win__en__sp0__1) or somewhere else? And if it is in the EG depot, does it matter what release I pick?
Or is this not possible for the add-in - or does it need to be somewhere else?
... View more
08-27-2021
06:28 PM
Maybe you don't have SAS EVM installed (or installed properly), it's not mandatory for SAS 9.4. If nothing else you could parse your Metadata Server Logs... that contains information about everybody who logs in and, I think, enough info to find out the client.
We also have a separate program, ESM (Enterprise Session Monitor - https://boemskats.com/products/esm/) which lets us do things like this a bit better than EVM does. They've actually been acquired by SAS, so it might be easy to get their stuff added on.
... View more
08-27-2021
06:12 PM
Can you get what information you want from the SAS Environment Manager reports (https://go.documentation.sas.com/api/collections/evcdc/2.5_M1/docsets/evug/content/evug.pdf?locale=en - see around page 92-95)
... View more
08-27-2021
04:19 PM
Oh, ok, you're talking about stand-alone installs - that's what I'm trying to avoid 🙂 And I'm the SAS Admin, am talking with the IT folks, just hoping some other SAS Admin types might have ideas for how it's done elsewhere.
... View more