Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/LS24004086/MOVEA from Array field to Standalone #614

Merged
merged 16 commits into from
Sep 23, 2024

Conversation

davidepalladino-apuliasoft
Copy link
Collaborator

@davidepalladino-apuliasoft davidepalladino-apuliasoft commented Sep 19, 2024

Description

This work adds the capability to use MOVEA from an array declared as DS' field to a Standalone definition. For example:

     D AUTOAP        E DS                  EXTNAME(AUTOAP0F)
     D  AU1                   61     80         DIM(10)
     D £AUATI          S             20

     ...

     C                   MOVEA     AU1           £AUATI

Also, provides to fix the "overlay" of a DS field, imported by using EXTNAME, and another declared with offset. Under the hood, by considering previous example, we have a DS built with fields provided from AUTOAP0F and a new field (AU1) declared with offset. This offset corresponds with some field provided from AUTOAP0F. So, the value for AU1 might be the value for another field.

Technical notes

For the first cause, related to MOVEA, I fixed the problem by adding to ProjectedArrayValue class the implementation for elementSize, takeAll, takeFirst, takeLast.

For the second cause, "overlay" of two field by using EXTNAME:

  1. I improved the construction of knowDataDefinitions from files by ignoring data definitions declared without EXTNAME;
  2. I provided to RpgParser.Parm_fixedContext.toFieldInfo the fields declared in a file imported with EXTNAME.

Related to #LS24004086

Checklist:

  • If this feature involves RPGLE fixes or improvements, they are well-described in the summary.
  • There are tests for this feature.
  • RPGLE code used for tests is easily understandable and includes comments that clarify the purpose of this feature.
  • The code follows Kotlin conventions (run ./gradlew ktlintCheck).
  • The code passes all tests (run ./gradlew check).
  • Relevant documentation is included in the docs directory.

@davidepalladino-apuliasoft davidepalladino-apuliasoft changed the title Bugfix/ls24004086/movea from array field to s Bugfix/LS24004086/MOVEA from Array field to Standalone Sep 19, 2024
Copy link
Collaborator

@lanarimarco lanarimarco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe in the merge something went wrong.
These tests:
08b3413
are disappeared.

@lanarimarco lanarimarco merged commit af9c863 into develop Sep 23, 2024
1 check passed
@lanarimarco lanarimarco deleted the bugfix/LS24004086/movea-from-array-field-to-s branch September 23, 2024 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants