Actuarial Outpost
 
Go Back   Actuarial Outpost > Actuarial Discussion Forum > Software & Technology
FlashChat Actuarial Discussion Preliminary Exams CAS/SOA Exams Cyberchat Around the World Suggestions

DW Simpson Global Actuarial & Analytcs Recruitment
Download our 2016 Actuarial Salary Survey
now with state-by-state salary information!


Reply
 
Thread Tools Display Modes
  #11  
Old 04-21-2008, 08:30 AM
vchagas's Avatar
vchagas vchagas is offline
Member
 
Join Date: Jan 2007
Location: Lisbon, Portugal
Studying for Solvency II
Posts: 286
Default

Quote:
Originally Posted by Reflection View Post
I have what should be a simple question...

In the past, I've always had a version of SAS running locally on my PC. So if I needed to transfer a file from my hard drive, that was simple, I could even use the drop-down menus. Now I am running SAS on a server. I'd like to transfer a table in Access over to the server - is there any good way to do this in SAS?

TIA!
Need a little more info to answer ... what kind of server ... is it Windows? ... are you using Enterprise Guide? ... what modules do you have installed SAS/Access ODBC PCFormats ...
Reply With Quote
  #12  
Old 04-21-2008, 09:51 AM
Reflection's Avatar
Reflection Reflection is offline
Member
SOA
 
Join Date: Mar 2005
Location: here. in my head
Studying for Nothing!!!
Posts: 807
Default

Quote:
Originally Posted by vchagas View Post
Need a little more info to answer ... what kind of server ... is it Windows? ... are you using Enterprise Guide? ... what modules do you have installed SAS/Access ODBC PCFormats ...

To be honest - I'm not sure I know all these answers. I know that to get onto this server, I run a RDP and then it looks like I'm running PC SAS on a different computer desktop. I don't know what modules I have installed... is there some way I can figure that out?

