COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => COGNOS 8 Administration => Topic started by: mpflug on 02 Jul 2010 08:15:41 AM

Title: Remove Run "All at once" option from jobs
Post by: mpflug on 02 Jul 2010 08:15:41 AM
Does anyone know of a way to remove the run all at once option from cognos jobs?  I have users who like to overload my stack and block out other users by running 20-30 reports all at once.  I'd like to force them to run reports serially.
Title: Re: Remove Run "All at once" option from jobs
Post by: CognosPaul on 02 Jul 2010 02:16:47 PM
Shouldn't be too difficult. Which version are you running?
Title: Re: Remove Run "All at once" option from jobs
Post by: mpflug on 02 Jul 2010 02:35:35 PM
Running 8.4.1 FP1
Title: Re: Remove Run "All at once" option from jobs
Post by: CognosPaul on 06 Jul 2010 01:52:59 AM
The file that has the templates for that page is:
..\c8\templates\ps\logicsheets\presentation\dialog\ui-templates.xsl
Open that file with notepad++ (or another XML editor of your choosing).

Search for the string "IDS_PROP_JOB_PARALLEL" It should be on or around row 2052.
You should see the following code:
<dp:section1>
<utml:input type="radio" value="parallel" onclick="document.pform.m_jo_continueOnError.disabled=true;"/>
</dp:section1>
<dp:section2>
<dp:text>
<xts:string id="IDS_PROP_JOB_PARALLEL"/>
</dp:text>
</dp:section2>


You have two choices here. You can either delete or wrap it in the black list code so you can control who sees it. I would recommend wrapping it in the black list code so you can choose that only administrators can use it:

<out:if test=" not(contains($ui_black_list, ' RUN_JOBS_PARALLEL ')) ">
<dp:section1>
<utml:input type="radio" value="parallel" onclick="document.pform.m_jo_continueOnError.disabled=true;"/>
</dp:section1>
<dp:section2>
<dp:text>
<xts:string id="IDS_PROP_JOB_PARALLEL"/>
</dp:text>
</dp:section2>
</out:if>


You'll need to be my guinea pig on this. I can't restart the service here to test this modification.
Title: Re: Remove Run "All at once" option from jobs
Post by: mpflug on 06 Jul 2010 11:02:53 AM
Am I supposed to define ui_black_list somewhere?  As is it doesn't seem to have any effect.  I also tried removing the option all together and that didn't have any effect either.  I'm restarting after each change - is there a way i can be assured that the xsl is getting applied?  Any idea which xml file(s) this is being applied to?
Title: Re: Remove Run "All at once" option from jobs
Post by: tupac_rd on 06 Jul 2010 12:08:15 PM
Paul is the expert, but did you also include 'RUN_JOBS_PARALLEL' in the system.xml file, just like you would do for other UIs you would be hiding.
Title: Re: Remove Run "All at once" option from jobs
Post by: mpflug on 06 Jul 2010 12:14:24 PM
No - i didnt modify system.xml any for this because i didnt see any ui objects that were relevent.  can you elaborate a little on what you think should be added?

BTW - i just did a search over my entire cognos directory for "logicsheets/presentation/controls/ui-templates.xsl" and it didnt come back with anything.  Is it possible that file isnt being applied anywhere?

Title: Re: Remove Run "All at once" option from jobs
Post by: CognosPaul on 06 Jul 2010 02:50:30 PM
It is entirely possible that modifications to that file won't have any effect. Cognos has a very nasty habit of duplicating (or triplicating or more) templates, and finding the right one can be a time consuming chore. It is also possible that the template in question is being stored in one of the JAR files. Some of the JAR files are archives of the XSL files. Cognos will use those before using any of the unarchived files, meaning you'd have to remove that JAR from the directory. Finding the correct JAR is even more of a chore than the correct xsl file.

The black list code
<out:if test=" not(contains($ui_black_list, ' RUN_JOBS_PARALLEL ')) ">
</out:if>
is Cognos proprietary. It would allow you to enter the parameter into the systems.xml so only specific groups could see it. It's a way of adding elements to the Elements you can hide (http://publib.boulder.ibm.com/infocenter/c8bi/v8r4m0/index.jsp?topic=/com.ibm.swg.im.cognos.ug_cra.8.4.0.doc/ug_cra_id43483UserInterfaceElementsReferenceList.html) document. Look at the Add or Hide User Interface Elements Based on Groups and Roles  (http://publib.boulder.ibm.com/infocenter/c8bi/v8r4m0/index.jsp?topic=/com.ibm.swg.im.cognos.ug_cra.8.4.0.doc/ug_cra_id28609CustomizetheUserInterfaceBasedonGroupandR.html) for details on using the black list.

As I said, I wasn't able to test it today. I'm hoping that I'll have some more spare time next week to research this.
Title: Re: Remove Run "All at once" option from jobs
Post by: mpflug on 09 Jul 2010 03:24:35 PM
Ok, here's the secret.  Make the changes to ui-templates.xsl then delete portal.jar.  On restart Cognos will read in the files off the system rather than the precompiled xts files in the jar.

Thanks for the help!
Title: Re: Remove Run "All at once" option from jobs
Post by: mvjcognos on 13 Jul 2010 12:51:41 AM
while creating job itself u will get the option of all at once and run sequentially u can select any one option u want..............
Title: Re: Remove Run "All at once" option from jobs
Post by: mpflug on 01 Sep 2010 03:33:28 PM
I have a follow up to this.  I now want the default for "Continue on Error" to be checked, not unchecked.  This looks like the important part of the file to edit (line 2066 of ui-templates.xsl).  I've tried numerous combinations and can't get the box to be checked by default - anyone tried this before?


<dp:section1>
  <utml:input type="checkbox" value="true" name="m_ jo_continueOnError">
    <out:if test="(not(key('env-param','m_p_s equencing')) and /root/cm:queryResponse/cm:queryReply[2]/cm:jobDefinition/cm:sequencing!='sequential') or key('env-param','m_p_sequencing')!='sequential'">
      <out:attribute name="disabled">true</out:attribute>
    </out:if>
  </utml:input>
</dp:section1>

Title: Re: Remove Run "All at once" option from jobs
Post by: CognosPaul on 02 Sep 2010 12:01:37 AM
Try doing:

<dp:section1>
  <utml:input type="checkbox" value="true" name="m_ jo_continueOnError" checked="checked" >
    <out:if test="(not(key('env-param','m_p_s equencing')) and /root/cm:queryResponse/cm:queryReply[2]/cm:jobDefinition/cm:sequencing!='sequential') or key('env-param','m_p_sequencing')!='sequential'">
      <out:attribute name="disabled">true</out:attribute>
    </out:if>
  </utml:input>
</dp:section1>

Title: Re: Remove Run "All at once" option from jobs
Post by: mpflug on 02 Sep 2010 07:57:27 AM
Worked!  Thanks!