20 April 2011

The Dodeca channel, 24 hours a day

Introduction

No, that isn’t me droning on and on about the marvelousness of Dodeca, but instead an exciting YouTube channel that is 100% Dodeca.  It’s almost as entertaining as television, and infinitely more educational.  

This is pretty exciting stuff – you don’t need to sign up for a webinar, they’ve rehearsed it enough so that there are no demo SNAFUs, and you can rewind (how quaint my VCR-era-soon-to-be-completely-outdated terminology is) the video to illustrate a point again and again.

Tim posts updates to the threads in his Twitter account (you are all subscribers, yes?) or YouTube’s own subscription functionality can be used.  Or you could just obsessively go to the page every day and see if there’s something new.  

What’s out there

As of today, here are the videos:
Introduction to Dodeca
Installing Dodeca
The Sample Application
Creating a new Dodeca Application
Creating an Essbase Excel view
Workbook Scripts
Exporting Metadata to a Local Zip File

The list is ever-expanding, so more cool content is coming everyone’s way.

So go watch it, already

Videos of how to do all of this stuff is exciting.  Sometimes a picture, or a video, is worth a thousand words.  And as Dodeca is the most all-around awesome reporting tool for Essbase there ever was, I know you’ll all be out there today.  See, YouTube is for work, too.  :)

Show it to your fellow geeks, show it to your family, but most importantly, show the Introduction to Dodeca episode to your Essbase reporting economic decision maker.  Actually, for that, call Tim and get him to turn on his patented Geek Idol marketing charm.  Works every time.

12 April 2011

Yeah, yeah 11.1.2.1 is here, so what?

Introduction

Given the excitement around this release (geeks get enthused by some pretty odd things), you’d think an Oracle-red lightning bolt would shoot down from the heavens when I type that and smite me mightily like Thor’s hammer right on the noggin.  BONG!  Ouch, that hurt.  But I have an excuse for writing that.

I have the problem all (most) EPM implementers face – ask us to build an Essbase database, write a calc script, craft an MDX formula, proof of concept a Planning app – that we can do with aplomb and flair.  We do that for a living; we better be good at it.

But install a package that requires more than double-clicking on setup.exe and we (or at least I) go all wobbly.  I have spent countless and fruitless hours trying to get development environments to work since System 9.  Oh, eventually I mostly get them running but we are sometimes talking months (say hello System 9.0.1 and Oracle Fusion EPM 11.1.13 and 11.1.2) to get to a working state.  It is my no-longer-secret shame.  I suck at installations.  There, I have said it and I feel much better.

The problem is, I want to experience the joy that is 11.1.2.1.  Alas, my successful installation will likely occur sometime around the general release of 11.1.2.2.  What to do?

There is an answer to my (and your) problem

The answer’s name is John Booth.  He has very generously provided an Amazon Web Services (AWS) Amazon Machine Image (AMI) with the basics of 11.1.2.1 installed on it FOR FREE.

That means, with an AWS account, you (and I) can run 11.1.2.1 without installing anything.  Oh joy, oh rapture.  Maybe I can even have a life.  Maybe.  Maybe you can, too.

You can stop reading right now and go to his blog here to try out his EPM Test Drive to get all of the details.  Or keep on reading to see how someone even as technically lame as yr. obdnt. srvnt. can run 11.1.2.1 with practically no effort at all.

Sign up for Amazon Web Services

You must have an Amazon Web Services account.  Go here to start the process.  Once you have that, follow these steps to 11.1.2.1 nirvana.

Amazon has put together a nice tutorial.  I recommend that you go through it, following the Windows path as the 11.1.2.1 EPM Test Drive AMI is on Windows.  Even if you’re a Linux bigot, Go Team Windows!

Don’t be overwhelmed by all of the steps.  There is a bit of a learning curve but it isn’t that bad.

Launching 11.1.2.1 in the cloud

1)      Assuming you’ve signed up and run through the tutorial, find your IP address at http://www.whatsmyip.org/  You are going to need this to define your security access to the 11.1.2.1 image.
2)      Log onto Amazon Web Services at http://aws.amazon.com


3)      Username = youremailaddress.com, password = whateveritis.

4)      Make sure you have Adobe Flash 10.2 installed.  The below message only pops up if you don’t have Flash 10.2 installed.

5)      Click on the EC2, the Security Group, and finally the Create Security Group link.  You are going to need your IP address from step #1

6)      Name the group and give a description.  I am going to pretend my name is Alice and that she/I live in Philly, PA.  We will not talk about my identity crisis.
7)      In the bottom half of the screen, select RDP as a connection protocol:

