COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Transformer => Topic started by: jsjones on 04 Feb 2015 11:29:59 AM

Title: Batch processing of Cubes
Post by: jsjones on 04 Feb 2015 11:29:59 AM
We are currently upgrading from Cognos 8.2 to 10.2.2.  We are currently working on transitioning our cube building process to 10.2.2.  Our 8.2 environment was on Unix and the 10.2.2 is on Windows. 

I am fairly new to the cube building process and creating the scripts.  I have been able to successfully create a script for one cube build, but I am wondering if multiple cubes can be built within one script?  Looking to consolidate so there aren't so many scripts.

I am planning on using Windows Task Scheduler then to schedule the builds and send notifications.

Thanks!
Title: Re: Batch processing of Cubes
Post by: cogadmin12 on 06 Feb 2015 01:16:39 PM
jsjones -

Why not create a parameterized batch script using something like:

cogtr.exe -n2 -I -p%1.pyj

where %1 is the model name (.PYJ).

You can use the findstr command to search the output log for "TOTAL TIME (CREATE CUBE)", which will exist in the log file upon successful build.
Title: Re: Batch processing of Cubes
Post by: bdbits on 09 Feb 2015 04:38:08 PM
A modular approach is fine and can simplify rebuilds if one of many cube builds failes, but if you want to put them into one script they are just batch files. So you can, you just have multiple cogtr.exe command lines in the one batch file.

An aside, but if you were using older samples of Windows batch files for generating cubes, you should be using Transformer deployment options on the cube properties rather than "activating" the cubes from within the batch files.
Title: Re: Batch processing of Cubes
Post by: jsjones on 19 Feb 2015 03:51:46 PM
Thank you for the replies.  If I approached this in a modular way, creating a script per build, it would allow for individual builds if one fails.  However, in Scheduler can I schedule those batch files to run one after another as one completes, or would I just have to guestimate a cube build time and provide that gap? 

I have also used the deployment options within Transformer, and it's my understanding that all of that will then be taken care of through Transformer and not needed in the script, correct?

Thanks!
Title: Re: Batch processing of Cubes
Post by: bdbits on 19 Feb 2015 06:00:26 PM
I would probably create one master batch file that CALLs the other batch files in succession.

Yes, the copying of the files and activation of the cubes will all be done by Transformer if using the deployment options.
Title: Re: Batch processing of Cubes
Post by: jsjones on 31 Mar 2015 09:52:21 AM
Thanks for your suggestions, I apologize for not responding in a quicker manner.  As our C10 environment goes live, it's been a bit busier.  I have started to put together a test batch script that does a CALL for each batch file.  But what I'm experiencing so far is that the first batch file will run, and then nothing.  Is there more that I need to put in?  I've seen adding WAIT into the script but so far, that makes no difference.  Suggestions?

Thanks!
Title: Re: Batch processing of Cubes
Post by: bdbits on 01 Apr 2015 03:37:13 PM
As long as you are using CALL statements every time you want to run a batch file, it should return to the calling batch file.

Unless... do you have an EXIT statement in the called batch files? That would end everything and exit the cmd shell.