If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Select date range once to apply to entire macro?

Started by jimicron, 22 May 2007 11:38:48 AM

Previous topic - Next topic

jimicron

Hi - my first post, but hoping someone out there can help me as this would be a HUGE help to many of us where I work.

Currently, I have a macro in which I lock or unlock several cubes within the macro.   Basically, every cube in the model (around 20-25) are locked or unlocked. This happens at least one time per month.  The date range at the time of running the macro is the same for all 20-25 cubes.  It is for the historic dates through the present.  Therefore, the following month, the macro will be run again, but it will now include the latest month, which last month did not have - follow me on that?   :)

Here is an example of the process/macro:

@Message("Please select Months that you want to lock.  All Months selected will be locked.","O")
@DCubeOpenSelect({Selection from D-Cube Library Name.Cube Name1}; {D-list Library.4 Months})
@DCubeCommand("lock"; "ALL";{Selection from D-Cube Library Name.Cube Name1})
@Close("Y")
@Message("Please select Months that you want to lock.  All Months selected will be locked.","O")
@DCubeOpenSelect({Selection from D-Cube Library Name.Cube Name2}; {D-list Library.4 Months})
@DCubeCommand("lock"; "ALL";{Selection from D-Cube Library Name.Cube Name2})
@Close("Y")
etc

This 4 step process is repeated 20-25 times.  As you can probably guess, takes a little while to select the dates each time. 

I am wondering this:  Is there a way to select a date range once each time the macro is run that will then apply to every DCubeOpenSelect that is in the macro so I do not have to manually select 20-25 times?  Remember, this date range will change each time the macro is run, but not within the macro.

I sure hope someone has a workaround or a way to do this.  Thanks a lot!
JIM

ykud


jimicron

I tried this, however, it was a "hardcode."  It didn't bring up the option for me to select when I ran the macro.  I need something that will be brought up to select each time I run the macro.  For this to work, I have to go in prior to running the macro each time and select the months. 

ykud

Then try @SliceCommand and Parameter Cubes.

jimicron

Pardon me - pretty new to Cognos - so I do not understand "Parameter Cubes" - would you mind elaborating a little bit?  Thanks a lot!  I am assuming it will allow the selection I want as I have tried the Slice one before and it was like the other - hardcoded.  But I am curious about the "Parameter Cubes".  Thanks!
JIM

ykud

Sorry, that was some kind of slang.
You can define a number of cubes for latter slicing (for example, Months_to_Update Cube). They'll be used as Lookups in @SliceCommand or @SliceUpdate. They can be n-dimensional, but 2-dimensional slices are used for value selection.

See Analyst Help on @SliceUpdate -- there's a really nice example.