You need only enter your will need your IP address with a /32 switch.  Then click on Add Rule.

8)      Change the IP address to:  youripaddress:32, e.g., 98.111.148.105/32 and then click on Save.  You will see the following as confirmation:

9)      Then click on Apply Rule Changes.

10)      Now click on the AMIs link.

11)   Select All Images, type in ami-b0669bd9 ami-de2bd4b7, and then click on Refresh.  The AMI should appear.

12)    Right click on the AMI and select Launch Instance

13)   Select m2.xlarge aka Extra Large and then Continue.  Don’t worry about the Availability Zone.  The power is almost yours.

14)   Take the default on the Advanced Instance Options.

15)   Take the default on Tags, or put in a value if you like.  It doesn’t really matter unless you managing multiple instances.

16)   If you haven’t already created a key pair, do so now.  Make sure that you keep that in a secure place as it is part of your authentication into AWS.  In this case I created one called “AmazonCloud”.

17)   Leave the security group at default and click on Continue.

18)   You will get a chance to review your selection.  Once you’re satisfied, click on Launch.

19)   You will receive a confirmation message.  Click on the View your instances on the Instances page link.

20)   You will see a list of running instances.  Now you play the waiting game as you are now subject to a delay equivalent to powering up a real server in your data center. 


21)   Once you’ve waited 10 to 15 minutes, right click on the AMI line, and select Connect.

22)   You will get information on how to connect to the instance.  Don’t be discouraged if you can’t; remember, it’s a virtual server oh-so-slowly booting off the drive.  You can either download the shortcut to your hard drive, or copy the public DNS to the clipboard.  Either way, you’re going to be running the Terminal Services client, aka, Remote Desktop, to connect to the server.

23)   If you click on the Download shortcut file link, save it to your Windows desktop for sanity’s sake.

NB – This is in FireFox; Internet Explorer’s dialog box looks a little different.


24)   Double click on the icon to see if it’s really running or not.

25)   You will get this scary-looking error message.  Ignore it, it’s much worse than it looks and click on Connect.

26)   Happy, happy, joy, joy.  You have now connected.
 
27)   Once started, check out how much power you have. 


28)   Go ahead, start EPM 11.1.21 by double-clicking on the Workspace shortcut .  Admit it, you’ve been waiting all day for this.  Now play, play, play or more seriously (and boringly – see, I just invented a word, my 11.1.2.1 exuberance knows no linguistic bounds) learn, learn, learn.

29)   When your brain cannot take any more, use the Start menu to Shut Down the server.  Remember, if the instance is running, you are getting charged by the hour.

30)   Your 11.1.2.1 instance is now stopped.  Any work that you have done is stored on the stopped hard drive.  If you are well and truly done with the instance of the virtual machine, right click on that Stopped AMI and select Terminate.  This will delete the AMI and its drives.  You lose all work.  If you want to keep the drive in the state you left it, leave it a Stopped state or make your own AMI from it and then Terminate the instance.  So long as the instance exists, even in a Stopped state, you are being charged, albeit a small amount.


31)    That’s it.  Have you sent John an note of appreciation yet?  :)

The best way to thank John is to come see our presentation at Kaleidoscope

You’ll have to tolerate me, as well.  Seriously, I come at this from an implementation perspective, John from an infrastructure perspective.  It’s the best of both worlds.

Think of us as Martin and Lewis.  Just call me Jerry; Dino’s the infrastructure guy.  Have a gander of us entertaining your spiritual ancestors at their convention.

01 April 2011

Stupid Programming Tricks #8

Introduction to the introduction

I wrote this (or as you’ll see in a minute, I didn’t  write this) quite a while ago and was holding off on releasing it because…well because I had other things to post.

Now I see that Robb Salzmann has posted something pretty similar to what I-didn’t-but-someone-else wrote.

Think of this as an alternate take on his post, or his post is an alternate of this post.  You decide.

Introduction

Are you an Antimimetic or a Mimetic?  In other words, does art imitate life, or life imitate art?  

I’m pretty sure my name isn’t Tom Sawyer, and yet I manage to get others to whitewash Aunt Polly’s fence.

This time it’s Frank Chow who’s done all of the hard work.

The problem

Set substitution variables for the current Actual month and year.  Big deal, right?  Any automated system worth its salt does this.  

But where do those dates come from?  Manual assignment?  Magic?

Frank went for code (Is there really any other way?) and had an additional requirement – that the current month increments on the 25th of the month.  And oh yes, and it had to handle the extra-special case of January.

