Skip to Content
avatar image
Former Member

Show JobChain Details Report - Redwood Scripting

I am attempting to use an example provided by Redwood in the Cookbook_Redwood_Scritping.pdf guide to give a hierarchical overview of all defined JobDefinitions and JobChains w/ parameters. I have copied the script exactly as provided and its not working.

When I save the script I receive the following errors. I then added two parameters called P_PARAMETERS & P_ALLICATION_NAME. I wasn't sure if these need to be set as "IN" or "OUT" params so I tried both. When set to OUT it doesn't require input when attempting to run the script.

1:31:52 PM:

JCS-102183: Compile failed for Job Definition QTEST_REDWOOD_SCRIPT (Latest Version): ShowDetails.java:54:24:cannot find symbol
symbol  : variable P_PARAMETERS
location: class com.redwood.scheduler.custom.ShowDetails
String[] paramArray = P_PARAMETERS.split(",");

JCS-102183: Compile failed for Job Definition QTEST_REDWOOD_SCRIPT (Latest Version): ShowDetails.java:127:26:cannot find symbol
symbol  : variable P_PARAMETERS
location: class com.redwood.scheduler.custom.ShowDetails
String[] paramArray = P_PARAMETERS.split(",");

JCS-102183: Compile failed for Job Definition QTEST_REDWOOD_SCRIPT (Latest Version): ShowDetails.java:170:11:cannot find symbol
symbol  : variable P_APPLICATION_NAME
location: class com.redwood.scheduler.custom.ShowDetails
new String(P_APPLICATION_NAME) }); it.hasNext();)

JCS-102183: Compile failed for Job Definition QTEST_REDWOOD_SCRIPT (Latest Version): :3 errors

With the parameters set to OUT I am now getting the following error -

Caused by: java.lang.NullPointerException: while trying to read the field 'count' of a null object loaded from local variable 'original'

at java.lang.String.<init>(String.java:149)

at com.redwood.scheduler.custom.ShowDetails.execute(ShowDetails.java:168)

at com.redwood.scheduler.custom.ShowDetailsStub.jcsExecute(ShowDetailsStub.java:30)

... 13 more

I have attached the redwood script for review.

Thanks!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Jan 06, 2015 at 07:00 PM

    Replace the first occurrence of P_PARAMETERS with

    String[] paramArray = (ja.getJobChainCallOutReferenceParameters()).toString().split(",");
    

    and second occurrence with

    String[] paramArray = (xx.getJobDefinitionParameters()).toString().split(",");
    

    and in place of P_APPLICATION_NAME

    for (Iterator it = jcsSession.executeObjectQuery("select Application.* from Application where Name = ?",new Object [] {APP}); it.hasNext();)
    

    create a IN parameter APP.

    While submitting, provide an application name for the parameter.

    thanks

    Nanda

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Nanda Kumar

      Hello Nanda, Thanks, I have added "APP" parameter. Please help me with below thig too. 1) for fetching the paramter of the JobChain with perticular SID do we need to change query only or need to do another changes too in the script. e.g. Job Names: SID1_JOBNAME1 SID1_JOBNAME2 SID2_JOBNAME1 SID2_JOBNAME2 For Fetching jobs for SID1 2) Will it impact system performance like FULL GC..? as we are having more than 1500 jobs in system. Regards, Amarjeet Kamble

  • avatar image
    Former Member
    Jan 28, 2015 at 02:57 PM

    Hi Brian,

    Please find attached script , this will extract all job chain details . Hope this will resolve your problem.

    Thanks

    Gurbakhsh


    Add comment
    10|10000 characters needed characters exceeded

  • Jan 28, 2015 at 08:57 PM

    Hello,

    Create a parameter of type String Direction IN name P_APPLICATION_NAME. If you want to dispay everything use value % as input value.

    Also create a parameter P_PARAMETER_NAME of type String Direction IN and mark it as an Array!

    You can use this parameter to display more about the Job Definitions you are listing. So if you fill this parameter with the values ABAP_PROGRAM_NAME and ABAP_VARIANT_NAME everywhere where the abap and variant are used, the report will print them out including values or references.

    Regards Gerben

    Add comment
    10|10000 characters needed characters exceeded