Page 1 of 1

error on running process

Posted: Thu Jun 27, 2013 2:13 pm
by leewil
new to cognos so just trying to learn the qwerks. Im updating a system which was initially designed by a consultant but trying to get their help is a bit of a hard task so throwing it out to anyone here

im using cognos express

Ive got a text file which holds a hierarchy for the items we wish to budget and report on. This text file is imported into 2 different dimensions which basically look the same but one is for a reporting line and the other is the hierarchy for a planner application.

As this original file may change over time I need to update the hierarchy regularly
when running the process into the reporting line , works first time no errors
when running it in the hierarchy for the planner after initially deactivating the planner I get

'Dimension xxxxx is being used by a cube and cannot be deleted'

So how do i update the dimension used within the planner?

many thanks

Re: error on running process

Posted: Thu Jun 27, 2013 2:48 pm
by David Usherwood
Don't delete the dimension(s) :)
You've likely selected the 'Create' option in the TI wizard. 'Recreate' will remove the dimensiondelete command your selection will have generated, replacing it by dimensiondeleteallelements. NB you shouldn't lose data against the elements present in your structure feed - though I know fellow TM1ers who don't trust that.

Re: error on running process

Posted: Thu Jun 27, 2013 3:06 pm
by leewil
thanks,
may be i wasn't clear enough on my explanation, sorry
but this isn't creating a cube its creating a dimension via the process and so

cube action =
no action

data action =
store values

the action on the dimension tab within maps is set to
'recreate'

thank you

Re: error on running process

Posted: Thu Jun 27, 2013 3:08 pm
by Wim Gielis
What is the exact error message?

Is it really:

'Dimension xxxxx is being used by a cube and cannot be deleted'

Re: error on running process

Posted: Thu Jun 27, 2013 3:19 pm
by leewil
error message is

Error: prolog procedure line (3) : dimension "xxxx" is being used by a cube and cannot be deleted

hope that helps

Re: error on running process

Posted: Thu Jun 27, 2013 4:32 pm
by lotsaram
Did you read the response from David at all? I believe he already gave you the answer.

Re: error on running process

Posted: Fri Jun 28, 2013 9:15 am
by leewil
yes i did read davids response, did you not read mine?

This isn't creating a cube its recreating a dimension and the setting on the map section in the process is set to 'recreate' not create

If you could possible tell me what im doing wrong THAT would be helpful. Where do i tick recreate as the cube action is set to no action


I did head this up with I am new to cognos

Re: error on running process

Posted: Fri Jun 28, 2013 9:54 am
by Wim Gielis
Hello

Maybe your process has become corrupt in one way or another.
You know, the TI wizard has its limitations and it's not the best part of TM1 (understatement).

Did you try to start over new in a new TI process? After choosing a new process, save it before doing anything else in the wizard (to avoid that you must complete all steps in the wizard before you can save your work).

Re: error on running process

Posted: Fri Jun 28, 2013 9:55 am
by David Usherwood
Appreciate you said you were new to this technology.
Please put the setting to 'Recreate' then review and if you wish paste here the generated code.

Re: error on running process

Posted: Fri Jun 28, 2013 10:36 am
by leewil
Hi david
Im not trying to be argumentative here but what recreate setting, where in the process, e.g. tab are you referring to as i see it twice in the process.
on the map> cube tab and on the maps > dimension tab


in my process
maps> cube - cube action set to - no action
maps > dimension > action - set to recreate

If you are referring to the cube action on the maps tab then surely i dont want to set that to recreate because this process isn't generating or recreating a cube its generating a dimension.

ive included screen shots from the process and the code beneath if that helps


#****Begin: Generated Statements***
DIMENSIONDELETEALLELEMENTS('FC UK PNL WO');
DIMENSIONSORTORDER('FC UK PNL WO','BYINPUT','ASCENDING','BYINPUT','ASCENDING');
#****End: Generated Statements****

#****Begin: Generated Statements***
VGrandTotal='Grand Total';
DIMENSIONELEMENTINSERT('FC UK PNL WO','',PL,'n');
DIMENSIONELEMENTINSERT('FC UK PNL WO','',V10,'c');
DIMENSIONELEMENTINSERT('FC UK PNL WO','',V11,'c');
DIMENSIONELEMENTINSERT('FC UK PNL WO','',V12,'c');
DIMENSIONELEMENTINSERT('FC UK PNL WO','',VGrandTotal,'c');
DIMENSIONELEMENTCOMPONENTADD('FC UK PNL WO',V10,PL,1.000000);
DIMENSIONELEMENTCOMPONENTADD('FC UK PNL WO',V11,V10,1.000000);
DIMENSIONELEMENTCOMPONENTADD('FC UK PNL WO',V12,V11,1.000000);
DIMENSIONELEMENTCOMPONENTADD('FC UK PNL WO',VGrandTotal,V12,1.000000);
#****End: Generated Statements****


#****Begin: Generated Statements***
VGrandTotal='Grand Total';
#****End: Generated Statements****


#****Begin: Generated Statements***
#****End: Generated Statements****

Re: error on running process

Posted: Fri Jun 28, 2013 11:24 am
by Wim Gielis
Hi there

These statements should behave well and should absolutely not give the error you mention.
Every serious TM1 developer has written these statements (***) tens of thousands times in his/her career (or copy/pasted :-) )
As said above, start a new process and record the same steps in the wizard.
Or, copy the codes WITHIN each of the generated statements sections, and paste the code into the SAME tab (Advanced > Prolog, Metadata, Data, Epilog) in a new process OUTSIDE of the generated statements sections (generated statements sections cannot be changed manually). Set all your variables to 'Other' in the Variables tab of the new process.
Save your new process and execute. It will run fine if the file is well-behaved.

I can only reiterate from above that I *guess* your process somehow got corrupt.

(***) With the exception of DimensionDeleteAllElements because that function is plain dangerous.

Wim

Re: error on running process

Posted: Fri Jun 28, 2013 12:49 pm
by leewil
thank you Wim that's very helpful

And from what I can see from the code it should update the correct dimension.

I'll create a new process, thank you all once again