NB – The fiscal year is the same as the calendar year.  It has to be for the solution below to work as you’ll shortly see.

The solution

DOS will never die, will it?  It is breathtakingly cryptic and quite powerful in its limited way.  What’s not to love?  

Let’s dive in:

Setup the Day, Month, and Year variables

:: ********************* Set up the Day, Month, Year Variables **************************
   FOR /f "tokens=1-4 delims=/ " %%a in ('date /t') do (
    set day=%%a
    set mm=%%b
    set dd=%%c
    set yy=%%d
    )
                                                                             
 set /a pr_mm=%mm%-1
 set /a pr_yy=%yy%-1
Pretty cool stuff here – the code is stripping the output of date /t using the backslash as a delimiter and then putting the day, month number, day number, and two digit year into four temporary variables.

Setting up the strings

:: ***************** set up mapping table ************************
  set monthmap=00-Dec;01-Jan;02-Feb;03-Mar;04-Apr;05-May;06-Jun;07-Jul;08-Aug;09-Sep;10-Oct;11-Nov;12-Dec
::*************** set current month variable ************
 CALL SET cur_month=%%monthmap:*%mm%-=%%
 SET cur_month=%cur_month:;=&rem.%

::*************** set prior month variable **************
 CALL SET pr_month=%%monthmap:*%pr_mm%-=%%
 SET pr_month=%pr_month:;=&rem.%

echo current_month: %cur_month%
echo prior_month: %pr_month%

::*************** set current & prior year variables ***********
 set cur_yr=FY%yy:~-2%
 set pr_yr=FY%pr_yy:~-2%

echo current_year: %cur_yr%
echo prior_year: %pr_yr%
Here a key-value pair is used with CALL SET to translate the month numbers in the variable %mm% to three character strings and is also used to append “FY” to the two digit year values in %yy%.

Here’s a good guide to string manipulation.  You’ll find a section similar to the above in the example called “Map and Lookup - Use Key-Value pair list to lookup and translate values”.

Handle month end and January special case

::************ set up CurrActMonth & CurrActYear variables ***************                                                                                         
 IF %cur_month% EQU Jan goto Var_Jan
 IF %dd% LSS 25 goto before25
 IF %dd% GEQ 25 goto after25
 
:Var_Jan
 IF %dd% LSS 25 goto before25_Jan
 goto after25

:before25_Jan
 SET CurrActMonth=Dec
 SET CurrActYear=%pr_yr%
 goto End
  
:before25
 SET CurrActMonth=%pr_month%
 SET CurrActYear=%cur_yr%
 goto End
  
:after25
 SET CurrActMonth=%cur_month%
 SET CurrActYear=%cur_yr%
 goto End
:End

echo CurrActMonth: %CurrActMonth%
echo CurrActYear: %CurrActYear%

Ever wonder what the DOS commands are for >, >, <>, etc.?  Check them out here.

Run it if needed

:: ***************** Excute the MAXL script if the date is 25th ***********************
 IF %dd% EQU 25 goto MAXL_update_date
 exit

REM /============ excute MAXL script to update the Substitution Variables ======================/
:MAXL_update_date
 essmsh SubVar_CurrActMonth_Year.msh
This code gets run every night.  If it’s the 25th, run the MaxL code, otherwise exit.

Do it in MaxL

/* --------------------------------------------------------------------------
*  LOGIN AND SETUP SCRIPT VARIABLES - &CurrActMonth and &CurrActYear
* -------------------------------------------------------------------------- */

/* NB -- user, password, and server are set up separately as Windows
  environment variables.    */
login "$ESS_USERID" "$ESS_PASSWD" on "$ESS_SERVER";

/* ---------------- SET UP SUBSTITUTION VARIALBES --------------------------- */
alter system set variable 'CurrActMonth' $CurrActMonth;
alter system set variable 'CurrActYear' $CurrActYear;

logout;
exit;
Remember, the Windows CMD script code set the temporary OS environment variables CurrActMonth and CurrActYear.  These are referenced in MaxL with a “$” in front of the variable name.

Conclusion

This code does three things:
  1. Figures out the current month and year based on system date
  2. Uses some cool DOS functions
  3. Sets Essbase substitution variables if it’s the 25th of the month and oh by the way handles year end pretty well


Frank asked me what I thought about it – was it any good, could I make improvements, etc.  Some say the greatest form of flattery is imitation.  Is ripping code off and using it yourself an even greater form of flattery?  Whatever your definition, I plan on using this code when I have the same need.

You can get the whole code stream here.  Run it with the PAUSE statements in to understand what it’s doing – take those statements out when you want to use it.