java.lang.StringIndexOutOfBoundsException error when parsing the Copybook
search cancel

java.lang.StringIndexOutOfBoundsException error when parsing the Copybook


Article ID: 230017


Updated On:


CA Test Data Manager (Data Finder / Grid Tools)


While attempting to work with some complex copybook conditions, when the File definition manager tries to create the AFL files we are getting the following parsing error:

java.lang.StringIndexOutOfBoundsException: String index out of range: -1


Release : 4.9.1

Component : Mainframe


Generally, this exception indicates that a string either meets or exceeds a defined character length limitation. 

According to the TDM Solutions Architects, there is a 30-character max limit that comes from the language standard (Cobol, PL/I).

Another thing to consider is if the copybook source contained any non-language elements, like ASA control characters. If so, removing the control character when shortening the record/field names, may correct the problem.


The customer confirmed that they have some 'record names' and 'field names' which exceed 30 characters. After shortening the 'record names' and 'field names', the Copybook parses and the AFL is generated without error.