ETA: Nevermind - figured out I can just map a network drive over there and plop in files. Yay! (Now I just have to remember my SAS skills - it's been a while since I used it...)

Last edited by Reflection; 04-22-2008 at 08:09 PM..
Reply With Quote
  #13  
Old 06-04-2009, 08:37 AM
T-roy's Avatar
T-roy T-roy is offline
Member
SOA
 
Join Date: May 2002
Favorite beer: Lagunitas Sucks
Posts: 8,534
Blog Entries: 1
Default

Here is an example of what I am trying to do:

Original data:

CPT4 Description (Hypothetical)
99202 Office visit
0401 Other Drug
54015 Surgery
0110 R&B Semi Private
01100 Anethsesia

I want to split this into CPT and REV Code Like this:

CPT REV CODE DESCR
99202 ~
54015 ~
00110 ~
__________ 0401 ~
__________ 0110 ~

So all of the variables in the CPT4 from the original data are 5 digits long? How do I know if the "" is before or after the variable?
What you have to watch out for is that both rev code and cpt code could have the same substr(CPT4,1,4) (Like the R&B and Anethsesia)
__________________
Spoiler:
Quote:
Originally Posted by win diesel View Post
No one wants to work anymore. So anyone that does, I say give them the right. /thread
Quote:
Originally Posted by ShebaPoe View Post
You are the activities you do. If you do boring, monotonous, unchallenging work, then, well, that's what you become.
Quote:
Originally Posted by ORLYLOL View Post
Beer is ****ing amazing
Quote:
Originally Posted by win diesel View Post
I'd rather talk to peons. That's why I hang out here imo
Reply With Quote
  #14  
Old 06-04-2009, 09:12 AM
T-roy's Avatar
T-roy T-roy is offline
Member
SOA
 
Join Date: May 2002
Favorite beer: Lagunitas Sucks
Posts: 8,534
Blog Entries: 1
Default

found something that works:
data ...;
set...;

format revcode $3.

if substr(cpt4,5,1) = "" then do;
revcode = substr(cpt4,2,3);
cpt4 = "";
end;
run;
__________________
Spoiler:
Quote:
Originally Posted by win diesel View Post
No one wants to work anymore. So anyone that does, I say give them the right. /thread
Quote:
Originally Posted by ShebaPoe View Post
You are the activities you do. If you do boring, monotonous, unchallenging work, then, well, that's what you become.
Quote:
Originally Posted by ORLYLOL View Post
Beer is ****ing amazing
Quote:
Originally Posted by win diesel View Post
I'd rather talk to peons. That's why I hang out here imo
Reply With Quote
  #15  
Old 06-05-2009, 12:33 PM
Actuarialsuck Actuarialsuck is offline
Member
 
Join Date: Sep 2007
Posts: 6,083
Default

I think this is pretty simple and I'm just forgetting how to fix it. I have a dataset that I want to do a simple group by on. So the code I have is:

proc sql;
create table data_table as
select col_1, col_2
from big_table
group by col_1, col_2;

Here's the warning that I get and I get that this is why it's not grouping i.e. since it's doing an order by.

WARNING: A GROUP BY clause has been transformed into an ORDER BY clause because neither the SELECT clause nor the optional HAVING clause of the associated table-expression referenced a summary function.

However if I was to do a simple GROUP BY in Acces, the SQL code would look something like

SELECT [data_tbl].[Col_A]
FROM [data_tbl]
GROUP BY [data_tbl].[Col_A];

Do I need a proc sort in there first or what am I doing wrong? Thank you in advance!
__________________
Quote:
Originally Posted by Buru Buru View Post
i'm not. i do not troll.
Reply With Quote
  #16  
Old 06-05-2009, 02:18 PM
Actuarialsuck Actuarialsuck is offline
Member
 
Join Date: Sep 2007
Posts: 6,083
Default

Here's a solution I came up with, probably not the cleanest

proc sql;
create table data_table as
select col_1, col_2, count(col_1) as col_3
from big_table
group by col_1, col_2;

data data_table (drop = col_3);
set data_table;
run;
__________________
Quote:
Originally Posted by Buru Buru View Post
i'm not. i do not troll.
Reply With Quote
  #17  
Old 06-06-2009, 12:38 PM
wutsupdoc wutsupdoc is offline
Member
 
Join Date: Jul 2008
Posts: 55
Default

hello, how long on average does it take someone with little experience of SAS to pass the certification exam? thanks
Reply With Quote
  #18  
Old 06-08-2009, 11:01 AM
Actuarialsuck Actuarialsuck is offline
Member
 
Join Date: Sep 2007
Posts: 6,083
Default

If anyone cares... Found the easiest solution, including a DISTINCT function in my SELECT statement. Basically as I noted the GROUP BY isn't useful since I'm not using functions (sum/count/etc.) in my SELECT so I can get rid of altogether and write something like:

proc sql;
create table data_table as
select distinct col_1, col_2
from big_table;
__________________
Quote:
Originally Posted by Buru Buru View Post
i'm not. i do not troll.
Reply With Quote
  #19  
Old 05-12-2010, 05:22 PM
T-roy's Avatar
T-roy T-roy is offline
Member
SOA
 
Join Date: May 2002
Favorite beer: Lagunitas Sucks
Posts: 8,534
Blog Entries: 1
Default

Anyone know what the heck this statement does from a %db2sd statement:

CASE PROFIT_CENTER
WHEN 'IM' THEN 'INDIVIDUAL MEDICAL'
WHEN 'GR' THEN 'GROUP'
END as Profit_Center
__________________
Spoiler:
Quote:
Originally Posted by win diesel View Post
No one wants to work anymore. So anyone that does, I say give them the right. /thread
Quote:
Originally Posted by ShebaPoe View Post
You are the activities you do. If you do boring, monotonous, unchallenging work, then, well, that's what you become.
Quote:
Originally Posted by ORLYLOL View Post
Beer is ****ing amazing
Quote:
Originally Posted by win diesel View Post
I'd rather talk to peons. That's why I hang out here imo
Reply With Quote
  #20  
Old 05-13-2010, 09:11 AM
ADoubleDot's Avatar
ADoubleDot ADoubleDot is offline
Member
Non-Actuary
 
Join Date: Nov 2007
Location: Slightly Dusty South
Studying for the rest of my life
Posts: 37,034
Default

creates a variable named Profit_Center with values 'INDIVIDUAL MEDICAL' and 'GROUP' (and possibly nulls)

Case-when works similar to if-then.
__________________
ADoubleDot: I'm an actuarial icon.

**** Juan.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT -4. The time now is 01:18 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
*PLEASE NOTE: Posts are not checked for accuracy, and do not
represent the views of the Actuarial Outpost or its sponsors.
Page generated in 0.43145 seconds with 10 queries