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

Search Actuarial Jobs by State @ DWSimpson.com:
AL AK AR AZ CA CO CT DE FL GA HI ID IL IN IA KS KY LA
ME MD MA MI MN MS MO MT NE NH NJ NM NY NV NC ND
OH OK OR PA RI SC SD TN TX UT VT VA WA WV WI WY

Reply
 
Thread Tools Display Modes
  #231  
Old 11-10-2017, 09:21 PM
BassFreq's Avatar
BassFreq BassFreq is offline
Member
CAS
 
Join Date: Jun 2003
Location: Chicago
Studying for all eternity
Favorite beer: Duff
Posts: 1,684
Blog Entries: 2
Default

Quote:
Originally Posted by LICENSED TO ILL View Post
I am updating code in another's program and have tried a few times to get a loop+macro to work for this in a data step:


if X = 1 then BASE_CC = ORIG_CC1;
if X = 2 then BASE_CC = ORIG_CC2;
if X = 3 then BASE_CC = ORIG_CC3;
if X = 4 then BASE_CC = ORIG_CC4;
if X = 5 then BASE_CC = ORIG_CC5;

etc...


Can anyone help me look like a SASballer plz?
Assuming all of the ORIG_CC: are next to each other and ordered...

Code:
/* like a SASballer I */
array OG{5} ORIG_CC1-ORIG_CC5;
BASE_CC = OG(X);
/* props to BassFreq*/
/* mic drop */
You can use that, but only if you keep my comments with it.
__________________
If at first you don't succeed, you have one data point.
Res ipsa loquitur, sed quid in infernos dicet?
Reply With Quote
  #232  
Old 11-10-2017, 09:21 PM
NormalDan's Avatar
NormalDan NormalDan is offline
Member
CAS
 
Join Date: Dec 2016
Location: NJ
Posts: 4,520
Default

Quote:
Originally Posted by BassFreq View Post
Assuming all of the ORIG_CC: are next to each other and ordered...

Code:
/* like a SASballer I */
array OG{5} ORIG_CC1-ORIG_CC5;
BASE_CC = OG(X);
/* props to BassFreq*/
/* mic drop */
You can use that, but only if you keep my comments with it.
Reply With Quote
  #233  
Old 11-10-2017, 09:32 PM
Whiskey's Avatar
Whiskey Whiskey is offline
Member
CAS
 
Join Date: Jul 2008
Studying for nothing at all
Posts: 35,673
Default

Quote:
Originally Posted by BassFreq View Post
Assuming all of the ORIG_CC: are next to each other and ordered...

Code:
/* like a SASballer I */
array OG{5} ORIG_CC1-ORIG_CC5;
BASE_CC = OG(X);
/* props to BassFreq*/
/* mic drop */
You can use that, but only if you keep my comments with it.
Good answer.

Should have read the question better the first time.
__________________
Whiskey "on tap" - 12/31/15
Spoiler:

Bourbon(16)
Pappy Van Winkle-Family Reserve 15yr & lot "B" 12yr
Baker's 7yr
Blanton's
Knob Creek - 9yr
Basil Hayden
Maker's Mark - 46 & Cask Strength
Woodford Reserve
Jack Daniel's-Gentleman Jack, Single Barrel & Old #7
Four Roses Small Batch
Noah's Mill
Kirkland Bourbon - 7yr

Rye(6)
Angle Envy's - Finished Rye
Ravenswood Rye
Bulleit
High West - Double Rye
Whistle Pig - 10 yr
Old Overholt

Scotch(4)
Glenfiddich - The Distiller's Edition
Tomatin 12yr
The Dimple Pinch - 15 yr
Dewar's White Label

Irish(6)

Middleton Very Rare
Redbreast 12yr
Bushmill - Single Malt 16 yr
Connemarai
Jameson - Caskmates Stout and Regular
Reply With Quote
  #234  
Old 11-13-2017, 11:32 AM
ALivelySedative's Avatar
ALivelySedative ALivelySedative is offline
Member
CAS
 
Join Date: Dec 2013
Location: Land of the Pine
College: UNC-Chapel Hill Alum
Favorite beer: Red Oak
Posts: 1,510
Default

Quote:
Originally Posted by Childish Gambino View Post
This will assign the string 'orig_cc#'. He wants a variable called orig_cc#
Oh duh.

Quote:
Originally Posted by Childish Gambino View Post
%let origCat = X;
base_cc = orig_cc&origCat;
Doesn't the reference have to end with a '.' ?
ie orig_cc&origCat.;
Haven't written a macro in awhile myself so I can't remember.
__________________
1/P | 2/FM | 3F/MFE | LC | ST |4/C | 5 | 6 || 7 | 8 | 9
VEE: Econ, Fin, Stat
OC1, OC2
COP
Reply With Quote
  #235  
Old 11-13-2017, 02:36 PM
Childish Gambino's Avatar
Childish Gambino Childish Gambino is offline
Member
SOA
 
Join Date: Jul 2014
Posts: 20,024
Default

Quote:
Originally Posted by ALivelySedative View Post
Oh duh.


Doesn't the reference have to end with a '.' ?
ie orig_cc&origCat.;
Haven't written a macro in awhile myself so I can't remember.
Not really. You only need the dot if you plan to continue the text. A way of telling SAS where the macro variable ends.

orig_cc&origCat.stuff;

Some people say it's good practice to put it on all the macros. But that seems like preference.
__________________
Quote:
Originally Posted by Pseudolus View Post
Trump's biggest weakness is that he utterly lacks the knowledge, experience, interest, attention span, temperament, and common decency to be the marginally effective President of a reasonably-large HOA.
Reply With Quote
  #236  
Old 11-14-2017, 10:41 AM
LICENSED TO ILL's Avatar
LICENSED TO ILL LICENSED TO ILL is offline
Member
 
Join Date: Oct 2005
Posts: 435
Default

The Array worked perfect! Thanks! everyone.
__________________
Spoiler:
Quote:
Originally Posted by Abelian Grape View Post
Nothing gay about mirin' another bro's gains.
Quote:
Originally Posted by campbell View Post
Want to become aware of my fist?
Reply With Quote
  #237  
Old 11-14-2017, 10:59 AM
ALivelySedative's Avatar
ALivelySedative ALivelySedative is offline
Member
CAS
 
Join Date: Dec 2013
Location: Land of the Pine
College: UNC-Chapel Hill Alum
Favorite beer: Red Oak
Posts: 1,510
Default

Anyone have any experience using sas/connect so as to code on PC but have it run on a company mainframe? I continue to dislike z/OS.

I'm assuming i'd need an additional base sas license for the PC version and add on sas/connect as well. I doubt i can convince anyone that the expense is worth it, but just curious if it's been done elsewhere.
__________________
1/P | 2/FM | 3F/MFE | LC | ST |4/C | 5 | 6 || 7 | 8 | 9
VEE: Econ, Fin, Stat
OC1, OC2
COP
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 07:37 PM.


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.13172 seconds with 12 queries