1. It's JavaScript, not Java
  2. The error message is probably due to the fact that you didn't tell Workflow that this script is JavaScript. Open the task and select the proper option from the Language menu
  3. The script reads each individual line, so you don't have to specify on which line to look for the data. If you meant the "column" however, then yes, the slice(0,3) statement is where you specify it.
    Since Javascript indexes are 0-based, the first character is at index 0. In your case, the 4th character is at index 3, so the statement would be
    slice(3,3)
_________________________
Technical Product Manager
I don't want to achieve immortality through my work; I want to achieve immortality through not dying - Woody Allen