cancel
Showing results for 
Search instead for 
Did you mean: 

Show JobChain Details Report - Redwood Scripting

Former Member
0 Kudos

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!

Accepted Solutions (1)

Accepted Solutions (1)

nanda_kumar21
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Nanda,

Thanks for the quick reply. I have made the suggested changes and now I am getting the following -

2:33:20 PM:

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

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

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


Thanks

nanda_kumar21
Active Contributor
0 Kudos

My bad, i should have been more clear.

I have attached the corrected script.

Thanks

Nanda

Former Member
0 Kudos

Hi Nanada, I am trying to use above script in my system but it is throwing below error. JCS-102183: Compile failed for Job Definition Job_Chain_Details (Latest Version): ShowDetails.java:153:121:cannot find symbol symbol : variable APP location: class com.redwood.scheduler.custom.ShowDetails for (Iterator it = jcsSession.executeObjectQuery("select Application.* from Application where Name = ?",new Object [] {APP}); it.hasNext();) JCS-102183: Compile failed for Job Definition Job_Chain_Details  (Latest Version): :1 error Regards, Amarjeet Kamble

nanda_kumar21
Active Contributor
0 Kudos

you have to create a "IN" parameter for the job definition with the name "APP".

thanks

Nanda

Former Member
0 Kudos

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

Answers (2)

Answers (2)

gmblom
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi Brian,

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

Thanks

Gurbakhsh