cancel
Showing results for 
Search instead for 
Did you mean: 

"Command failed ; end position is out of record index" Java not working

collepicolo
Explorer
0 Kudos

Hi -

We have master data load package that have some warnings for some members that doesn't have enough length to enter in the conditional. We found the note 1618317 that explain the error and how to address, we also read the several other questions here but we are not getting the expected results on our attempts to solve this.

As you can see there are only 6 IDs with problem. They have less than 6 characters. In attempt to solve this we tried to use the JS but we are doing something wrong.

Take for example the master data "0611" we would like to be considered with 4 character and not get caught in the validation of the transformation anymore but we believe that our syntax or our understand is incorrect about how to resolve this.

If we run the transformation validation we still keep getting the same number of records with errors:

Thank you for any inputs in advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member186338
Active Contributor
0 Kudos

"They have less than 6 characters. In attempt to solve this we tried to use the JS but we are doing something wrong"

For sure - wrong!

ID(1:6) in transformation file is generating the error and you can't correct it in the conversion.

Have to be

ID=*IF(ID(1:4)=*STR(ASI_) THEN ID; *STR(SKIP))

And in conversion you have to list all not required ASI_... to skip

What is the source of data to load?

collepicolo
Explorer
0 Kudos

This was helpful. Not what we were looking but we dealt with the inconvenience to add more conversion conditions and we will have to monitor in the future to add more if necessary.

ID=*IF(ID(1:3)=*STR(ASI) THEN ID; *STR(SKIP))

We reduced to three characters to have all the members passing the conditions without the warning message. We worked to remove any other members that have the ASI prefix and it is not ASI_H4.

We were hoping to have some kind of java conditions that could skip the members that doesn't fill the 6 characters. The note 1618317 was giving us the hope that this was possible.

former_member186338
Active Contributor
0 Kudos

collepicolo

Once again, JavaScript can't skip. And ID(X:Y) has to be valid for all dimension members.

P.S. Please accept the correct answer.

collepicolo
Explorer
0 Kudos

Vadim Kalinin the note 1618317 seems a bit confuse or misleading. This is what it says:

Symptom

"The reason it fails is because node names are shorter than length 14 and then the rejected record error message says "Command failed; end position is out of record index". All nodes with a length of 14 are
accepted and all shorter fail."

This is exactly what is happening with us. A few members are shorter than length 6, in fact coincidentally is only 6 members.

Resolution

This is design behaviour of BPC. Mapping cannot support this feature, however, you can use conversion file to support this as shown below :
External Internal

NPA* *

* js:%external%.toString().substring(4)

I accept the guidance to reduce the number of mapping ID length to cover the shortest and work on the conversion removing those items but what I'd like to point is that the note seems a bit confuse

former_member186338
Active Contributor
0 Kudos

collepicolo

Sorry, but the note is fine!

As you can see - *SKIP was not mentioned in the note, only some ID conversion.

Your case is different:

You want to skip records based on substring in ID. Skip is performed in conversion step, but conversion has to receive skip criteria from mapping. JavaScript can do whatever you want with ID, but it can't skip.

Hope it's clear.

Please accept the correct answer.