We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b8909b commit 316c952Copy full SHA for 316c952
cobol-parser/src/main/scala/za/co/absa/cobrix/cobol/parser/Copybook.scala
@@ -191,7 +191,9 @@ class Copybook(val ast: CopybookAST) extends Logging with Serializable {
191
if (foundFields.isEmpty) {
192
throw new IllegalStateException(s"Field '$fieldName' is not found in the copybook.")
193
} else if (foundFields.lengthCompare(1) == 0) {
194
- foundFields.head
+ val result = foundFields.head
195
+ cacheStatements.put(fieldName, result)
196
+ result
197
} else {
198
throw new IllegalStateException(s"Multiple fields with name '$fieldName' found in the copybook. Please specify the exact field using '.' " +
199
s"notation.")
0 commit comments