APAR status
Closed as program error.
Error description
Error while generating graph String index out of range: -1 Plug-in Vendor: IBM Plug-in Name: Application Discovery Workspace Plug-in ID: com.ez.workspace Version: 13.0.0.201803281059 java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(Unknown Source) at com.ez.mainframe.override.resolutions.internal.LoadUtils.getEntr y(LoadUtils.java:239) at com.ez.mainframe.override.resolutions.model.Journal.loadJournal( Journal.java:267) at com.ez.mainframe.override.resolutions.model.Journal.loadJournal( Journal.java:232) at com.ez.graphs.viewer.odb.ui.ResolutionBasedGraphModel.prepareRes olutions(ResolutionBasedGraphModel.java:519) at com.ez.graphs.viewer.odb.ui.ResolutionBasedGraphModel.addMainfra meResolutionsInfo(ResolutionBasedGraphModel.java:510) at com.ez.graphs.viewer.odb.ui.ResolutionBasedGraphModel.postLoadGr aph(ResolutionBasedGraphModel.java:281) at com.ez.graphs.viewer.callgraph.programcallgraph.CallGraphModel.l oadGraph(CallGraphModel.java:256) at com.ez.workspace.analysis.graph.job.AbstractGraphAnalysisJob.run (AbstractGraphAnalysisJob.java:261) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
Local fix
n/a
Problem summary
Got "String index out of range: -1" error when generating callgraph in Eclipse
Problem conclusion
The problem is linked to MOVE statements that use reference modification. In the ResolveDynamicCallValuesInParagraph uses the left side member value from the move statement, not taking into account the offset. In the 5.0.5.1 version will be included a fix for the manual resolution mechanism. With that fix you will be able to apply the manual resolution mechanism for avoiding this error.
Temporary fix
To cover this kind of situations you can use the manual resolution mechanism. Unfortunately the comma present in the wrong resolved program name (",AAAAAA") is not supported in the current version of the manual resolution. Oana worked to fix that problem, and in the next version you will be able to manually override the names of the called programs, so the Analyze will generate correct graphs and reports. Very important! To use manual resolution you must know what are the program names that are called at the lines where you will use this mechanism. (In the example we saw there is one COBOL source file having 2 CALL statements with wrong resolutions). As a work-around to this, you can use Decisions: 1. use Decisions on COBOL programs that contains the string ",STARTED" and replace it with "AAAAAA" (without comma) 2. compile the involved sources 3. wait for the batch to finish the import in the OrientDB database 4. generate the backward call graph that involves the AAAAAA program 5. For each edge that goes to the AAAAAA program: 5.1. right click on it and select "override resolution" 5.2. delete the unwanted values from the list of resolved values and add the correct ones 6. Close the graph and regenerate it.
Comments
APAR Information
APAR number
PI99581
Reported component name
APPL DISCOVERY
Reported component ID
5737B1600
Reported release
504
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2018-06-26
Closed date
2018-11-19
Last modified date
2018-11-19
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
APPL DISCOVERY
Fixed component ID
5737B1600
Applicable component levels
R505 PSY
UP
[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSRR9Q","label":"IBM Application Discovery for IBM Z"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"504","Edition":"","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]
Document Information
Modified date:
19 November 2018