- Newest
- Most votes
- Most comments
The error you're encountering is a variable redefinition issue in your TRANREPT Groovy script. The error message indicates that you have defined the variable "jobName" twice in the same scope, specifically at line 27:
"The current scope already contains a variable of the name jobName @ line 27, column 6."
This happens because the variable "jobName" is already defined earlier in your script, and then you're trying to define it again at line 27 with:
def jobName = "" + jobContext.getJobName() + "-" + procName
To fix this issue, you have two options:
- Remove the second definition of jobName and use the existing variable
- Use a different variable name for the second definition, such as "newJobName" or "fullJobName"
For example, you could change line 27 to:
def fullJobName = "" + jobContext.getJobName() + "-" + procName
Then use "fullJobName" instead of "jobName" in the subsequent code.
This is a common issue in Groovy scripts where variables are inadvertently redefined in the same scope. Once you make this change, your transaction report should generate successfully.
Sources
Error while generating transaction report | AWS re:Post
AWS Blu Age L3 Workshop: Unable to execute the groovy script "TRANREPT" | AWS re:Post
answered a year ago
